Alternate Audio Tracks

One of the features of Unified Origin is the ability to create all possible combinations of audio, video and subtitles on request. Similar to subtitles in multiple languages, you may also have alternate audio tracks:

  • Multiple languages (English, Spanish, French).
  • Multiple codecs (AAC, DTS, Dolby Digital).
  • Multiple bitrates (Adaptive Bitrate).

Note

Adaptive Bitrate for audio is in general only useful for audio only presentations (e.g. Radio). It is generally not recommended since HTTP Smooth Streaming (HSS) and HTTP Dynamic Streaming (HDS) do not support identical audio tracks in different bitrates.

Adding audio in multiple languages

Let's create a presentation with video available in three bitrates and audio content available in three languages (English, Spanish, French).

Filename Description
video-400k.ismv video
video-800k.ismv video
video-1500k.ismv video
audio-english.isma audio in English
audio-spanish.isma audio in Spanish
audio-french.isma audio in French

Important

It is important that the metadata information stored in the audio and video files about the track is accurate. E.g. for the audio tracks it is vital that the 'language' is correctly signaled. Preferably the metadata in the tracks is correct, but it is also possible to override this using Input track selection and editing.

Alternate audio tracks are simply added to the list of inputs on the command line when creating the server manifest file.

#!/bin/bash

mp4split -o presentation.ism \
  --hds.client_manifest_version=2 \
  --hls.client_manifest_version=4 \
  video-400k.ismv video-800k.ismv video-1500k.ismv \
  audio-english.isma \
  audio-spanish.isma \
  audio-french.isma

Adding audio using multiple codecs

Let's create a presentation with video available in three bitrates and audio content available in the formats AAC, DTS and Dolby Digital.

Filename Description
video-400k.ismv video
video-800k.ismv video
video-1500k.ismv video
audio-aac.isma English audio in AAC
audio-dts.isma English audio in DTS
audio-ac3.isma English audio in Dolby Digital
#!/bin/bash

mp4split -o presentation.ism \
  --hds.client_manifest_version=2 \
  --hls.client_manifest_version=4 \
  video-400k.ismv video-800k.ismv video-1500k.ismv \
  audio-aac.isma audio-dts.isma audio-ac3.isma

Adding director's commentary

Let's create a presentation with video available in three bitrates and audio content available in three languages (English, Spanish, French). Add to that an additional audio track with the Director's commentary (available in English only).

Filename Description
video-400k.ismv video
video-800k.ismv video
video-1500k.ismv video
audio-english.isma audio in English
audio-spanish.isma audio in Spanish
audio-french.isma audio in French
audio-commentary.isma English commentary
#!/bin/bash

mp4split -o presentation.ism \
  --hds.client_manifest_version=2 \
  --hls.client_manifest_version=4 \
  video-400k.ismv video-800k.ismv video-1500k.ismv \
  audio-english.isma --track_role=main \
  audio-spanish.isma --track_role=main \
  audio-french.isma --track_role=main \
  audio-commentary.isma --track_role=commentary

Alternate audio for MPEG-DASH

Representations are arranged into Adaptation Sets. To allow for seamless switching between Representations in a Adaptation Set, the Representations are grouped in the same Adaptation Set, if, and only if, they have identical values for the the following properties:

  • the language as described by the @lang attribute.
  • the Role element.
  • the @codecs attribute.
  • the @audioSamplingRate attribute.

Alternate audio for HTTP Live Streaming (HLS)

Important

Alternate audio for HLS requires at least version 4 of the protocol. Make sure to set this using the --hls.client_manifest_version option.

When using alternate audio, for instance different languages as English and German, it is mandatory to have the language tracks in the same bitrage.

This is required in HLS v4 to create correct groups of audio tracks, which in turn will allow the player to select the language selection option the UI.

If you have more 'tracks', say two audio bitrates in two languages you will need four audio tracks. The manifest will present two groups and the player will select the better quality while maintaining the language selection option in the UI.

HLS Alternate Audio for older devices

In some situations your client may be bound to an older client manifest version without support for alternate audio tracks. Let's assume you have packaged a video asset with English, Spanish and German audio. The method to request alternate audio tracks in HLS is by adding the following parameters to your request URL:

URL to the media presentation Description
http://localhost/video/video.ism/video.m3u8?tracks=audio_eng,video_eng Select audio in English and video in English.
http://localhost/video/video.ism/video.m3u8?tracks=audio_spa,video_spa Selects audio in Spanish and video in Spanish.
http://localhost/video/video.ism/video.m3u8?tracks=audio_ger,video_ger Selects audio in German and video in German.
http://localhost/video/video.ism/video.m3u8?tracks=audio_spa,video_eng Selects audio in Spanish and video in English.

Alternate audio for HTTP Dynamic Streaming (HDS)

Important

Alternate audio for HDS requires at least version 2 of the protocol. Make sure to set this using the --hds.client_manifest_version option.

Please note that HDS does not support identical audio tracks in different bitrates.

Alternate audio for HTTP Smooth Streaming (HSS)

Important

It's not possible to mix mono and stereo audio with HTTP Smooth Streaming. Audio tracks should either be all mono or all stereo.

Please note that HSS does not support identical audio tracks in different bitrates.