August 14, 2017

Setting UDT in Nimble Streamer

UDP-based Data Transfer Protocol (UDT) is a high-performance data transfer protocol designed for transferring large amounts of data over high-speed wide area networks.

UDT is designed for extremely high speed networks and it has been used to support global data transfer of terabyte sized data sets. Concurrent UDT flows can share the available bandwidth fairly, while UDT also leaves enough bandwidth for TCP.

Nimble Streamer has full support for UDT:
  • Both Push and Listen delivery modes are supported.
  • Both Listen and Pull receive modes can be used to get UDT streams for further processing.
  • Rendezvous mode for sending and receiving is supported.
  • Multiple streams can be sent via single UDT channel.
  • Mux rate can be set correctly - Nimble Streamer has 100% PCR accuracy, 0ns PCR drift and PCR interval <20 ms according to StreamGuru. This is typically used for precise testing of channel throughput.
Using Nimble Streamer transmuxing engine, you may create any supported live protocol output from UDT and receive any of them to create UDT.

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

Install UDT package


UDT is available through a 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 UDT package.
  3. Proceed with the setup for the scenarios you need: receive, send or rendezvous.

Set up UDT send


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

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

UDP settings page.

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

Adding new UDT channel transmission.

Set Protocol to UDT and and select Mode field may be set to either Push or Listen - those are the modes supported by UDT.

  • Push will initiate the active sending of the selected channel to the destination IP/Port regardless of the recipient state.
  • Listen will make Nimble Streamer connect to destination IP/Port and will wait for the Pull command from remote server.
IP and Port fields define the destination of your channel.

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 UDT channel will have multiple streams in it.

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

New setting is being applied.

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

Set up UDT receive


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

Add incoming stream


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

MPEG-TS settings page.

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

Adding UDT stream.

Select UDT from Protocol drop-down. 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.

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.

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

UDT setting is being synced.

So you 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 UDT channel may carry several streams.

Add outgoing stream


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 UDT stream, go to Nimble Streamer -> Live Streams menu, select the outgoing streams to see what your server now has to offer for playback.

Setting up Rendezvous mode



Rendezvous mode
 is an addition to the modes described above. It allows streaming over UDT 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.
The description below shows how you can set up the Rendezvous mode.

Sending in Rendezvous mode


To set up UDT 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 UDT send section above. Click on Add SRT/UDT setting button to see the dialog. there you need to choose Rendezvous from Mode drop-down list.

Add UDT Rendezvous setting.

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 UDT receive section above. Click on Add SRT/UDT stream to see the dialog below. Select Rendezvous from the Mode drop-down.

Adding UDT Rendezvous receiving setting.

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 UDT section.



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

The received UDT streams can be used in other live streaming capabilities as well as be used as input for Live Transcoder so you can build any content delivery scenarios with Nimble Streamer.


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


This software uses code of UDP protocol licensed under BSD license and its source and build script can be downloaded here.

2 comments:

  1. Between SRT and UDT? which one will work best for setting up a point to point streaming between nimble server?
    Thanks

    ReplyDelete
  2. We decided to provide all possible available options to our clients so you can check them all and decide which one work best to you.
    My bet is that SRT is better for live streaming delivery. But I'd recommend to test UDT as well to make sure it's correct assumption in your case. In case if we find new mpegts delivery method with appropriate license we will add it too. The idea is to provide all possible options for tests/production.

    ReplyDelete