How to download IIS smooth streaming (ISM) as MKV or AVI?

pts picture pts · Mar 11, 2012 · Viewed 21.8k times · Source

There is an audio+video stream in IIS smooth streaming (ISM) format available via HTTP. The .ism/manifest file looks like:

<?xml version="1.0" encoding="utf-16"?>
<SmoothStreamingMedia MajorVersion="2" MinorVersion="1" Duration="26571612076">
  <StreamIndex Type="video" Name="video" Chunks="1329" QualityLevels="3"
               MaxWidth="848" MaxHeight="480" DisplayWidth="853" DisplayHeight="480"
               Url="QualityLevels({bitrate})/Fragments(video={start time})">
    <QualityLevel Index="0" Bitrate="900000" FourCC="H264"
                  MaxWidth="848" MaxHeight="480" CodecPrivateData="..." />
    <QualityLevel Index="1" Bitrate="735000" FourCC="H264"
                  MaxWidth="736" MaxHeight="416" CodecPrivateData="..." />
    <QualityLevel Index="2" Bitrate="600000" FourCC="H264"
                  MaxWidth="624" MaxHeight="352" CodecPrivateData="..." />
    <c d="20400971" /> <c d="20000000" /> ...
  </StreamIndex> 
  <StreamIndex Type="audio" Index="0" Name="audio" Chunks="1329" QualityLevels="1"
               Url="QualityLevels({bitrate})/Fragments(audio={start time})">
    <QualityLevel FourCC="AACL" Bitrate="256000" SamplingRate="44100" Channels="2"
                  BitsPerSample="16" PacketSize="4" AudioTag="255"
                  CodecPrivateData="1210" />
    <c d="20201360" /> <c d="19969161" /> ...
  </StreamIndex>
  <StreamIndex Type="text" Subtype="CHAP">
    <Content>
      <Marker Time="0" Value="Thumbnail" />
      <Marker Time="664290000" Value="Thumbnail" /> ...
    </Content>
  </StreamIndex>
</SmoothStreamingMedia>

I need a command-line tool (or a library) on Linux which can download the individual audio and video chunks of this stream, and multiplex it to an AVI or MKV file.

Actually, downloading is easy: Using the Url= values in the manifest file I can construct the URLs of the chunk, and I can use e.g. wget or curl to download the chunks. So if there is a tool which can mux the chunks to an AVI or MKV file, that's good enough for me.

I know about ISM Downloader and RTL Downloader by the same author. They are .NET applications and not open source. Ideally I'm looking for a small, self-contained open source tool which doesn't require .NET or Java. I'd prefer C, C++, Perl, Python, Ruby program.

Answer

user3724077 picture user3724077 · Jun 10, 2014

VLC Media Player supports IIS Smooth Streaming. Go to Media, Convert / Save, Network tab, paste the link to the manifest file, click on Convert / Save, choose a format and press Start.