December 27, 2016

Adding multiple audio tracks for ABR HLS live streams

Live streaming scenarios of Nimble Streamer include ABR (adaptive bitrate), it can be accomplished via HLS and MPEG-DASH.

Previously we introduced ability to use multiple separate video and audio tracks in same VOD stream. 

Now we've added multiple audio tracks support for live ABR streams. This allows assigning audio streams from any incoming source to ABR streams and define corresponding properties to each of them. Once such stream is defined, a player may provide the audio track selection in order to get proper audio stream.

Let's see how it's set up.

We assume you have all incoming video and audio streams being available before the ABR setup. You can check corresponding articles about RTMP, RTSP, MPEG-TS and Icecast to see all details regarding the setup process.
You can also use Live Transcoder to create multiple video renditions and make audio processing if needed.

In this article we assume you have 2 renditions of video and 2 separate audio streams, one for English and one for Spanish.

Go to Nimble Streamer -> Live Streams menu to see the streams overview page. There you need to select Adaptive stream tab to see the following page.

ABR streams page
Click on Add ABR setting to see the following dialog.



Set ABR stream parameters.

Here you first need to specify output ABR application and stream name to be used in URL.

Then you need to add sources to take video and audio from. As you see we've added 2 video sources and then 2 audio sources.

Each audio source has Audio only flag which defines that current stream will be used for audio track selection. Also each audio stream has track Name which will be used for display in player and also has Language field where you can specify 3-characters language code.

Default checkbox defines which stream will be taken for playback by default. Autoselect is used for selecting the track according to default language settings of the system. Please refer to HLS standard for more information regarding these 2 check boxes definition.

Now select which servers to apply this new ABR setting to and click on Save.


Once the details are synced up with the server, you will be able to click on question mark icon on the right of the stream and try to play it and to get the stream URL for further usage.

The resulting HLS playlist would be as follows.

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",LANGUAGE="eng",DEFAULT="YES",AUTOSELECT="YES",NAME="English",URI="live/streamaudioeng/chunks.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",LANGUAGE="spa",AUTOSELECT="YES",NAME="Spain",URI="live/streamaudiospa/chunks.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=395844,RESOLUTION=1280x720,CODECS="avc1.4d401f",AUDIO="audio"
live/streamvideo_720p/chunks.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=395844,RESOLUTION=320x180,CODECS="avc1.4d400c",AUDIO="audio"
live/streamvideo/chunks.m3u8

As you see, there is "audio" group of 2 streams and it's used in respective 2 video streams.
Now you can use some proper player which supports HLS multiple audio tracks. 

Notice that audio tracks will also be available for respective MPEG-DASH ABR streams.

Get separate audio channels from single stereo


There are cases when your source audio streams are delivered to your server as channels in a stereo audio stream. E.g. your right channel is English and your left channel is Spanish and you need to make two stereo channels, each having its own language.

This can be processed via Live Transcoder, read Manipulating audio channels in Nimble Streamer Live Transcoder article for more details.



If you have any questions regarding any functionality, just let us know about it. Describe your use case and we'll provide the best way to use Nimble Streamer to build your streaming solution.

Related documentation


ABR setup for Nimble StreamerLive Streaming features, Live Transcoder for Nimble Streamer, RTMP feature set, Build streaming infrastructure, ABR control API, Transcoder wildcard scenarios

No comments:

Post a Comment

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.