October 13, 2016

Audio-only and video-only transmuxing via SMIL files

Nimble Streamer handles VOD streaming in various ways, one of them is doing ABR VOD using SMIL files.

With the latest update, you can use SMIL to specify separate tracks in MP4 files which will be used transmuxed specifically with only audio or video. This allows lowering the

To illustrate this approach, let's take a look at audio-only use case. We have "bigbuckbunny_450.mp4" file with audio we want to use and video track. There are bunch of other files with different video renditions, without the audio.

Check the sample SMIL file below.



<?xml version="1.0" encoding="UTF-8"?>
<smil title="">
 <body>
  <switch>
   <audioOnly src="bigbuckbunny_450.mp4" systemLanguage="eng" groupId="aac" default="true" autoSelect="true"/>
   <video src="bigbuckbunny_450.mp4" systemLanguage="eng" system-bitrate="450000" hlsAudioGroupId="aac"/>
   <video src="bigbuckbunny_750.mp4" systemLanguage="eng" system-bitrate="750000" hlsAudioGroupId="aac"/>
   <video src="bigbuckbunny_1100.mp4" systemLanguage="eng" system-bitrate="1100000" hlsAudioGroupId="aac"/>
   <video src="bigbuckbunny_1500.mp4" systemLanguage="eng" system-bitrate="1500000" hlsAudioGroupId="aac"/>
  </switch>
 </body>
</smil>

Get it on guthub. You can find other SMILs examples at this github repo.

Notice the groupId="aac" parameter in audioOnly tag, along with hlsAudioGroupId="aac" parameter in each video tag. This virtual group combines them together to use same audio track.

The result playlist would be as follows:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",LANGUAGE="eng",DEFAULT="YES",AUTOSELECT="YES",URI="bigbuckbunny__450.mp4_audiochunk.m3u8?nimblesessionid=96"
#EXT-X-STREAM-INF:BANDWIDTH=450000,AUDIO="aac",LANGUAGE="eng"
bigbuckbunny__450.mp4_videochunk.m3u8?nimblesessionid=96
#EXT-X-STREAM-INF:BANDWIDTH=750000,AUDIO="aac",LANGUAGE="eng"
bigbuckbunny__750.mp4_videochunk.m3u8?nimblesessionid=96
#EXT-X-STREAM-INF:BANDWIDTH=1100000,AUDIO="aac",LANGUAGE="eng"
bigbuckbunny__1100.mp4_videochunk.m3u8?nimblesessionid=96
#EXT-X-STREAM-INF:BANDWIDTH=1500000,AUDIO="aac",LANGUAGE="eng"
bigbuckbunny__1500.mp4_videochunk.m3u8?nimblesessionid=96

When the player gets the playlist it still shows multiple renditions and during playback it gives the audio track transmuxed from bigbuckbunny_450.mp4 file, while the video is taken from selected video file.

Multiple audio tracks and videoOnly


You can add multiple audio tracks if you need, this is especially useful for multi-language videos. All you need is to add several audioOnly tag with same groupId, specifying different systemLanguage parameter.
Here's an example of adding French and Spanish audio:
<audioOnly src="bigbuckbunny_450.mp4" systemLanguage="fra" groupId="aac"/>
<audioOnly src="bigbuckbunny_450.mp4" systemLanguage="spa" groupId="aac"/>

Besides audioOnly tag, you may use multiple videoOnly tags the same way as it's described for audio. The player will show the list of renditions and will pick up the required one.

If you have any questions regarding this or related feature sets, please contact us.

Related documentation


Nimble StreamerVOD Streaming in NimbleSMIL support for MPEG-DASH, MP4 transmuxing to HLS VOD streaming, Subtitles support in Nimble StreamerUsing SMIL in Nimble Streamer,

No comments:

Post a Comment