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).
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 guide covers:
- Requirements to Simulcast
- How-to Enable Simulcast with the Dolby.io Dashboard
- How-to Enable Simulcast from an Encoder
- Recommended Settings for Simulcast
- Viewing Multi-bitrate Streams
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.
If you haven't already, begin by following the Getting Started tutorial to create a Dolby.io application and start your first broadcast.
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.
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.
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.
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:
- How-to Setup Multi-Bitrate Simulcast with OBS
- How-to Setup Multi-Bitrate Simulcast with vMix
- How-to Setup Multi-Bitrate Simulcast with Videon
As long as the WHIP, RTMP, or SRT client makes a Simulcast offer the media server will accept it.
To utilize Simulcast there are a few parameters that are significant to determine the server endpoint.
- simulcastId: a parameter to indicate that simulcast is enabled
- token: identifies your publish token used for the broadcast
- sourceId: a unique numerical identifier for the source
Some broadcast tools will use a single URL and others may require separate publish path and stream name.
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.
- 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.
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.
Building Your Own Custom Player To Support Multi-bitrate Streams
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
There are some tools that can test the packet loss and bitrate giving details on the network conditions.
- View the Media Stats from the hosted player.
- Visit https://rtctest.com or https://packetlosstest.com/ for WebRTC testing tools of a local network.
- Incorporate the dolbyio/web-webrtc-stats project into your custom applications for additional WebRTC diagnostics.
There are network limiter test tools that can help simulate conditions when trying to reproduce a problem.
Updated about 1 month ago