Packaging for HTTP Smooth Streaming (HSS)

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

Limitations:

  • Only the streaming protocols supported by IIS are supported (HTTP 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. You can force changing the timescale using the --timescale option.
  • An additional client manifest file (.ismc) must be generated.

Note

These limitations and requirements do not apply for content delivered with Unified Origin.

Creating the media files (.isma and .ismv)

The first step is to package all the source content into the format that is used by IIS. This is the ISMV / PIFF format.

The example uses this Source Content.

#!/bin/bash

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

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

mp4split --timescale=10000000 -o video.ismv \
  video_200k.mp4 \
  video_600k.mp4 \
  audio_dts.mp4 \
  audio_ac3.mp4 \
  audio_eac3.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_400k.mp4 \
  video_400k.mp4 \
  audio_aac-lc.mp4
#!/bin/bash

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

Creating the media files with PlayReady

You can add PlayReady encryption to the .isma and .ismv media files.

--iss.key

The 128 bits Key ID (KID) and 128 bits Content Encryption Key (CEK) are passed with the --iss.key option where KID and CEK are separated by a colon, e.g. --iss.key=KID:CEK

The KID identifier uniquely identifies the content.

The CEK is the Content Encryption Key. Note this is NOT the PlayReady Key Seed, but the actual content encryption key.

Both KID and CEK must be coded in hex (base16).

Note

The KID from the PlayReady License server may be formatted as a little-endian GUID. In that case you have to change the endianess as we always use a big-endian UUID representation of the KID.

--iss.key_iv

The 64 bit AES Initialization Vector (IV). This is a random 64 bit value.

If it is not specified then a random value is generated.

When specified, make sure not to re-use the same IV for the same CEK. I.e. it should be different between multiple mp4split calls.

--iss.license_server_url

The URL used by the player to retrieve the key.

Example

The following command creates a PlayReady protected ismv file to be used with IIS:

#!/bin/bash

KID=your-key-id
CEK=your-content-key
LA_URL=your-license-server-url

mp4split --timescale=10000000 -o video_400k-pr.ismv \
  --iss.key=${KID}:${CEK} \
  --iss.license_server_url=${LA_URL} \
  video_400k.mp4 \
  audio_aac-lc.mp4

Please download the playready-iis.sh sample script which creates the various server manifest as discussed above. The sample content is Tears of Steel.

Creating the manifest files (.ism and .ismc)

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_400k.ismv \
  video_800k.ismv
#!/bin/bash

mp4split -o video.ismc \
  video.ism

For backwards compatibility with older Silverlight players you may have to change the FourCC for AVC video streams in the client manifest file to use H264 instead. Just pass 'H264' as parameter on the commandline.

Generating the client manifest file but use H264 instead of AVC1:

#!/bin/bash

mp4split -o video.ismc \
  video.ism/Manifest?H264

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

Files Description
video_400k.ismv AAC-LC, 400 kbps video
video_800k.ismv HE-AAC, 800 kbps video
video.ismv 200/600 kbps video, DTS, AC3, EAC3
video_400k.mp4 AAC-LC, 400 kbps video
video_800k.mp4 HE-AAC, 800 kbps video
video.ism Server manifest file
video.ismc Client manifest file

Please download the advanced-iis.sh sample script which creates the various server manifest as discussed above. The sample content is Tears of Steel.