webrtcsink should also do congestion control/bitrate adjustment for audio stream
I'm using webrtcsink
to transcode a higher-bandwidth livestream to a lower-bandwidth one. For example, I could take a 64 Kbps audio stream of a YouTube livestream [1] and then transcode it to a WebRTC stream usable on e.g. 56 Kbps connection or a mobile phone with limited-bandwidth mobile subscription.
At first, seeing that webrtcsink
handles congestion control, I expects that it'll handle the limited bandwidth automatically. However, that doesn't seem to happen. Upon inspecting code, it seems that webrtcsink
doesn't adjust the bitrate of the audio stream at all.
At the moment, I workaround the issue by listening to encoder-setup
and setting the bitrate
property of the encoder manually. But I guess it would be nice if the congestion control extends to audio streams as well.
[1] Fun fact: that's the lowest YouTube will go for a live stream.