Encoder rate is limited to 2500kbps despite high resolution video & unlimited bandwidth

777 views
Skip to first unread message

DarKingdoom almot

unread,
Oct 25, 2021, 9:35:16 AM10/25/21
to discuss-webrtc
Hey,
I have been testing transmitting video from Chrome browser to Chrome browser & from streamer to chrome browser, one side is sender and the other is receiver, the sender and receiver are connected with ethernet cable of 1gbps in P2P and have decent CPUs, for some reason that I cannot understand and by looking at the browser logs, the encoder never exceed the 2500000bps rate(2500kbps) despite having 100mBps bandwidth:

Logs from the browser [same results in the streamer]
[1264:610][ 220121] (goog_cc_network_control.cc:688): bwe 433963286 pushback_target_bps=5715775 estimate_bps=5715775
[1267:276][220122] (video_stream_encoder.cc:2083): OnBitrateUpdated, bitrate 2500000 stable bitrate = 2500000 link allocation bitrate = 4764648 packet loss 0 rtt 8

Tried also to feed high resolution video in the sender browser using those flags:
--use-fake-ui-for-media-stream
--use-file-for-fake-video-capture="./tractor_1080p25.y4m"

but when examined the logs still caped at 2500kbps, I tried also to use a streamer that uses WebRTC as library and in the streamer feed different videos and I get the same result, capped at 2500kbps despite the video is ~ 15000kbps.

So is this a problem or I am missing something ?

Vitaly Ivanov

unread,
Oct 26, 2021, 12:11:46 AM10/26/21
to discuss...@googlegroups.com
It's an age-old issue. There's some silly code limiting the max bit rate at 2500 kbps, it even gave rise to the urban legend that webrtc is fundamentally limited to 720p/2000kbps (it's been patched over the years only to change the maximum from 2000 to 2500 kbps, so the exact max value you stumble upon may vary):

Here are some pointers to the rate control API you can use:


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/a4b1bd46-afb7-419b-a1a0-6bdc3f7e2147n%40googlegroups.com.

Miguel del Amor

unread,
Mar 22, 2022, 7:46:59 AM3/22/22
to discuss-webrtc
Setting the b=AS parameter on SDP through SDP mangle in the offer would allow you to set the bitrate you want, GetMaxDefaultVideoBitrateKbps is used just if encoder setting hasn't max_bitrate set and as I said adding b=AS causes the bitrate being set.

We are using that with success if many projects with latest WebRTC version.

Reply all
Reply to author
Forward
0 new messages