June 4, 2015

Transmux MPEG-TS into HLS, RTMP, MPEG-DASH and more via Nimble Streamer

MPEG2-TS is one of the most popular streaming protocols used by various types of businesses. It supports several streams types and allows carrying multiple programs within one stream. This is why Nimble Streamer had support for transmuxing MPEG-TS into HLS streams for a long time.

Now it's time to step forward and improve MPEG2-TS feature set with a few great capabilities.

Nimble is able to take MPEG2TS incoming stream via both UDP and HTTP. It transmuxes (i.e. re-packages) streams from either of sources into:

Examples of scenarios for MPEG2-TS streaming via Nimble Streamer.

Supported video formats are MPEG1, MPEG2, MPEG4 and AVC. Supported audio formats are MP3 and AAC. For the outgoing streams protocols that don't support these formats, only the respective subset is used for transmuxing.

The outgoing streams generated from MPEG-TS may be used in adaptive bitrate (ABR) streams produced from other protocols like RTMP and RTSP.

Let's see how it can be set up and used via WMSPanel.

1. Install Nimble Streamer

Use this installation instruction to get Nimble on your server or desktop. Or ask us to install it for you, we can do it free of charge.

To take MPEG-TS streams for transmuxing, you need to specify their sources. After that Nimble will pick them up and start producing streams for immediate use.

Go to Nimble Streamer -> Live Streams Settings menu to see live streaming setup page.

2. MPEG2-TS incoming streams

First thing you will see is the global settings. Here you need to select what output protocols will be generated by default.

You may also go to Applications tab and define the settings specific to some output application name.

Now you need to specify is the incoming stream. Go to MPEG2TS In tab to see available options for adding UDP and HTTP streams.

Defining incoming MPEG2TS streams.
Let's add HTTP stream as example. Click on Add HTTP stream to see the following dialog.

Adding MPEG2TS HTTP stream.
Saving the information will create an incoming stream for further use.

Incoming MPEG2TS stream.

To add UDP stream setting, click on Add UDP stream to specify all the details.

BTW, if you see any artifacts when processing content via UDP, check this short article for resolution - Nimble allows increasing UDP buffer.

Now you may define what outgoing streams will be created from incoming streams.

3. MPEG2-TS outgoing streams

Click on MPEGTS Out tab to see an empty list of outgoing streams.

Click on Add outgoing stream to see the dialog which allows creating a stream.

Outgoing MPEG2TS stream parameters.
The following fields are used:
  • Application name and Stream name are the strings which will be used for outgoing streams URLs so you can set them according to your naming conventions.
  • Video source and video stream. This is where the video will be taken from for further mix. The source is the incoming stream defined in step 2. The stream can be selected from the drop down list based on the source information. If no information has been received yet, you may select "First video stream" to get whatever is transmitted. If the source has just one stream, it will be picked up by default with no special setup.
  • Audio source and audio stream works the same way as "Video source".

Outgoing MPEG2TS stream.

4. Streams usage

When you're finished with the setup, click on Nimble Streamer -> Live streams and click on the server name to see what we have now.

You'll see the list of incoming streams as received from media sources.

Clicking on Outgoing streams you will see the list of result streams ready for usage.

Besides their parameters, you can see the question mark icon. Clicking on it you will get Sample URL for player dialog showing all possible streams URL for further usage and also several sample players to test the stream.

Sample playback dialog.
You can select the stream name for further usage. The protocols used in drop down list are chosen from the global or per-application settings which you set up on step 2.

5. Adaptive bitrate setup

Having the MPEG-TS, RTMP or RTSP outgoing streams being set up, you may create adaptive bitrate streams output. Go to Adaptive stream area.

Now click on Add ABR setting.

Defining new ABR stream for single MPEG2TS streams.

Here you need first to specify ABR application name and ABR stream name which will be used for URLs of the streams.
After that you need to enter 1 or more sources by entering Source application name and Source stream name. You can add any number of sources so that it would be true adaptive stream.
Specify the streams sorting method: manual - as defined in list, by bandwidth - descending, by bandwidth - ascending.
This setting may be applied to any number of available servers - just select them from the list.

After saving the information you'll see new stream in the list.

You may also assign current server to existing ABR settings previously created for other servers by clicking on respective button above the page.

You may use our Live Transcoder for Nimble Streamer to create streams with multiple bitrates for ABR.

Now when the ABR stream is defined, you can click on question mar icon and view Sample URL for player dialog to test the streams and to get URL for further usage like you did at step 4 for single stream.

No just copy the URL or the player code and go ahead with using it on your website or application.

DVR - recording and playback

MPEG-TS may be recorded for further playback via HLS and MPEG-DASH using the DVR feature set. Read this article for setup details.

What's next

With outgoing single bitrate and adaptive bitrate streams you can use them for streaming scenarios of any complexity. E.g. besides playback, you can use those streams for streams aliasing, hotlink protection, RTMP republishing and more.

Besides traditional WMSPanel web UI you may use WMSPanel API to control MPEG-TS streaming behavior. See our API reference for details.

Contact us if you have any feedback or questions regarding Nimble Streamer functionality and usage.

No comments:

Post a Comment