July 26, 2015

Advanced MPEG-TS delivery over UDP via Nimble Streamer

There is wide range of tasks associated with streaming of media content in MPEG-TS over UDP in corporate networks. Nimble Streamer is capable of transmitting stream to multicast network, DVR Storage, transcoder or presentation monitor.

MPEG-TS over UDP multicast via Nimble Streamer

In some cases it is necessary to transmit multiple programs in a single MPEG-TS stream. This activity is often related to private networks (hotel, enterprise), when using a hardware decoder that supports only MPEG-TS as input.

Packing multiple RTMP, RTSP or MPEG-TS streams to single MPEG-TS UDP stream.

The distinction of Nimble Streamer is the ability to transmux up to 256 RTMP, RTSP and MPEG-TS streams into single multi-program MPEG-TS UDP stream. For each incoming stream the unique PMT PID, Video PID and Audio PID values are assigned. You can take RTMP, RTSP and MPEG-TS streams from any sources, transmux them into a single UDP MPEG-TS stream and transmit via multicast.

To use this functionality in your workflow you need to install and configure Nimble Streamer.

How to install Nimble Streamer


Use this instruction to install Nimble Streamer on your operating system. Or read this article to see the example of installation Nimble Streamer on Ubuntu virtual machine.

Setting up


Login to WMSPanel, go to "Nimble Streamer" -> "Live streams settings".

First of all, you should specify Nimble Streamer incoming RTMP, RTSP and MPEG-TS streams. Go to the "Interfaces" tab on the left side (see screenshot below).


Click on «Add RTMP Interface».


In the window that appears, enter IP-address of an interface that Nimble has direct access to (for example, 127.0.0.1) and port number (default port for RTMP is 1935, but you can specify any free port number). To process stream on any available IP-address - leave the "IP Address" field blank. You can also change the default port, but you have to ensure that RTMP source publishes stream to this port.

If you want to add RTSP network interface click on «Add RTSP Interface» button.


Settings for RTSP are defined similarly to RTMP.

Once the settings are specified for all incoming RTMP and RTSP interfaces, they all appear in the list:


Go to the "UDP streaming" tab to set up outgoing UDP stream.


Push the «Add UDP setting» button and specify



IP (127.0.0.1 in this case) and Port (e.g. 2015) for UDP stream. Next you need to specify incoming streams to transmux to MPEG-TS UDP (in this case interface prompts you to select from a list of incoming streams and automatically assigns PMT PID, Video PID and Audio PID to each stream). To add more streams you need to click on the "Add source" link in the "UDP SETTING" dialog.



Parameters PMT PID, Video PID and Audio PID are set automatically for each stream. It is possible to assign these numbers manually, but you must be aware of allowed values. If any stream stops broadcasting, it is excluded from outgoing UDP stream, while the remaining stream numbers stay the same. If you add another incoming stream to existing streams, it will also get appropriate PIDs automatically. So, this feature keeps you worry-free about the whole UDP streaming gets terminated when one or more incoming streams are removed or added.

As it was mentioned before, web interface allows to add up to 256 source streams for further transmuxing into single outgoing MPEG-TS UDP stream. Pragmatic constraints depend on media server performance and bandwidth.

How to test it


You should already have one or several RTMP, RTSP or MPEG-TS streams. For example, you have three streams: stream_low, stream_mid, stream_high.

As these streams are set up, they can be combined into singe outgoing MPEG-TS UDP stream in the "UDP streaming" tab.


Resulting UDP stream appears in the list.


To test UDP streaming open "MPEGTS In" tab ("MPEGTS In" -> "Add UDP stream")


and then specify your UDP stream as a source.


After adding incoming UDP stream, it should appear in the list:


First you see yellow "pending" box, and then after few seconds it becomes green (online).


In the "MPEGTS Out" tab ("MPEGTS Out" -> "Add outgoing stream")


you can choose separate streams by Video PID and Audio PID from your MPEG-TS UDP stream for further streaming.
  

You can combine Audio PID and Video PID from different PMT PID. 
Resulting streams will be displayed in the list.
   

After a few seconds all streams become green (synced).

Now if you go to "Nimble Streamer" -> "Live streams" -> "Outgoing streams", you can see, that all your streams are online.



Troubleshooting


It you've set up your UDP streaming according the instructions above and still don't get the stream, check the following cases which might help.

1. TTL

Try increasing TTL for your interface. Make sure it's not less then hop count between your source and your server. You can refer to TTL and Hop articles for more details.

2. Interfaces routing

If your server has 2 or more interfaces that work with different networks, you may need to set up correct routing to properly use them. You can refer to this article for some examples.

3. Mux rate

In some cases of DVB/ATSC hardware you may need to set up mux rate correctly in order to process incoming stream. To specify parameters, click on "Mux rate" checkbox in UDP settings as shown below.

Setting mux rate for UDP 

Nimble Streamer has PCR accuracy of 100%. While hardware receivers accept up to 500ns PCR drift, Nimble Streamer produces PCR with 0ns drift. Also, PCR interval is <20 ms while 40ms is acceptable by most hardware. All these values were checked using StreamGuru.


That's it. For more information about setting up incoming and outgoing MPEG-TS streams, please refer to "Transmux MPEG-TS into HLS, RTMP, MPEG-DASH and more via Nimble Streamer" article.
Besides traditional WMSPanel web UI you may use WMSPanel API to control MPEG-TS streaming behavior. See our API reference for details.

If you have any questions about installing and configuring Nimble Streamer, please contact us.

Related documentation


No comments:

Post a Comment