OvenPlayer icon indicating copy to clipboard operation
OvenPlayer copied to clipboard

Feature request: Dynamic WebRTC playout delay hint increase & decrease

Open basisbit opened this issue 3 years ago • 1 comments

Within the last couple of days I did a lot of testing of OME WebRTC based video live stream playback in environments with low bandwidth, environments with high jitter and environments with sudden bursts of packet loss. In some of those cases, increasing the playout-delay on client side did help. However, that meant increasing the playout delay for all users

It would be a nice improvement if the playout delay could be managed automatically by OvenPlayer or an external code without having to restart the stream, by watching the playout buffer size statistics and automatically increasing it if it more than twice ran out of buffer to play, and alternatively reducing playout-delay on the go if the buffer was not needed at all for some time (30 seconds?).

Might help to be able to specify a max and min playoutdelay value at OvenPlayer initialization.

All in all, this should make it possible to have low latency for the majority of stream viewers, and those who have network stability issues will still have good playback quality at the cost of higher latency. Example use case: someone is watching a live stream in a train over LTE/5G: for some time, the connection is stable and good, then the train passes through the middle of nowhere with random bursts of packet loss but still good enough bandwidth, then the train is in good connection area again for some time, but there are no-signal-tunnels occasionally.

basisbit avatar Jul 15 '21 16:07 basisbit

Great idea.

WebRTC Player (Browser) has a Jitter Buffer that dynamically resizes internally, but from what I've observed, it's about 700ms max. Currently PlayoutDelay seems to be working with minimum JitterBuffer . If a method to set JitterBuffer min/max comes out as a WebRTC standard, this problem can be solved, but it seems very difficult to observe the buffer from the outside and change it in real time.

In fact, this has been discussed for a long time. I am waiting for this extension to become standard.

https://webrtc.googlesource.com/src/+/refs/heads/main/docs/native-code/rtp-hdrext/playout-delay

getroot avatar Jul 16 '21 05:07 getroot

We are closing the issue due to a long period of inactivity.

SangwonOh avatar Jan 12 '24 06:01 SangwonOh