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

There is an audio + video stream in IIS Smooth Streaming (ISM) format, available over HTTP. The .ism/manifest file is as follows:

 <?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="..." /> <cd="20400971" /> <cd="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" /> <cd="20201360" /> <cd="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 library) on Linux that can load individual audio and video fragments of this stream and multiplex it into an AVI or MKV file.

Actually, loading is simple: using the Url= values ​​in the manifest file, I can build the URLs of the fragment, and I can use, for example, wget or curl to load the pieces. Therefore, if there is a tool that can multiplex chunks into an AVI or MKV file, this is good enough for me.

I know about ISM Downloader and RTL Downloader by the same author. These are .NET applications, not open source. Ideally, I am looking for a small standalone open source tool that does not require .NET or Java. I would prefer C, C ++, Perl, Python, Ruby.

+4
source share
4 answers

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

+4
source

VLC Media Player supports IIS Smooth Streaming. Go to the tab "Media", "Convert / Save", "Network", paste the link into the manifest file, click "Convert / Save", select the format and click "Start".

+5
source

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

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

+1
source

You can try smthplayer: http://sourceforge.net/projects/smthplayer/ , but you need to make some corrections for the source code because:

  • It is only a player, so it generates a .264 or .vc1 video file and a .aac or .wav file, which you should use in mux later;

  • Starting with version 0.4, the author added a function that compromises the video file to avoid recording.

Modify it for personal use only (therefore, do not post modified versions), as restrictions for legal reasons ...

+1
source

Source: https://habr.com/ru/post/1400876/


All Articles