Streaming

Sub Second Latency Streaming for Dolby.io Conferences

Streaming feed of woman speaking
SUMMARY

Improve your conference streaming experience by using Millicast to stream your Dolby.io Communications meetings with a low latency integration.


A few months ago, I wrote a blog post explaining how to live stream a conference to Millicast using RTMP. The latency using RTMP to Millicast is between 1 and 1.5 seconds. Since then, our engineering team has delivered an even faster way to integrate Millicast natively into our Dolby.io platform, as part of our Open Beta program. This blog post is about how to broadcast your Dolby.io conferences to a very large audience, across the world, with sub-second latency.

Configure Millicast for Low Latency Streaming

Log into your Millicast account and go to the Live Broadcast section of the dashboard.

From there, click the add button to create a new token. Millicast uses the notion of stream token to create an ingest endpoint for a low latency stream stream and broadcasting system.

Provide a label to easily identify the token. To make this example simpler, set NO RESTRICTION for the Secure viewer setting. Then click the OK button.

Now that you have created a token, click on it to access the settings.

Authentication

In order to start and stop the live stream, you will need to make REST API calls from your backend. Since each call to the REST API requires authentication, you must first request an access token from the API Token REST API. This API call is using our new Common Auth API. Please migrate your existing applications to the new API. Locate the Consumer Key and Consumer Secret from your Dolby.io dashboard and use the pair for the Authorization header of the HTTP call.

curl --request POST 
     --url https://api.dolby.io/v1/auth/token 
     --header 'Accept: application/json' 
     --header 'Authorization: Basic base64(CONSUMER_KEY + ":" + CONSUMER_SECRET)' 
     --header 'Cache-Control: no-cache' 
     --header 'Content-Type: application/x-www-form-urlencoded' 
     --data grant_type=client_credentials

The response to this call is a JWT token that contains the access token to use for all of the following REST API calls.

Start the low latency stream

The integration of Millicast into the Dolby.io platform is seamless. On the Millicast dashboard, go to the API tab to locate the information needed to start the live stream.

On this page, locate the STREAM NAME and the PUBLISHING TOKEN.

To start the live stream to the ingest endpoint, send a POST request to this Dolby.io REST API using the access token for authorization. The payload of this POST request is a JSON object that contains two properties which are called streamName and publishingToken with the values being the name of the stream and the publishing token provided by Millicast.

curl --request POST 
     --url https://comms.api.dolby.io/v2/conferences/mix/{conference_id}/rts/start 
     --header 'Accept: application/json' 
     --header 'Authorization: Bearer {ACCESS_TOKEN}' 
     --header 'Content-Type: application/json' 
     --data '{"streamName":"{stream_name}", "publishingToken":"{publishing_token}"}'

A few seconds after calling the API, you will be able to see the live stream starting using the hosted player from Millicast available at the URL listed under HOSTED PLAYER PATH.

To be informed in real time once the status of the low latency stream changes, your application can subscribe to the Stream.Rts.Status.Updated webhook event. When you receive this event, you can take action on what to do and what to present to your audience.

Stop the low latency stream

If you need to stop the low latency stream before the conference ends, call the following Dolby.io REST API:

curl --request POST 
     --url https://comms.api.dolby.io/v2/conferences/mix/{conference_id}/rts/stop 
     --header 'Accept: application/json' 
     --header 'Authorization: Bearer {ACCESS_TOKEN}' 
     --header 'Content-Type: application/json' 
     --data '{}'

Dolby.io REST API SDKs

We also provide SDKs for the REST APIs for your Node.JS and Python backend projects to make it easier to call the Dolby.io REST APIs.

Fabien Lavocat

Staff Solutions Engineer

Get Started

Deliver engaging experiences with unparalleled streaming solutions

We are more than just a streaming provider; we are a technology partner helping you build a streaming ecosystem that meets your goals.

Developer Resources

Explore learning paths and helpful resources as you begin development with Dolby.io.

Copy link
Powered by Social Snap