com.unity.webrtc
com.unity.webrtc copied to clipboard
[BUG]: The NVIDIA encoder and libwebrtc can interact poorly, causing a long delay with a frozen picture at the start of a stream
Package version
2.4.0-exp.8
Environment
* OS: Windows 11
* Unity version: 2021.3.4f1
Steps To Reproduce
- Use a scene with a simple button and NvCodec.
- Create an offer from the Unity scene.
- Connect a remote visitor.
- Try to mash the button. Observe a 3s freeze between receiving the first frame (a still picture) and the button being interactable.
Current Behavior
There is a long time between the stream starting to send picture versus the subsequent frames in the stream from the client's perspective being interactable.
Expected Behavior
When the user connects and the RTP video stream receiver is ready from the perspective of the Unity application sending video frames, it should request more keyframes because it appears something is broken about the keyframe it succeeds to send.
Anything else?
Setting keyframe interval to a small number makes the scene interactable much sooner. Then, after a short period of time, switching back to infinite goplength works.
No response
@doctorpangloss I am sure that there is a bug freezing the frame after the first frame. Thank you.
memo: WRS-345
We are testing 3.0.0-pre.2 and this issue would be fixed the version. I guess upgrading libwebrtc is the reason.
https://github.com/Unity-Technologies/com.unity.webrtc/pull/843