OBS

Using OBS to publish to Dolby.io Real-time Streaming

Open Broadcaster Software (OBS) is a free open-source software created for broadcasting and recording on your desktop. You can take advantage of this tool to stream high-quality video to your viewers in real time using the Dolby.io Real-time Streaming service.

This guide presents a number of different ways to leverage Dolby.io and OBS to broadcast high-quality, low-delay streams:

See the official obsproject.com documentation for installation instructions and additional support.

WebRTC with OBS

WebRTC streams allow for low-latency high-quality broadcasts with can scale to global audiences with Dolby.io. At the moment, to use OBS with WebRTC, you must use a modified version that has been extended to interface with the Dolby.io Real-time Streaming servers. You can download the latest version from our repository HERE.

Once downloaded, go to the OBS settings panel and click to open it.

204

From the "Controls" menu click on the "Settings" button which will open the settings panel. From here, click on the "Stream" option. Then from the "Stream Type" dropdown, select "Millicast WebRTC Streaming Platform".

1888

To stream, you require a Dolby.io token which provides you with a "Stream Name" and a "Publishing Token". To access this information, go to the Publish Tokens list in the Live Broadcast section of the Dolby.io dashboard and either create a new token or choose an existing one.

1590

Open the management view by clicking the settings button from the items quick action menu. This will open the settings panel, within this panel click on the API tab.

1296

👍

Learn more about the Dolby.io Dashboard

To learn more about the dashboard explore About the Dashboard.

Copy the stream name, and the publishing token and add them to the corresponding fields in OBS.

1892

Click OK to accept the change. With the streaming credentials set up, you can check your mic and camera or share your screen and begin a broadcast.

695

To view and/or share your live broadcast, simply go to the playback panel of your chosen token in the Dolby.io dashboard and copy the Hosted Player Path link. You can share this path or paste it into a browser to view your stream.

SRT with OBS

Streaming with the SRT protocol requires OBS Studio version 25.0 or newer. You can download the client here: https://obsproject.com/download.

Once you have downloaded OBS Studio you can get the required SRT details from the Dolby.io dashboard. To learn how to do this follow our Using Secure Reliable Transport (SRT) to publish to Dolby.io Real-time Streaming document.

To begin, first download and install OBS Studio on your PC or Mac. Then go to the OBS settings panel and click to open it.

204

From the controls menu, click on the settings button to open the settings panel, and click the streams option. Then, from the stream type dropdown, select custom.

983

Fill the Server input field with the SRT publish URL from the dashboard.

To access the SRT publish URL, go to the publish tokens list in the live broadcast section of the Dolby.io dashboard.

If you have not created a token for publishing yet, follow the instructions here.

Each token item has a quick action menu that gives you options for easy access.

1590

To learn about the action menu in detail see Using the Quick Action Menu in the How to Broadcast page.

Open the management view by clicking the settings button from the items quick action menu. This will open the settings panel, within this panel click on the publishing tab.

323

Copy the SRT publish URL from this page into the server field of the OBS stream settings page.
Click OK to accept the change, check your mic and camera, and start your broadcast.

To playback your live broadcast, go to the same manage token panel and copy the hosted player path link. You can share this path, or paste it in a browser to view your stream.

RTMP with OBS

RTMP with OBS is already a standard feature in the original OBS studio version. You can download the client here: https://obsproject.com/download.

Note: Using the RTMP feature may add some additional latency to the output.

Once you have downloaded OBS Studio you can get the required RTMP paths from the Dolby.io dashboard. To learn how to do this follow our RTMP with Dolby.io Real-time Streaming document.

Broadcasting surround sound with OBS

Dolby.io streaming supports delivering up to 8 audio channels enabling surround sound. The audio channels can be surround sound channels or more general multichannel ones. Dolby.io in-browser viewer will support the playback of surround sounds.

Setup

To get started make sure you have OBS installed on your device. Once installed head to settings then audio. Select a channel different from mono or stereo in the channels list in general. Click OK on the warning pop-up and restart OBS.

Next switch to output and select advanced for output mode. Select the audio tab and pick a large bitrate. By default, OBS-Studio selects 160 kbps for stereo. This is insufficient for surround sound. As a rule of thumb, 64 kbps multiplied by the number of channels should be an appropriate amount of bandwidth.

Interfacing with a DAW

Digital Audio Workstations or DAWs are used to manage media tracks as inputs for OBS studio. You need to download and install one and assign it as an input source for the audio on OBS.

Windows

  1. SAR (requires having an ASIO driver, for instance, ASIO4ALL if you do not own an ASIO card). Reroute (from Reaper, with up to 256 channels) if using the ASIO plugin
  2. Voicemeeter (Excellent guide here by Jack0r for Voicemeeter Banana)
  3. Virtual Audio Cable (requires v.4.50 or later).

MacOS

A few available options for MAC:

  1. Soundflower
  2. Jack server
  3. Loopback

Ambisonics

If you have an Ambisonic it is also possible to publish spatial audio using the same setup. Here for the demo a Zoom H3-VR can be used. Set for Dolby.io OBS WebRTC is the same as 5.1 and with Zoom mic you will see for channels to capture and stream to your surround sound set up.

Properly set up for 4-channel ambisonics. This can be paired with a 360 camera.

Playback

Windows

Set up requires proper sound settings enabled on your speakers. The setup shown is on a Vizio 5.1.2 Atmos sound bar.

On your Windows make sure you are using Chrome browser for your viewer.

Mac

Surround sound playback should be enabled by default on your Mac. You can listen to the stream in-browser or via the Dolby.io Stream Monitor app can be installed for free on your iPad or AppleTV.

Using Simulcast with OBS

Simulcast is a mechanism for distributing streaming content with variations that are optimized for viewers who are under different network conditions or device resolutions.

For more background, review the Simulcast guide.

Simulcast WebRTC with WHIP

After installing Dolby.io's WebRTC version of OBS, add your stream name and token from your Dolby.io Real-time Streaming token into OBS's settings. Select either H.264 or VP8 for the codec as Simulcast only works for those two codecs. Click on the advanced settings button and check the Simulcast box to enable the feature inside OBS. Finally, apply the changes.

Next, we are going to set the output settings in OBS to see the different video qualities. Under stream, click on output and set the output mode to advanced. Set the encoder to NVIDIA NVENC H.264 (if available). Next, change the rate control to CBR (Constant Bitrate), and modify the bitrate to 6000 Kbps.

Next, set the Base Resolution and your Output Resolution to be matching. Apply all changes, and you are now ready to start your stream.

Simulcast both WebRTC and RTMP contributing sources

You can share your real-time stream using OBS-WebRTC while streaming to multiple destinations with RTMP and Restream.io.

To begin, install the obs-multi-rtmp plugin. This is a plugin for streaming to multiple RTMP servers concurrently, enabling the sharing of encoders with the main output of OBS. The plugin can also use standalone encoders with basic configuration (bitrate).

Install the plugin on Windows

  1. Download the latest release from OBS-Multi-RTMP.
  2. Unzip the zip file and extract it into the OBS folder.
    OBS Studio C:\\Program Files\\obs studio
    OBS WebRTC default location. C:\\Program Files\\OBS WebRTC (64bit)\\obs-plugins

You should see the following obs-multi-rtmp.dll in your plugins folder.

Once you have the obs-multi-rtmp.dll in your C:\\Program Files\\OBS WebRTC (64bit)\\obs-plugins folder, you can start OBS.

When you open OBS-WebRTC now, you will see the ability to add multiple RTMP targets.

Install the plugin on macOS

🚧

Matching Versions

For the macOs version, the plugin can be found here. The plugin's version needs to match the OBS-WebRTC's version.

  1. For this setup, download the ZIP file and unpack it. Copy the obs-multi-rtmp.plugin.
  2. Next, go to Applications, right-click on OBS-WebRTC, and select show package content.
  3. Inside go to Contents > PlugIns and paste within the folder's content.
  4. Open OBS-WebRTC, and on the top menu bar, under docks, multiple output will be checked off.

Adding stream targets

Building off from simulcasting WebRTC on OBS-WebRTC, connect OBS-WebRTC to Dolby.io Real-Time Streaming via Settings and set up a WebRTC output.

Next, go to the multiple output dock. If it is not showing up on your OBS, visit the dock menu at the top and reset it. Enable the multiple output option. Click on Add new target to create an RTMP destination.

When it comes to Simulcast, you will need adequate bandwidth to stream to multiple destinations. To save bandwidth, we are only going to send one additional stream to Restream.io. Restream is a live-streaming solution that allows for the distribution of content across multiple channels. This will allow us to send your stream to multiple RTMP destinations.

Therefore, create a Restream.io account and copy the RTMP URL as well as the Stream key from your account.

Then, go back into OBS-WebRTC and fill out the streaming settings for the new stream target. Paste the RTMP server and key from Restream.io. To have Simulcast work, we need a high enough bitrate which other versions can branch off from. Under video settings, enable the encoder most compatible with your development environment, e.g. Windows - NVIDIA NVENC H.264, MacOS - x264. Change the bitrate to 6000 kbps and the keyframe Interval to 2 seconds.

This will be sending a 1080p stream at 6000kbps to Restream.io and 3500kbps to Dolby.io's viewer.

To send the RTMP stream, we will need to use the audio settings option to encode the OPUS audio to AAC, meaning that the encoder needs to be changed to FFmpeg Default AAC Encoder. To have the stream be synced when OBS starts streaming, check the box for sync start with OBS at the bottom.

Start publishing

Now, start streaming inside OBS-WebRTC, and you will see both Restream.io (RTMP) and Dolby.io (WebRTC) streams up and running. The image shows OBS-WebRTC with the Dolby.io viewer stream in sync. The Restream.io stream will have added latency depending on the services selected.

Simulcast RTMP multi-bitrate on OBS-WebRTC

We are continuing with the knowledge from the previous two steps: Simulcast in WebRTC only and Simulcast Multiple Sources.

Dolby.io Real-time Streaming enables users to stream RTMP Multi-Bitrate (MBR) for delivery via WebRTC Simulcast. This gives the broadcaster the ability to use their RTMP encoder to control their RTMP multi-bitrate renditions and provide adaptive bitrate delivery in the web player using WebRTC Simulcast.

❗️

Requirements

OBS-WebRTC and the obs-multi-rtmp plugin will be needed. Follow the instructions depending on your development environment: Windows or MacOS.

Adding stream targets

📘

Enable multisource on your publish token

Make sure you have enabled multisource on your publish token. For more information explore the Multisource guide.

Open up a new stream target on themultiple output panel and input the RTMP details from Dolby.io, including the RTMP key following this format:

{StreamName}?token={Token}&sourceId={number of source}&simulcastId

Example: livename?token=UIGfw2aMkC6AVssda2dacSzMkxGFtLOk&sourceId=1&simulcastId

The information for this will be found under the publishing tab on the publish token's management page. The sourceId must be numbered 1-3 with simulcastId enabled. For more information on how RTMP works, see this guide.

Here is example using 3 bitrates (1080p, 720p, 360p) as inputs using the obs-multi-rtmp plugin:

RTMP 1
Name1080p
RTMP Serverrtmp://live-rtmp-pub.millicast.com:1935/v2/pub/
RTMP Key{StreamName}?token={Token}&sourceId=1&simulcastId
Encoderx264 or nvenc
Resolution1920x1080
Bitrate6000kbps
Keyframe2
BFrames0
RTMP 2
Name720p
RTMP Serverrtmp://live-rtmp-pub.millicast.com:1935/v2/pub/
RTMP Key{StreamName}?token={Token}&sourceId=2&simulcastId&videoOnly
Encoderx264 or nvenc
Resolution1280x720
Bitrate2000kbps
Keyframe2
BFrames0
RTMP 2
Name360p
RTMP Serverrtmp://live-rtmp-pub.millicast.com:1935/v2/pub/
RTMP Key{StreamName}?token={Token}&sourceId=3&simulcastId&videoOnly
Encoderx264 or nvenc
Resolution640x360
Bitrate500kbps
Keyframe2
BFrames0

Start publishing

Click the start button for each target.

Please note that you may need to click start streaming in OBS to update the current configuration, then click stop streaming and return to the multiple output panel. When you click start streaming again, the config will be updated, and the RTMP MBR renditions will stream to Dolby.io Real-time Streaming CDN.

The Millicast player will support the RTMP MBR sources using WebRTC Simulcast in the web browser: