For optimal picture quality with available channel bandwidth video bitrate should be managed while capturing WebRTC stream in browser. WCS server allows to limit minimum and maximum video bitrate for stream published. Audio bitrate is not managed.
Platforms and browsers supported
The following WCS settings are intended to limit publishing bitrate:
|Minimum bitrate limit|
|Maximum bitrate limit|
On browser side, bitrate limits are set in kilobits per second, for example
and on server side limits are set in bytes per second
If the limits are set on both sides, browser settings take precedence over server settings.
If browser settings are not defined, server settings are applied,
If none of limits are set, default settings are applied
These settings work in most modern browsers and define the REMB bitrate management limits.
How it works
If maxBitrate is set, WCS server will send REMB command to decrease bitrate when this limit is reached.
If minBitrate is set, WCS server will stop sending REMB command to decrease bitrate when this limit is reached.
Therefore, the settings define 3 ranges with its own bitrate management algorithm:
WCS stops bitrate management and not send any REMB commands
WCS server makes active bitrate management: depending on jitter and incoming traffic uniformity WCS decides to send REMB commands to decrease bitrate. If channel is good, WCS does nothing and bitrate is not decreasing
WCS constantly sends bitrate decrease commands until it reduce to maxBitrate
How to enforce bitrate increasing
Now, bitrate increasing can be enforced in Chromium browsers only by setting
x-google-min-bitrate parameters via SDP hook.
It is impossible to enforce bitrate rising with client and server settings, only bitrate decreasing can be managed.
In this case, Chrome specific settings take precedence if they are set, i.e.
constraints and server settings will be ignored. Note that Chrome default settings found by experience is
In the latest Chrome builds, the option
videoContentHint: "motion" should be set when enforcing bitrate on browser side, because Chrome drops publishing bitrate in prefer to resolution when one of the other values is set
Enforcing bitrate increasing in Chrome browser with server parameters
Chrome browser SDP bitrate settings can be adjusted on server side using the following parameters
These parameters are set in bps. In the example above, the settings have a same effect as
These settings are intended for Chromium-based browsers. Also, they are applied when Safari 12 or newer is used.
Bitrate enforcing does not work in Firefox.
Bitrate limiting in certain borders can be useful for example when publishing video to Safari browser subscribers. This browser is sensitive to bitrate jumps, in this case picture quality loses until freeze and browser hangs. It is recommended to stabilize bitrate when publishing streams for Safari viewers by setting narrow limits of bitrate change, for example
In this case picture quality in Safari browser will be acceptable depending on channel bandwidth and state.
Bitrate rising needs to be enforced when publishing HD and 4K streams. In this case, Chrome browser is recommended for publishing.
1. In latest Chrome versions (Chrome 75 for example) browser holds publishing bitrate on low limit x-google-min-bitrate when publishing WebRTC H264 stream
Symptoms: with SDP settings
the publishing bitrate hols on 3000 kbps while channel bandwidth is on 20 Mbps.
Solution: double bitrate limits, for example