Question

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.

Was it helpful?

Solution

You can also try smoothget: https://github.com/pinglossy/smoothget, it's written in C#

OTHER TIPS

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.

You can try with smooth-dl: http://git.ao2.it/smooth-dl.git/ but it has limited features, it just prepares the streams for muxing and you can then do that with ffmpeg (or VirtualDub on windows?). Patches to make it more usable are welcome.

There is also libsmth: https://github.com/satufk/libsmth

You can try smthplayer: http://sourceforge.net/projects/smthplayer/, but you have to do some fixes to the source code because:

  1. It's only a player, so it generates a .264 or .vc1 video file and a .aac or a .wav file that you have to mux later;

  2. Since version 0.4, the author added a function that compromises the video file to avoid recording.

Modify it only for your personal use (so don't publish modified versions), because limitations are for legal reasons...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top