Table of Contents |
---|
Overview
For optimal pucture picture quality with available channel bandwith 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
Chrome | Firefox | Safari 11 | Edge | |
---|---|---|---|---|
Windows | + | + | + | |
Mac OS | + | + | + | |
Android | + | + | ||
iOS | - | - | + |
Settings
The following WCS settings are intended to limit publishing bitrate:
On browser side (JavaScript) | On server side (flashphoner.properties) | |
---|---|---|
Minimum bitrate limit | constraints.video.minBitrate | webrtc_cc_min_bitrate |
Maximum bitrate limit | constraints.video.maxBitrate | webrtc_cc_max_bitrate |
On browser side, bitrate limits are set in kilobits per second, for example
...
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:
№ | Range | Algorithm |
---|---|---|
1 | [0, minBitrate] | WCS stops bitrate management and not send any REMB commands |
2 | [minBitrate, maxBitrate] | 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 |
3 | [maxBitrate, ...] | WCS constantly sends bitrate decrease commands until it reduce to maxBitrate |
How to enforce bitrate increasing
...
Code Block | ||
---|---|---|
| ||
webrtc_sdp_min_bitrate_bps=3000000 webrtc_sdp_max_bitrate_bps=7000000 |
These parameters are ste set in bps. In the exampel example above, the settings have a same effect as
Code Block | ||
---|---|---|
| ||
x-google-max-bitrate=7000;x-google-min-bitrate=3000 |
These settings are intended for Chromium-based browsers and work with, e.g., Opera, Vivaldi and Yandex.Browser. Also, they are applied when iOS Safari 12 is used. They do not work with Firefox and Edge.
Usage
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 bandwith bandwidth and state.
Bitrate rising needs to be enforced when publishsing publishing HD and 4K streams. In this case, Chrome browser is recommended for publishing.
Known issues
1. In lates latest Chrome versions (Chrome 75 for example) browser holds publishing bitrate on low limit x-google-min-bitrate when publishing WebRTC H264 stream
...