WebRTC receiver jitter buffer?

We have some problems with latency; The latency is low when we connect to the WebRTC sender via web browser, but when the Unity application is loading a scene, it seems like the buffer of video stream on receiver builds up - and latency is increased from 60ms to 500ms

We have monitored the jitter buffer on the web receiver, and it seems that this builds up as a result of the Unity application loading scenes.

Is there a way to “reset” / clear the jitter buffer (if this is the cause of the latency)?

Appreciate any help with this issue, thanks!

@kazuki_unity729 can you help?

Which version of the WebRTC package are you using?

We are using 2.4.0-exp.10

@kazuki_unity729 I would really appreciate it if you can help with this - because other than this issue everything works beautiful! :sunglasses:

We have monitored the jitter buffer on the web receiver, and it seems that this builds up as a result of the Unity application loading scenes.

I assume that loading scenes would make a CPU spike and it makes delay of packing audio buffer.
AudioStreamTrack makes the component internally and fetches audio buffer using OnAudioFilterRead method here. I have not been sure the detail of issue yet, but I guess there are isues around these code.

We are not streaming audio and have not added this component. Will it help to add this component?

Sorry I misunderstood,
I would like to know the easiest way to replicate your issue?
Is your issue reproduced by repeating loading scene?

When the Unity application that is sending video stream is loading a scene, the WebRTC receiver builds up a latency in video stream. The latency is higher the longer the loading time is on the sender. It seems like it is the “freezing” of the sender application that is causing this latency, since we tried right clicking in unity editor on sender app, and this had same result.

Thank you for the detail, I will try to replicate the issue.

1 Like