Serving MPEG DASH With IIS

Serving MPEG DASH with the Microsoft IIS Smooth Streaming Media Extension

Because Smooth Streaming is very similar to MPEG DASH, it is possible to use the Microsoft IIS server to serve MPEG DASH streams in the same way as it serves Smooth Streaming streams.

With the  Microsoft IIS Smooth Streaming Media Extension, it is possible to virtualize a set of fragmented MP4 files so that they appear to the clients as a set of individual URLs, one for each segment/fragment. A typical Smooth Streaming asset consists of 3 types of files:

one or more .ismv files Each .ismv file is simply a fragmented MP4 file
one .ismc file The .ismc file contains the Smooth Streaming Client Manifest file: an XML document equivalent to the MPEG DASH MPD, which describes to the client all the media segments that are available and how to compute the URL for each of them
one .ism file The .ism file is the server-side configuration that tells the server about the .ismv files and what tracks to use from each of the .ismv files

The Smooth Streaming Client Manifest (.ismc file) contains URL patterns that the client uses to compute the URL of each of the media segment. The patterns contain placeholders that the client replaces with values. A typical URL pattern in a Client Manifest looks like this: QualityLevels({bitrate})/Fragments(audio={start time}). In this pattern, the client replaces the {bitrate} placeholder with the bitrate of the variant that it has selected, and {start time} with the starting media timestamp of the segment that it is requesting.
For example, with this pattern in a presentation that contains an audio variant with a bitrate of 128000, the relative URL for the audio segment starting at timestamp 5000 would be: QualityLevels(128000)/Fragments(audio=5000). Those URLs are relative to the root URL for the stream, which is the URL with a path pointing to the .ism file. For example, if the .ism file’s URL is http://mycdn.com/video/stream.ism, that relative URL would correspond to the absolute URL: http://mycdn.com/video/stream.ism/QualityLevels(128000)/Fragments(audio=5000)
Unlike an MPEG DASH MPD, which conveys codec initialization data to the client using an init segment, the XML Client Manifest contains the codec initialization.

Because .ismv files are simply fragmented MP4 files, just the same as for MPEG DASH, it is possible to ‘trick’ the IIS server into serving those files for a DASH client.
Starting with a regular Smooth Streaming set of media files (one or more .ismv files), the mp4-dash.py tool, with the –smooth option, will produce in its output directory all the files necessary for a Smooth Streaming presentation:

  • one fragmented MP4 file for each source .ismv file (simply copied from the .ismv file without any transformation)
  • a .ismc Client Manifest file (the default name is stream.ismc)
  • a .ism Server Manifest file (the default name is stream.ism)

plus the following extra files for DASH support:

  • one init segment for each media track
  • an MPD file (the default name is stream.mpd)

For a detailed description of the mp4-dash.py tool, visit the MPEG DASH page.

NOTE: The mp4-dash.py tools creates .ism and .ismv files, even if your source media already has versions of those files. If you want to keep your original .ism and .ismc files instead of using the ones re-generated by the tool, you can do so, as long as the URL patterns referenced in the .ismc file match the ones used by the tool, and that you edit the .ism file to reference the same name for the media files as the ones chosen by the tools (.ismv files are copied to media files with a .mp4 file extension)

Supposing that the output directory produced by mp4-dash.py is located at http://mycdn.com/video/movie-1234 the following URLs can be given, respectively, to a Smooth Streaming client and an MPEG DASH client:

  • Smooth Streaming URL: http://mycdn.com/video/movie-1234/stream.ism/Manifest
  • MPEG DASH URL: http://mycdn.com/video/movie-1234/stream.mpd

The output directory can now be used as a Smooth Streaming presentation served by an IIS server with the Smooth Streaming Media Extension.

NOTE: it is important to configure the IIS server so that it knows about the .mpd and .mp4 file extensions. Without this, the DASH client will not be able to retrieve the MPD file and init segments from the IIS server. The .mpd file extension should be associated with the MIME Type application/dash+xml and the .mp4 extension with the MIME Type video/mp4 (this can be configured, for example, through the IIS Managers ‘MIME Type’ configuration panel