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, 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 required parameters.

First require fields are IP ( in this case) and Port (e.g. 2015) for UDP stream. You may also specify TTL.

In case you need, you may specify Transport Stream ID and Original Network ID.

By clicking on Bind particular local interface you will open additional fields for Local IP and Local Port to bind.

Next you need to specify incoming streams to transmux to MPEG-TS UDP. Enter the name of Source application name and Source stream name; if you start entering existing streams, the UI will propose the autocomplete with those names. The UI will automatically assign PMT PID, Video PID and Audio PID to each stream.

As you enter new app/stream, the UI will add more lines to add more streams.

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.

SDT checkbox opens additional fields for defining Service Description Table, such as Program Number, Service Type, Provider Name and Service Name.

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 will appear 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.

Some useful parameters

You may use a few parameters in Nimble config to change the behavior of MPEGTS processing.

  • mpeg2ts_pat_pmt_msec_interval is a time to retransmit for PAT and PMT tables. By default it's 100 milliseconds.
  • mpeg2ts_pcr_retransmit_msec_interval is a time to retransmit PCR. By default it's 20 milliseconds.
  • mpeg2ts_sdt_msec_interval is a time to retransmit for PAT and PMT tables.
  • mpegts_join_timestamps_enabled - some encoders send their samples split by parts to other samples, and all those parts have the same timestamp. This option allows joining those parts to be processed as one sample. It works on receiving side for AVC and HEVC. It's false by default.

Using constant bitrate (CBR) and mux rate

When you stream from Nimble Streamer via UDP, a variable bitrate is used for output by default. However, in some cases of using DVB/ATSC and other hardware, a lot of ETR101290, CC and PCR errors appear on a regular basis making it hard to use it.

That happens because of large spikes of data which can be seen on this screenshot.

However, using constant bitrate (CBR) you can flatten the bandwidth to pictures like this  one.

Read Constant bitrate and mux rate in UDP streaming article to find out more about this technique.

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.


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.

That's it. For more information about setting up incoming and outgoing HTTP MPEG-TS streams, please refer to "Transmux MPEG-TS into HLS, RTMP, MPEG-DASH and more via Nimble Streamer" article.

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

Related documentation


  1. hello,

    when i add multiple streams to a MPTS i can not see or access them with VLC or with a set top box

    1. Hello,

      Please contact our helpdesk with more details about this stream so our engineers could check and help you: https://wmspanel.com/help


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.