July 6, 2017

Setting SRT in Nimble Streamer

Secure Reliable Transport (SRT) is a transport technology that optimizes streaming performance across unpredictable networks. It's applied to contribution and distribution endpoints as part of a video stream workflow to deliver the best quality and lowest latency video at all times.

As audio/video packets are streamed from a source to a destination device, SRT detects and adapts to the real-time network conditions between the two endpoints. SRT helps compensate for jitter and bandwidth fluctuations due to congestion over noisy networks, such as the Internet. Its error recovery mechanism minimizes the packet loss typical of Internet connections. AES 128/256 bit encryption is also supported for end-to-end security, keeping your streams safe from prying eyes.

Our company, Softvelum LLC, became a member of SRT Alliance which is a group dedicated to managing and supporting the open source implementation of SRT. This alliance is accelerating interoperability of video streaming solutions and fostering collaboration with industry leaders to achieve lower latency Internet video transport. Softvelum is actively contributing to the community to improve the protocol and its ecosystem.

Nimble Streamer has full support for SRT:
  • Both Push (Caller) and Listen delivery modes are supported.
  • Both Listen and Pull receive modes can be used to get SRT streams for further processing.
  • Rendezvous mode for sending and receiving is supported.
  • Custom "latency" and "maxbw" parameters are supported for fine tuning.
  • Forward error correction filter support.
  • Multiple streams can be sent via single SRT channel.
  • Multiple Pull-mode clients can be supported when working in "Listen" mode, see section "Set up sending via SRT" section for details.
  • Deliver and receive SRT bonded streams with Nimble Streamer with libsrt 1.5.
  • AES 128 bit encryption provides stream security.
  • IPv4 and IPv6 support.
  • SRT playback stats and protection.
"streamid" parameters support: 
  • Nimble supports streamid in Push and Pull modes.
  • In addition, Nimble supports streamid in receiver Listen mode as part of SRT PASSet feature set.
  • Besides, RTMP-style SRT streamid in Listen mode for publisher is supported for easier output generation of live streams.

Using Nimble Streamer transmuxing engine, you may create any supported live protocol output from SRT, as well as receive any of them  to create SRT.

Let's see how SRT can be enabled and used in Nimble Streamer.

Besides reading this full guide you can take a look at these video tutorials:

Install SRT package


SRT is available via separate package for Nimble Streamer. You need to install it in order to use this protocol.
  1. Install Nimble Streamer or upgrade it to latest version.
  2. Follow this instruction to install SRT package. For macOS, use this Docker-based approach.
Now you may proceed with the setup. You may define both transmission and reception settings so Nimble Streamer could be used on both ends of delivery chain.

A. Set up sending via SRT 


Having any input via RTMP, RTSP, MPEG-TS or HLS, you may create outgoing SRT streams.

Go to Nimble Streamer -> Live streams settings menu. Click on UDP streaming tab.


Click on Add SRT setting button to see the following dialog for creating a new SRT channel.


IP and Port fields define the destination of your channel.

Mode field may be set to either PushListen or Rendezvous - those are the modes supported by SRT.

  • Push will initiate the active sending of the selected channel to the destination IP/Port regardless of the recipient state. This is also referred to as "Caller" mode.
  • Listen will make Nimble Streamer connect to destination IP/Port and will wait for the Pull command from remote server.
  • Rendezvous mode is described below.

Listen mode allows processing streamid using "RTMP style", e.g. obtain existing live streams available in Nimble Streamer using "app/stream" notation. Read this article for more details. 


Mux rate is typically used for precise testing of channel throughput. Read this article for all details regarding mux rate setup.

Source applications names, streams names and their respective PMT PIDs, Video PIDs and Audio PIDs describe where the content is taken from for further transmission. You may define multiple sources - in this case SRT channel will have multiple streams in it.

MPEGTS In Source option can be used If you'd like to stream some existing MPEGTS input intact without any transmuxing, like pass though PIDs, multiple tracks, subtitles or any metadata that is not supported by Nimble. Read this article for more details.

In addition to mandatory parameters you may specify custom parameters and their values.

Custom parameters


latency parameter can be defined in milliseconds. We recommend setting it not less than "120". If you don't specify, Nimble will use 120 by default as set in SRT library. This specified delay causes an extra "wasted time" if the packet reached the destination quickly (and therefore it's way ahead of "time to play"), but when it was lost, this gives it an extra time to recover the packet before its "time to play" comes.

maxbw parameter (measured in bytes per second) defines maximum bandwidth which is allowed to be used by a single outgoing stream. If the network connection is not stable enough then a lot of SRT packets will be re-transmitted within a period specified by latency. The more streams from same server are used in unstable network, the more packets are lost and need to be re-transmitted. As a result, entire network becomes utilized. If maxbw parameter is set then even if network conditions are bad, each stream will not consume more than it's allowed to.
So maxbw needs to include original stream bandwidth and possible re-transmission traffic. We highly recommend setting maxbw parameter to avoid excessive bandwidth usage. Please read this article for more details.
If you don't know the exact values of your expected bandwidth, please set maxbw to 0 to let the SRT library auto-select bandwidth efficiently and handle re-transmission of lost packets.

In general, we highly encourage using both "latency" and "maxbw" parameters. Please read this article for all details.

passphrase and pbkeylen parameters are available to enable encryption for processed streams. The passphrase must be at least 10 symbols long - this is your password. The pbkeylen may be set to 16, 24 or 32 with 16 used by default. If these parameters are set during the transmission, you need to re-start the stream in order for encryption parameters to apply. Same set of parameters and values must be defined for both sender and receiver parts.

local_ip and local_port parameters define which interface will be used for sending the stream in Push mode.

stream_id can also be specified in case your receiving side supports it.

Once you save the settings, they will be added to the list and will be synced with the server.


One-to-many multipoint listener


Multiple Pull-mode clients may request stream when Nimble Streamer provides SRT in "Listen" mode, like TechEx or mwEdge software. So in order to provide multiple streams in that case, you need to enable multipoint listener feature by adding this parameter into Nimble config:
srt_multipoint_listener_enabled = true
Read configuration parameters reference for more details about managing Nimble Streamer parameters.


Now you may receive content via SRT on your destination. As we already mentioned, Nimble can be used to receive the SRT streams so let's see how you can do that.

B. Set up receiving of SRT


Having SRT input, you may transmux it into  RTMP, RTSP, MPEG-TS, HLS, MPEG-DASH or even Icecast outgoing streams.

Add incoming stream


Go to Nimble Streamer -> Live streams settings menu. Click on MPEGTS In tab.


Click on Add SRT stream button to see the following dialog for creating a new incoming SRT channel.




Receive mode specifies the mode used for obtaining the stream.

  • Listen sets Nimble to wait for incoming data and process it as soon as it arrives. Your source needs to be set "Push" mode - see previous section.
  • Pull sets Nimble to initiate the source server to start sending the data. Your source needs to be set to Listen mode.
  • Rendezvous mode is described below.

IP Address and Port fields specify which interface will be used for connection.

Alias is the name that will be used in incoming streams list.

You should also use latency parameter, you also need to specify it in custom parameters. Read this article for get more details about this parameter usage.

Once you save the setting, it will be started for sync-up with your server.



You've specified incoming stream, now you need to add it to outgoing streams, like it's done for any other MPEG-TS streams. This needs to be done because each SRT channel may carry several streams. You may check Add outgoing stream checkbox to enter app and stream names to make it automatically.

Go to MPEGTS Out tab to see the list of outgoing streams. Click on Add outgoing stream.


Here you will define the names of applications and streams which will be used for playback and other use cases. You will select video and audio sources and if they have multiple streams in a single channel, then you'll select the required ones. Read this article for more details about adding outgoing streams.

To play the SRT stream, go to Nimble Streamer -> Live Streams menu, select the outgoing streams to see what your server now has to offer for playback.

C. Setting up Rendezvous mode


Rendezvous mode is an addition to the modes described above. It allows streaming over SRT in case if one of both sides of send-receive pair use firewalls.
Each side needs local and remote interfaces to be set up: Local IP with Local Port and Remote IP with Remote Port.

These interfaces are used for initiating the transmission and exchanging the data.

  • Sender side will send data to Receiver Local IP/port.
  • Receiver side will send data to Sender Local IP/port during initial negotiation.


You can refer to SRT Deployment Guide (the link will start download) to get more details about it.

The description below shows how you can set up the Rendezvous mode.

Sending in Rendezvous mode


To set up SRT sending you need to go to Nimble Streamer -> Live Streams Settings menu. You will see settings page, click on UDP streaming tab there. You will see a page similar to what you saw in Set up sending via SRT section above. Click on Add SRT setting button to see the dialog. there you need to choose Rendezvous from Mode dropdown list.


Here, a pair of 192.168.0.2 and its port is a Local interface of our server which is a source of a stream to send. The Remote pair is the destination.

Receiving in Rendezvous mode


Go to Nimble Streamer -> Live streams settings menu. Click on MPEGTS In tab to see a page similar to what you saw in Set up receiving of SRT section above. Click on Add SRT stream to see the dialog below. Select Rendezvous from the Mode drop-down.



Here, a pair of Remote IP and Port will point to a source of the stream, a pair of Local IP and Port will point to current receiver server. The rest of the setup is done the same way as in Set up receiving of SRT section.

That's it - your Nimble Streamer instance may now get live streams via SRT.

We keep improving this feature set, so let us know if you have any questions or concerns about it.

SRT Publisher Assistance Security Set


Nimble Streamer has flexible security and management feature set for SRT receiver Listen mode:
  • Accept streamid parameter with "application/stream" format.
  • Make per-application and per-stream authentication with user and password.
  • Apply any SRT parameters to each individual stream and even individual publisher.
  • Apply allow and deny lists for IP addresses on server and stream level.
  • Manage published streams via publish control framework.

Read more details in feature overview.


Related documentation





Follow us in social media to get updates about our new features and products: YouTubeTwitterFacebookLinkedInRedditTelegram

31 comments:

  1. Hi - this is great news!

    Currently looking to test. I updated according to the instructions above. Now have nimble server 3.2.5-1 + nimble-srt 1.0.0-1. Is there any activation process to get it to show SRT options in WMSpanel?

    Cheers!

    ReplyDelete
    Replies
    1. Hi,

      The UI will be deployed on Monday. Thanks for your patience.

      Delete
    2. RIP this weekend's show!

      But this is great to hear :) I'm looking forward to testing!

      Delete
    3. OK, it's now online - follow the instruction above to set it up. In case of questions, contact our engineers via https://wmspanel.com/help

      Delete
  2. Hi,
    thanks a lot for your interest! We will deploy UI in the Monday and you will be able to test new SRT transport.

    ReplyDelete
  3. Hello , I will be moving an h265 MPTS to be played from the destination network using brightsign players. Any recommendations ?

    Also hoping to use resberry pi for destination transmux device What demands on that hardware are expected with 4 audio pairs and 2 videos totaling 25 mbits ??

    I don't really expect the pie to work but version 3 is strong .... Thoughts ??

    ReplyDelete
  4. Hi,
    we don't support SRT for raspberry pi now so please consider linux/Windows for now

    ReplyDelete
  5. hello,
    Can I send an MPTS using SRT or is it required to be broken up into individual streams ?

    ReplyDelete
    Replies
    1. Thanks for great question!
      Nimble can send and get MPTS over SRT and we hope this ability will be very welcomed among our clients

      Delete
  6. does the windows install version of nimble streamer automatically include SRT functionality ?

    ReplyDelete
    Replies
    1. No, it's not included. You need to install it separately: https://wmspanel.com/nimble/srt_install#os_windows

      Delete
  7. please explain:

    source application name: what are valid choices, how do you KNOW they are valid names.

    SRT source IP : do you send the SRT to the IP of the remote device ? or the ip address of the device sending the SRT out

    can you retransmit an MPTS on the receiver sides network that was sent using SRT so that the MPTS released on the receiver sides network is identical to the original MPTS used to create the SRT transmitters source streams?

    in other words ....

    ENCODER--> MPTS--> SRT Transmit--> INTERNET--> Receive SRT--> MPTS--> network

    ReplyDelete
  8. MPTS on received network is not identical as Nimble receives and demuxes mpts and in case if you need to produce mpts on receiver you will have to use http://blog.wmspanel.com/2015/07/advanced-mpegts-delivery-udp-nimble-streamer.html

    i.e nimble receives mpts stream demux into several streams then combine into MPTS before sending to destination. Nimble will be send input MPTS stream without modifications. It will get input stream demux it and send MPTS stream produced by Nimble not original.

    ReplyDelete
  9. Can you please comment on the Source naming structure.

    ReplyDelete
    Replies
    1. That is any stream which is available in Nimble Streamer. Check Nimble Streamer -> Live Streams menu and go to Outgoing streams page.

      Delete
  10. This comment has been removed by a blog administrator.

    ReplyDelete
  11. one thing i learned about SRT and the whole nimble system in general is that you must have an output for everything.

    so when you have an MPEGTS udp input for example, you must create some output for it to be available for inclusion into an SRT stream.

    you can not just go from a nimble input directly to SRT, it must go to an nimble output to be included in an SRT Stream... or any stream for that matter.

    on the receive side, when you accept the SRT as an MPEGTS input, you must then send it to an MPEGTS output one for each program in the SRT stream

    you may then stream them out using the UDP streamer.

    ReplyDelete
    Replies
    1. Hello,

      You are right, you need to define outgoing stream for MPEGTS-based streaming. It's always set like that in Nimble just because there may be multiple programs inside of one MPEGTS stream. So to give capabilities our customers to generate any combination of output streams, we made it that way.
      Please refer to this article for more details: http://blog.wmspanel.com/2015/07/advanced-mpegts-delivery-udp-nimble-streamer.html

      Delete
  12. please someone managed to stream SRT from Teradek cube to nimble?
    Teradek with server mode disabled, Passphrase, Encryption Key Size
    Nimble in lissen, local ip to 127.0.0.1, Passphrase, Encryption Key Size
    Everything seems fine, but I can not start the stream.

    ReplyDelete
    Replies
    1. Hello,

      Please contact us via https://wmspanel.com/help so we could follow up with your server settings.

      Thank you.

      Delete
  13. Hi there, I have confusion regarding the IP & port in SRT setting & also in the Incoming Stream setting. Can I assume random port in SRT setting? And in Incoming Stream setting, which interface's IP & port I have to enter? Thank you.

    ReplyDelete
    Replies
    1. Hello.
      You can use any port in 1-65535 range, just make sure no other processes are using that UDP port, and certainly port must be the same on sender and receiver side. For incoming stream you should simply set IP 0.0.0.0 to listen on any interface, or set the same IP that was used on sender side.

      Delete
    2. This comment has been removed by a blog administrator.

      Delete
    3. Please use our helpdesk to post sensitive information like IP addresses: https://wmspanel.com/help
      I'm removing your comment to ensure your safety.

      Delete
  14. Thank you Denis for your answer! I was able to configure srt listen mode by putting the ip 0.0.0.0 and any port I want :)

    ReplyDelete
    Replies
    1. I need help in installing my SRT can you help me?

      Delete
    2. Please feel free to ask questions via https://wmspanel.com/help

      Delete
  15. Is SRT ready for a Mac server yet?

    ReplyDelete
    Replies
    1. We don't support it yet. Can you share your use case for SRT on Mac?

      Delete
  16. Hey, I tryed it with Larix Broadcaster to my own Pc on the Local but i get a delayy of about 8 Seconds how can i get that down ?

    ReplyDelete
    Replies
    1. You need to check output protocol settings. Also you can set "latency" parameter in Larix and in SRT settings of Larix.

      Delete

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.