Skip to content

Adaptive publishing over WebRTC

When a client device is publishing from a browser to Flussonic, Flussonic controls the browser from which the publication is carried out so that the browser adjusts the bitrate of the publication to the bandwidth of the channel. This prevents packet loss when the bandwidth of the Internet connection is insufficient. If you reduce the channel width, the client must reduce the publication bitrate, if you expand the channel, the client must increase the publication bitrate.

This feature is enabled by default and usually does not require any configuration because the default settings are optimal. However, you can change the values as you wish to achieve even more performance.

ABR publication settings in the Flussonic UI

To specify additional options for a published source, click options next to the source URL. Adaptive bitrate settings are under WebRTC > ABR:

WebRTC ABR publishing options

The following settings in the file correspond to these settings in the UI:

stream published_stream_name {
  input publish:// abr_loss_lower=2 abr_loss_upper=10 abr_mode=1 abr_stepdown=50 frames_timeout=1 max_bitrate=2200 min_bitrate=500 output_audio=aac priority=0 source_timeout=5;

Flussonic recommends the browser bitrate within the min_bitrate - max_bitrate range, depending on the presence and amount of packet losses during publication.
Flussonic recommends lowering the bitrate when the amount of losses is more than abr_loss_upper and increasing it when the amount of losses is less than abr_loss_lower. Decreasing and increasing are performed by steps of size abr_stepdown and abr_stepup, respectively. After the specified number of auto-adjustment cycles (abr_cycles) passes, Flussonic considers the bitrate to be optimal, and it is no longer analyzed. By default, abr_cycles=5. If abr_cycles=0, the adjustment process takes place all the time while the publication lasts.

Also, Flussonic calculates the actual maximum bitrate. It remembers the bitrate values at which the losses grew up to abr_loss_upper and considers their average value over the past number of cycles to be the new maximum bitrate value (current).