Simulcast

Adaptive Bitrate and Multi-bitrate Streaming for Stable End-user Experiences

Simulcast is a mechanism for distributing streaming content with variations that are optimized for viewers who are under different network conditions or device resolutions. By using a mechanism of WebRTC to distribute content, multiple sources will be available simultaneously that have been encoded with different bitrates and resolutions (HD, SD, LD).

1002

The platform's Selective Forwarding Unit (SFU) is responsible for distributing the media and adjusts the bit rate so that the streaming player will select the highest quality stream it can reliably playback for each viewer. This is known as Adaptive Bitrate (ABR) streaming. The decision is made based on factors like available bandwidth but also other considerations such as device size, video layout, and CPU utilization may be considered. With Multi-bitrate (MBR) streaming, the end-user can be given controls to choose which resolution they would like to receive instead of letting the SFU auto select it.

This bitrate adaptation is available for RTMP, SRT, and WHIP broadcast protocols.

This guide covers:

Simulcast provides flexibility that allows viewers to adjust their individual experience for specific circumstances. For multicast use cases of distributing to multiple destinations, review the Syndication guide.

👍

Getting Started

If you haven't already, begin by following the Getting Started tutorial to create a Dolby.io application and start your first broadcast.

Configuring Simulcast

Requirements to Simulcast

To configure your broadcast and distribute with Simulcast there are a few considerations.

  • The simulcast setting must be enabled before beginning to broadcast.
  • You will need to have Multisource Streams to the broadcast either by using an encoder that is capable of transcoding multiple sources or by using multiple devices that each contribute to the broadcast.
  • You should use either H.264 or VP8 codecs.
  • Disable b-frames for better results.
  • You need to have adequate bandwidth at the broadcast source to send multiple contribution sources.

🚧

Bandwidth Usage

Simulcast is included with plans at no additional cost when enabled. However, since multiple streams will be published, there will be more bits sent to the platform which counts as a bandwidth increase. Conversely, viewers may receive a resolution and bitrate at a lower level which may decrease bandwidth consumption overall.

How-to enable Simulcast with the Dolby.io dashboard

To activate Simulcast and stream using the Streaming Dashboard Broadcaster, open the Media Settings by clicking on the gear icon. This allows you to toggle the option to be on. The bandwidth settings can also be adjusted to achieve the desired bitrate.

Set the Bandwidth as Custom > 6000, which will provide sufficient Kbps for a high-quality simulcast stream. Similarly, the Width, Height, and FPS should be adjusted to match your desired output.

You are now ready to send your live stream and can select the start button on the broadcaster. The browser will provide multi-bitrate contributions during broadcast when using the Streaming Dashboard.

You can use the Hosted Player to check the results.

How-to enable Simulcast from an encoder

You may choose to use a Hardware Encoder that can support multi-bitrate encoding directly or Software Encoders that use additional plugins and configuration to enable separate renditions. Regardless of whether you are using RTMP, SRT, or WHIP as your broadcast protocol, you will need to configure multiple contributions to the broadcast with various quality layer settings.

Specific integration examples:

As long as the WHIP, RTMP, or SRT client makes a Simulcast offer the media server will accept it.

Publish URL

The following parameters are significant to determine the server endpoint:

  • simulcastId: An identifier that assigns feeds produced by a single camera as Simulcast layers. All feeds that have the same simulcastId are published together as different quality layers. You can identify each layer using a different sourceId.
  • token: The publish token used for the broadcast.
  • sourceId: A unique identifier for a specific feed. Two feeds can have the same sourceId only when they are the same and used as backup feeds in Redundant Ingest.

The following table presents an example of using simulcastId and sourceId for five different feeds. Video 1 and 2 is published using two Simulcast layers, video 3 is published without Simulcast.

ContentFeedSimulcastResolutionSourceIdSimulcastId
Video 11Enabled640x3601lowsim_source_1
Video 12Enabled1280x7201highsim_source_1
Video 23Enabled854x4802lowsim_source_2
Video 24Enabled1920x10802highsim_source_2
Video 35Disabled640x360non_sim_source_3-

Some broadcast tools will use a single URL and others may require separate publish path and stream name.

👍

Multi-Source Builder

The Multi-source Builder tool within the dashboard can assist with constructing these target endpoints. When using RTMP, SRT, and WHIP contributions you will use a separate publish url for each source. The Multi-source Builder will help construct these URLs which you can export and download the configuration as a reference while setting up each device you will be broadcasting from.

Recommended settings for Simulcast

The specific settings available may vary depending on your available Hardware or Software encoders. A few settings that are common:

  • Encoder: H.264 (AVC), x264, ffmpeg, or nvenc
  • Encoding Mode: variable bitrate
  • H.264 Profile: High
  • Keyframe Interval: 0.5
  • Quality: Lowest (if optimizing for real-time performance and minimal latency)

Individual source contributions can be customized however you like, but typically follow High, Medium (or Standard), and Low.

High quality layer

Source ID1
Name1080p
Resolution1920x1080
Bitrate6000kbps
Keyframe2
B-Frames0

Medium quality layer

Source ID2
Name720p
Resolution1280x720
Bitrate2000kbps
Keyframe2
B-Frames0

Low quality layer

Source ID3
Name360p
Resolution640x360
Bitrate500kbps
Keyframe2
B-Frames0

View multi-bitrate streams with the hosted player

During Playback, stream quality defaults to Auto and will be determined by a few factors:

  • The stream quality available from the broadcaster
  • The stream quality requested by the receiver if switched from Auto
  • The stream quality is estimated based on the receiver's available bandwidth

When using the Hosted Player, viewers will be automatically served video quality with an adaptive bitrate appropriate for them. It may take a brief amount of time for the bandwidth estimation to determine the ideal quality setting. Setting the bandwidth to the highest quality setting of 6000kbps during broadcast can help reduce the amount of time this adaptation takes.

The desired Video Quality can also be chosen manually. This is done within the viewer by clicking the gear icon in the bottom right and selecting video quality, as shown below.

On the viewer, you can also check the bitrate throughput by selecting a quality level and then selecting the Media Stats within the gear settings icon.

720p resolution with a video bitrate of 2.56 Mbps

720p resolution with a video bitrate of 1.05 Mbps

360p resolution with a video bitrate of 0.02 Mbps

360p resolution with a video bitrate of 24.5 kbps

180p resolution with a video bitrate of 0.02 Mbps

180p resolution with a video bitrate of 6.56 kbps

📘

Building Your Own Custom Player To Support Multi-bitrate Streams

If you are using the Millicast Web SDK to build your own playback experience and want to support Simulcast, see the Multisource Playback guide for details on handling events and layer selection.

Simulcast demo video

Here is a video showing the simulcast playback using the hosted player built with the Javascript Web SDK.

Troubleshooting

To diagnose simulcast issues, it can be helpful to review details about the broadcast source and playback client:

  • Operating system and web browser
  • Hardware encoders or software applications used
  • Publishing encoder settings (framerate, bitrate, resolution, etc.)
  • Bandwidth of both broadcast source and playback client
  • Video quality selection
  • The cluster regions used for broadcasting and playback

How-to check network conditions

There are some tools that can test the packet loss and bitrate giving details on the network conditions.

There are network limiter test tools that can help simulate conditions when trying to reproduce a problem.

Learn more

Learn more by exploring the developer blog and code samples.