Adobe Media Server has support for including multiple language tracks for HTTP video streams, without requiring duplication and repackaging of the video for each audio track. This feature, called as “late” binding of audio tracks allow content providers to easily provide multiple language tracks for a given video asset, at any time before or after the asset’s initial packaging. The initial packaging of the video asset can include an audio track, and the publisher can still choose to provide one or more additional audio tracks for the video. Video players can provide support for allowing the viewers to switch between audio tracks either before or during playback.

The primary use case of this feature is that content providers can publish video content in multiple languages. Viewers can subscribe to such videos using the OSMF player, which allows audio track switching before or during playback.

Clients can pick the appropriate audio

Playback workflow for HDS-VOD

The following steps provide an overview of the content publishing workflow in case of HDS-VOD:

  1. The content providers will load videos in the ‘vod’ directory along with its set level manifest F4M file. This set level manifest file must contain information on which video to play by default and which audio track to be used as an alternate audio. For instance, if you want to publish a video stream, video1.mp4 along with the language tracks video1_french.mp4 and video1_spanish.mp4, providing the users a choice to switch audio, you can create a set level manifest F4M video1_master.f4m and place it in the vod sub directory. The set level manaifest file can have the following content:<?xml version="1.0" encoding="utf-8"?> <manifest xmlns="http://ns.adobe.com/f4m/2.0"> <media href="../hds-vod/video1.mp4.f4m" bitrate="1000" /> <media href="../hds-vod/audio-only/video1_french.mp4.f4m" bitrate="200" type="audio" label="french" lang="fr" alternate="true" /> <media href="../hds-vod/audio-only/video1_spanish.mp4.f4m" bitrate="200" type="audio" label="spanish" lang="es" alternate="true" /> </manifest>

  2. When a viewer plays the stream, the player will load this set level manifest file and will play video1.mp4 by default with its embedded audio data. The player will request the manifest file video1.mp4.f4m from the server. The Apache module for on demand HDS will create the manifest file and will send it to the player. The player will then request for fragments of the video1.mp4 file and will play the fragments.

  3. When the viewer switches to another audio label (in this case, french or spanish), the player will request for the manifest file for the selected option. For instance, if the viewer has opted for the french track, the player requests for the manifest video1_french.mp4.f4m file to get the audio-only stream.

  4. The Adobe Media Server will know that the request for F4M is coming with the ‘audio-only’ element, hence will create the manifest file just in time almost similar to step 2.

  5. Now, the player will request for fragments from both the media files (video1.mp4 and video1_french.mp4) using their respective manifest F4M files. For the first media file, the player will continue fetching fragments. But for the second media file, video1_french.mp4, the player will try to get fragments for the media URL with ‘audio-only’ value in the URL as supplied in its manifest F4M file. The request for fragment for this media file will be of this format '/hds-vod/audio-only/video1_french.mp4Seg1-Frag1'

  6. While serving the fragment request, Adobe Media Server understands the 'audio-only' request and sends only the audio data for the requested fragment of file 'video1_french.mp4'. These fragments are made just in time and served. If the 'audio-only' element is not present, video data for the fragment is served.

Streaming alternate audio on demand

Playback workflow for HLS-VOD

The following steps provide an overview of the content publishing workflow in case of HLS-VOD:

  1. The content providers will load videos in the ‘vod’ directory along with its variant playlist M3U8 file. This variant playlist file must contain information on which video to play by default and which audio track to be used as an alternate audio. For instance, if you want to publish a video stream, video1.mp4 along with the language tracks video1_french.mp4 and video1_spanish.mp4, providing the users a choice to switch audio, you can create a variant playlist M3U8 video1_master.m3u8 and place it in the vod sub directory. The variant playlist file can have the following content:#EXTM3U #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="English", DEFAULT=YES,AUTOSELECT=YES,LANGUAGE="en", URI="../hls-vod/audio-only/video1.mp4.m3u8" #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="French", DEFAULT=NO,AUTOSELECT=NO,LANGUAGE="fr", URI="../hls-vod/audio-only/video1_french.mp4.m3u8" #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="Spanish", DEFAULT=NO,AUTOSELECT=NO,LANGUAGE="es", URI="../hls-vod/audio-only/video1_spanish.mp4.m3u8" #EXT-X-STREAM-INF:BANDWIDTH=1280000,CODECS="mp4a.40.5",AUDIO="aac" ../hls-vod/video1.mp4.m3u8

  2. When a viewer plays the stream, the player will load this variant playlist file and will play video1.mp4 by default with its embedded audio data. The player will request the playlist file video1.mp4.m3u8 from the server. The Apache module for on demand HLS will create the playlist file and will send it to the player. The player will then request for fragments of the video1.mp4 file and will play the fragments.

  3. When the viewer switches to another audio label (in this case, french or spanish), the player will request for the playlist file for the selected option. For instance, if the viewer has opted for the french track, the player requests for the playlist video1_french.mp4.m3u8 file to get the audio-only stream.

  4. The Adobe Media Server will know that the request for M3U8 is coming with the ‘audio-only’ element, hence will create the playlist file just in time almost similar to step 2.

  5. Now, the player will request for fragments from both the media files (video1.mp4 and video1_french.mp4) using their respective playlist M3U8 files. For the first media file, the player will continue fetching fragments. But for the second media file, video1_french.mp4, the player will try to get fragments for the media URL with ‘audio-only’ value in the URL as supplied in its playlist M3U8 file. The request for fragment for this media file will be of this format '/hds-vod/audio-only/video1_french.mp4Seg1-Frag1'

  6. While serving the fragment request, Adobe Media Server understands the 'audio-only' request and sends only the audio data for the requested fragment of file 'video1_french.mp4'. These fragments are made just in time and served. If the 'audio-only' element is not present, video data for the fragment is served.

Note:

To package an audio-only stream for HLS, see Packaging an audio-only stream (HLS). To publish an audio-only stream for HLS, see Publish an audio-only stream (HLS)

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy