May 30, 2017

Using SLDP with Nimble Streamer

Recently we introduced new real-time low latency protocol called SLDP. It allows sub-second delay for live streaming delivery for the cases when it's truly important.

From the setup perspective it's just another output protocol from the list of supported once which you can see on our live streaming digest page.
However, let's see how it can be added to your streaming scenarios based on Nimble Streamer, step-by-step.

1. Install or upgrade Nimble Streamer


The installation is simple, please follow installation page to get a working instance. If you have old Nimble version, please upgrade it..

This also assumes that you have an active WMSPanel account where you've logged in successfully.

2. Incoming streams


Nimble Streamer can take input streams via RTMP, RTSP, MPEG-TS, SRT, Icecast and HLS. Let's see basic ways of getting live streams by publishing RTMP from Open Broadcaster Studio, RTSP from Larix Broadcaster and SRT from SRT-enabled encoder.

Once the settings are compete, you need to set streaming settings in Nimble Streamer, check section 3 for details.

2.a Publish RTMP from Open Broadcaster Studio


Customers who use RTMP publishing, typically want to use authorization. Nimble Streamer supports only URL authorizations for RTMP (due to patent restrictions), which means credentials will be included in connection string in a certain way.

The URL will look like this:
rtmp://server_name:1935/application_name/stream_name
In Open Broadcaster Studio you need to do this:
  1. Go to Settings -> Stream.
  2. Choose Streaming Type: Custom Streaming Server.
  3. Fill the URL as: rtmp://<server_name>:1935/<application_name>
  4. Fill the Stream key with your stream name.
  5. Click on Use authentication checkbox and when you see additional fields, just add login and password information there.

Server name will have either IP address or domain name you chose to use. Port can be set to a different value other than 1935 - this can be defined in Nimble Streamer settings.

Here's an example of parameters in OBS.



This example sets up URL for application called live_app and stream name called live_stream.

2.b Publish RTSP from Larix Broadcaster


Larix Broadcaster free mobile application allows streaming from Android, iOS and WinMobile devices, it supports RTMP, RTSP and SRT transport protocols.

Here's an example of RTSP setup.

Install the app using one of the links here, then open it and click on gear icon to enter Settings window. Tap on Connections and then New connection menu to open new connection settings dialog.

The connection string will look like this:
rtsp://server_name:1937/<app_name>/<stream_name>
Publishing credentials are added in separate fields. Check the screenshot below to see an example:


Once you save connection settings, you'll be able to start streaming.

If you use other software and need RTSP credentials in your connection string, you can insert them like this:
rtsp://login:password@server_name:1937/<app_name>/<stream_name>
This will pass the required credentials.

2.c Push SRT from Haivision encoder


SRT is a low latency UDP-based transport technology that optimizes streaming performance across unpredictable networks. Nimble Streamer has full support for SRT and is able to take SRT input from any devices or software which supports this protocol.

Reliable Low Latency Delivery with SRT+SLDP guest post in Haivision blog gives example of setting up SRT delivery to Nimble Streamer, including further playback setup.

3. Setting Nimble Streamer


3.a Set up RTMP and RTSP input


From Nimble Streamer control perspective, SLDP is just another output protocol which needs to be enabled either for entire server or for specific application.

Notice that if you use published RTMP or announced RTSP as a source, you will need to re-publish the stream after enabling the protocol. Any newly applied protocol is enabled only when on the stream's start.

Click on Nimble Streamer -> Live Streams Settings menu. You will see Global tab for server-wise settings.


If you define only global settings, you will be able to bring any RTMP or RTSP input streams to your Nimble Streamer instance. Nimble will produce output streams according to applications and streams names - see section 4 below. If you specify values for Push login and Push password fields.

To enabled SLDP output for streaming output, click on Softvelum Low Delay and save settings to enable SLDP output.

You can also click on Applications tab to define specific settings for different applications in case you'd like to separate streams by some criteria.



Click on edit icon to see app details dialog.



Check Softvelum Low Delay and save settings to enable it for this particular application.
As we noticed earlier, you need to re-publish the stream after enabling the protocol if it uses a publishing source.

Another important step is to define interfaces to be used for processing the input streams, e.g. addresses and ports. In our examples in Section 2 we used port 1935 for RTMP and 1937 for RTSP.

Go to Interfaces tab and click on Add RTMP interface and Add RTSP interface buttons to set pairs of IP addresses and ports. If you don't specify IP, it will be mapped to all addresses available for current server.


Here you can see 2 interfaces added for both protocols.

3.b SRT input setup


If you use SRT input, you should refer to this article or guest blog post for more details. It needs different approach to defining input and output.

3.c Setting ABR


SLDP supports adaptive bitrate and it needs to be set up before any usage. If you have multiple bitrates of the same stream, you will be able to group them into ABR streams. If you have just a single input, you'll use Live Transcoder to create multiple resolutions.

Read this article to see all the details.

3.d Other features


Nimble Streamer Paywall feature set supports SLDP just as all other protocols. So if you apply geo-location block to some application, its SLDP streams will be blocked properly, the same is valid for other blocking features.

If you create hotlink protection rule, you will need to select SLDP to protect it from re-streaming.


Also, check playback session authorization which allows using external handler to process incoming connections according to your business logic.

4. Play SLDP


4.a Basic playback


SLDP is available for playback in our players on HTML5 web pages, in Android and iOS (both iPad and iPhone).
The link will be similar to other URLs
ws://server_name/app/stream
To see a sample URL, click on Nimble Streamer -> Live Streams menu, select proper server and then click on Outgoing streams area to see all produced streams.


Then click on question mark to see Sample URL for Player dialog.


It will include full URL of stream and also a sample code for HTML5 SLDP player.

As mentioned above, you can play it in Android and iOS applications in addition to HTML5 player. You may also want to build your own apps with respective SDKs.

4.b ABR streaming


SLDP supports adaptive bitrate streaming, so both Nimble Streamer and our web player has full support for ABR.

ABR setup is described in this article so follow its instructions to create proper streams. Please also take a look at SLDP real-time ABR feature review.

4.c Using SSL connection


SLDP can be secured with SSL and it's set up the same way as other HTTP protocols which Nimble Streamer supports. Read this article for all details regarding the setup.

The output URL for SSL connection will start with wss:// prefix, e.g. wss://server_name/app/stream.

4.d Synchronized playback


Synchronized playback can be performed using SLDP on multiple devices with HTML5 player and Larix Player for iOS.

4.e Closed captioning


CEA-608/708 subtitles are supported in SLDP using HTML5 Player premium SDK.


Useful articles


Take a look at the answers for frequent questions to improve your SLDP usage.
Also, please read Reliable Low Latency Delivery with SRT+SLDP post in Haivision blog describing a combination of both protocols for building reliable delivery networks.

Check Opus audio support in SLDP and Play audio-only SLDP with Opus on iPhone articles as well.

Please visit SLDP website and contact us in case of any questions.

Related documentation


No comments:

Post a Comment

If you face any specific issue or want to ask some question to our team,
PLEASE USE OUR HELPDESK

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

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