WebRTC stream getting stuck on limited network bandwidth
I would like to use GStreamer's WebRTCBin for live streaming video material. When working with limited bandwidth, I discovered that the stream totally gets stuck if there's not enough bandwidth for the whole stream. Interestingly, when setting the bandwidth limit the frame rate decreases over a few seconds before getting stuck. After increasing the available bandwidth again, the stream resumes.
Based on my experiences from other WebRTC-based solutions, my expectation would have been that the stream won't completely get stuck if there's just a little too less bandwidth available for the whole stream. Instead, I expected that I would just recognize a small drop in frame rate compared to the full stream.
Here's a small example of GStreamer WebRTCBin's behavior when streaming with 2000 Kbit/s.
|2050 Kbit/s||Stream is running without issues|
|1950 Kbit/s||Stream gets completely stuck|
|2000 Kbit/s||Randomly switching between video getting played and video stuck with an interval of 2-15 seconds|
I tried GStreamer Version 1.14.5 and 1.16. For bandwidth limitation I used wondershaper: https://github.com/magnific0/wondershaper
Using the same setup with Kurento or the WebRTC implementation of Chromium browser instead of GStreamer WebRTCBin resulted in a noticeably better behavior that is not getting stuck.
Can someone explain this behavior and tell how to reach the expected behavior with frames getting dropped instead of the whole video getting stuck?
Thank you very much in advance