November 30, 2018

Using Amazon CloudFront for SLDP delivery

Live streaming is growing these days and a lot of its use cases require sub-second delay between image capture and its display on user's device.
That includes online chatting, betting and bidding, gaming, security and surveillance - all of them demand real-time picture to make the immediate response.

With the decline of Flash and RTMP as the main way to view live streams, the industry has been looking for new ways to deliver the media close to real-time.

Softvelum has developed SLDP, a last-mile delivery protocol for end-user devices to cover real-time demand. It's key features are:

  • Up to two-seconds delay between origin and player.
  • Multiple codecs support: it can deliver whatever your end-user platform can play, e.g. H.264, VP8, VP9, H.265/HEVC.
  • Adaptive bitrate support for delivering multiple resolutions and qualities.

Nimble Streamer software media server has full support for SLDP and its features. You can read this article to check how Nimble Streamer may take incoming live streams and produce SLDP based on that input.
SLDP playback is supported by SLDP Player. On Android and iOS, it's a native mobile application, while browser payback is covered by HTML5 JavaScript player working in any MSE- and MMS-enabled browser. All three players can be customized via respective SDKs.

Amazon CloudFront setup

SLDP is a streaming protocol based on WebSockets so it can be delivered via both HTTP and HTTPS on top of TCP.  This makes SLDP pervasive across any networks, including CDNs which support WebSockets.

Recently Amazon CloudFront announced full support for WebSockets. This allows AWS users to use all benefits of this delivery network to get all benefits of SLDP live streaming. If you're not yet familiar with AWS CloudFront, please check this page to get started.
CloudFront WebSockets setup is easy and seamless - you can complete it within a few minutes. In our example below we assume you will use domain for accessing your media streams. We'll add it into distribution settings and then use for further playback.

Notice that CloudFront does not cache WebSockets traffic. It serves only as a network for an optimal delivery.

Go to your AWS Management Console and find CloudFront in AWS services.

Find CloudFront service

You will be redirected to CloudFront Distributions control page.

CloudFront Distributions list

Here you need to click on Create Distribution button to proceed. You will be brought to Step 1 to select your delivery method for your content.

Click on Get started for Web delivery method.

You will need Web method so just click on Get started button. You will go to Step 2 to enter details.

Enter your domain.

This page has a lot of delivery parameters. However, with SLDP you don't need any of that except for Origin Domain Name field. Here you need to enter the domain name which you will map output stream to. In our example it's "" as mentioned previously. Your Origin ID will be generated automatically. You may also specify custom ports of origin server if you need to.

Now scroll down to the bottom of the page.

Create distribution.

Click on Create Distribution button to complete the process. You will then be taken back to distributions list.

Distribution is ready.
CloudFront will take some time to propagate setting across their network, but it won't take a few seconds. Once it's done, copy the Domain Name field value. In our example it's

SLDP playback

Now CloudFront will take all requests from your viewers and take then to your Nimble Streamer instance.

So now all you need is to set up SLDP output from Nimble Streamer in case you haven't done this yet. Read more about how you can take input from various protocols with Open Broadcaster Studio, Larix Broadcaster and Haivision encoders as examples.

Once you have your SLDP ready, its full playback URL will be like
Here "x.x.x.x" is your IP address and you can replace app name and stream name with your values. Then you map your IP to your origin domain name used in CloudFront settings. This will be like
Since you've created a distribution in CloudFront, your stream will be available using these final URLs:
The "ws://" prefix is for HTTP and "wss://" is for HTTPS.
You can use these URLs in any of your SLDP players. Your stream will be seamlessly delivered via CloudFront CDN.

Further steps

Now when you've set up low latency transmission, you can try fine-tuning it.

Key frame interval is the first option you could try, it affects the start-up time for a stream as well as switch time for adaptive bitrate stream. The less key frame interval is, the sooner a player will start the playback. Key frame interval is defined in encoder. Here's an example of how key frame interval and alignment can be set in Nimble Live Transcoder.

If you use our free HTML5 SLDP player parameters you may try playing with offset parameter to see how it works in your conditions with your key frame interval. Read this article for more details.

You may also find our SLDP FAQ useful. It clarifies some questions that our customers face when they try SLDP.

If you have further questions regarding SLDP or any other Softvelum technology, please contact us.

Related documentation

SLDP protocol, Nimble Streamer, SLDP setup in Nimble Streamer, Getting started with CloudFront

No comments:

Post a Comment

If you face any specific issue or want to ask some question to our team,

This will give much faster and precise response.
Thank you.

Note: Only a member of this blog may post a comment.