Packaging Multiple Audio Codecs

One of the features of Unified Streaming is the ability to stream on-demand content with multiple audio codecs as DTS (Express), Dolby Digital Plus (EC-3) or Fraunhofer HE-AAC v2 (multichannel).

In this section we show you how to package and use an alternative DTS audio track.

DTS Express is a performant discrete audio codec designed specifically to enable streaming services to deliver content to consumers in immersive 5.1 surround sound. The goal, in combination with Unified Streaming, is to enable viewers to switch their audio to a better quality.

To accomplish this, the first step is to create a server manifest based on the file in the VOD presentation.

Packaging the content

Let's take a situation in which you want to package a video with a regular AAC-LC audio track and one video with AAC-HE audio track, and, in addition, you also want to offer an alternative high quality audio track. Which in this case will be a DTS audio track.

The following is a list of all the files that we use as input for the packaging.

Filename Description
audio_aac-lc.mp4 AAC-LC (Advanced Audio Codec - Low Complexity) audio track
audio_he-aac.mp4 HE-AAC (High Efficiency AAC) audio track
audio_dts-express.mp4 DTS Express 5.1 audio track
video_300.mp4 H.264 / AVC1 video track @ 300 kbps
video_500.mp4 H.264 / AVC1 video track @ 500 kbps
video_700.mp4 H.264 / AVC1 video track @ 700 kbps
video_900.mp4 H.264 / AVC1 video track @ 900 kbps

Devices often support only a single adaptive streaming protocol (HSS, HLS, HDS, MPEG DASH) or even only progressive download.

The following table lists the streaming protocols and devices we are targeting.

Streaming Protocol Audio Video Devices
HTTP Smooth Streaming AAC-LC, HE-AAC, DTS Express 300, 500, 700, 900 Silverlight
HTTP Smooth Streaming DTS Express 300, 500, 700, 900 X-Box
HTTP Live Streaming HE-AAC 300, 500, 700, 900 iOS, Android, JWplayer
HTTP Dynamic Streaming HE-AAC 300, 500, 700, 900 OSMF based players
MPEG DASH HE-AAC, DTS Express 300, 500, 700, 900  
Progressive download AAC-LC 300 Older devices (Low quality)
Progressive download HE-AAC 700 Older devices (High quality)

Preparing content for delivery with USP

The first step is to package all the source content into the format that is used by USP. This is the fragmented MP4 format.

Example 1

In this first example we show you how to package the source content with only a DTS audio track as an example :

#!/bin/bash

mp4split -o video.ismv  \
  video_300k.mp4 \
  video_500k.mp4 \
  video_700k.mp4 \
  video_900k.mp4 \
  audio_dts-express.mp4

As a last step we create the server manifest file. This is an XML file that contains the media information about all the tracks and is used by the USP webserver module.

#!/bin/bash

mp4split -o video.ism \
  video.ismv

At this point we have 2 files stored in this presentation example.

Files Description
video.ismv DTS Express, 300/500/700/900 kbps video
video.ism USP server manifest file

Example 2

In this second example we show you how to prepare the content with mixed audio tracks with AAC and DTS:

#!/bin/bash

mp4split -o video_300k.ismv \
  video_300k.mp4 \
  audio_aac-lc.mp4

mp4split -o video_700k.ismv \
  video_700k.mp4 \
  audio_he-aac.mp4

mp4split -o video.ismv \
  video_500k.mp4 \
  video_900k.mp4 \
  audio_dts.mp4

Now that we have packaged all the audio and video, the following step is to create the two progressive download files. Instead of creating a completely new MP4 video file we will create a MP4 video that only contains the necessary index and references to the actual movie data that is stored in the fragmented MP4 format.

#!/bin/bash

mp4split -o video_300k.mp4 --use_dref \
  video_300k.ismv

mp4split -o video_700k.mp4 --use_dref \
  video_700k.ismv

As a last step we create the server manifest file. This is an XML file that contains the media information about all the tracks and is used by the USP webserver module.

#!/bin/bash

mp4split -o video.ism \
  video.ismv \
  video_300k.ismv \
  video_700k.ismv

At this point we have six files stored for our presentation.

Directory layout Description
video_300k.ismv AAC-LC, 300 kbps video
video_700k.ismv HE-AAC, 700 kbps video
video.ismv DTS Express, 500/900 kbps video
video_500k.mp4 AAC-LC, 500 kbps video
video_900k.mp4 HE-AAC, 900 kbps video
video.ism USP server manifest file

Note

See Player URLs for a list of URLs made available by the USP origin.

Preparing content for delivery by IIS

When packaging content for delivery by IIS instead of USP, there are some additional requirements and limitations.

Limitations:

  • Only the streaming protocols supported by IIS are supported (i.e. Smooth Streaming). Your content won't be available in the formats MPEG DASH, HLS and HDS.
  • The progressive streaming files cannot reference the sample data in other files. The audio and video sample data is duplicated.

Requirements:

  • The source content must be converted to fragmented-MP4 using a timescale of 10MHz.
  • An additional client manifest file (.ismc) must be generated.

The first step is to package all the source content into the format that is used by IIS. This is the fragmented-MP4 format.

#!/bin/bash

mp4split --timescale=10000000 -o video_300k.ismv \
  video_300k.mp4 \
  audio_aac-lc.mp4

mp4split --timescale=10000000 -o video_700k.ismv \
  video_700k.mp4 \
  audio_he-aac.mp4

mp4split --timescale=10000000 -o video.ismv \
  video_500k.mp4 \
  video_900k.mp4 \
  audio_dts.mp4

Now that we have packaged all the audio and video, the following step is to create the two progressive download files. In this case the audio and video data is duplicated.

#!/bin/bash

mp4split -o video_300k.mp4 \
  video_300k.mp4 \
  audio_aac-lc.mp4

mp4split -o video_700k.mp4 \
  video_700k.mp4 \
  audio_he-aac.mp4

As a last step we create the server and client manifest files. The server manifest file is an XML file that contains the media information about all the tracks and is used by IIS. The client manifest file is used by the Silverlight player.

#!/bin/bash

mp4split -o video.ism \
  video.ismv \
  video_300k.ismv \
  video_700k.ismv

mp4split -o video.ismc \
  video.ism

At this point we have seven files stored for our presentation.

Files Description
video_300k.ismv AAC-LC, 300 kbps video
video_700k.ismv HE-AAC, 700 kbps video
video.ismv 500/900 kbps video, DTS Express
video_300k.mp4 AAC-LC, 300 kbps video
video_700k.mp4 HE-AAC, 700 kbps video
video.ism Server manifest file
video.ismc Client manifest file