Adaptive Live Streaming with Sorenson Squeez
Using it is simple: import a source, specifying format, and press Squeeze button. That's it.
The following files are generated from Sorenson Squeez 9.0 (zip file SorensenSqueez.zip)
File: source_Apple_HLS_h264_LF_16x9_720p.m3u8
#EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=173952 stream-1-109952/index.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=293952 stream-2-229952/index.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=544000 stream-3-480000/index.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1054000 stream-4-990000/index.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1864000 stream-5-1800000/index.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3064000 stream-6-3000000/index.m3u8
index.m3u8:
#EXTM3U #EXT-X-TARGETDURATION:6 #EXTINF:6, frag-1.ts #EXTINF:6, frag-2.ts #EXTINF:6, frag-3.ts #EXTINF:6, frag-4.ts #EXTINF:6, frag-5.ts #EXTINF:6, frag-6.ts #EXTINF:6, frag-7.ts #EXTINF:6, frag-8.ts #EXTINF:6, frag-9.ts #EXTINF:6, frag-10.ts #EXTINF:6, frag-11.ts #EXTINF:6, frag-12.ts #EXTINF:6, frag-13.ts #EXTINF:6, frag-14.ts #EXTINF:6, frag-15.ts #EXTINF:6, frag-16.ts #EXTINF:6, frag-17.ts #EXTINF:6, frag-18.ts #EXTINF:4, frag-19.ts #EXT-X-ENDLIST
The video below will play either HLS live stream (generated by Sorenson Squeeze 9) on iOS devices
or h264_720p_hp_5.1_6mbps_ac3_planet.ogv file on other platforms.
The following files are generated by Sorenson Squeez 9.0 for Smooth Streaming:
Files are here: SorensenSqueezMS.zip.
As we can see, it generates three (can be 4 depending on the implementation) types of files:
- ism: Server manifest file
Describes the relationships between the media tracks, bit rates and rifles on disk - ismc: Client manifest file
Descibes the available streams to the client: the codecs, bit rates encoded, video resolutions, markers, captions, etc.
It's the first rifle delivered to the client. - ismv: Fragmented MPEG-4 video and audio, or only video file, 1 ismv file per encoded video bit rate
- isma*: contains only audio file
In videos with audio, the audio track can be muxed into an ixmv file instead pif a separate isms file
The .ismv files all contain special timecode marks and tied with the two manifest files (.ism and .ismc).
A smooth stream player makes a HTTP request for a video with a certain bitrate to adjust the state of connection. The player repeatedly makes the request in every 2-4 seconds.
IIS Media Services make it possible for the server to understand these player requests, timecode, URL, etc. For example, if we have a smooth stream manifest sample.ism in the root folder of our IIS web server, we can put it into our browser:
http://server/sample.ismv/Manifest
Then, IIS Media Services will generate the client XML manifest file.
More info on IIS Media Service and smooth stream, Demystifying IIS Smooth Streaming / Live Smooth Streaming
or IIS_Smooth_Streaming_Technical_Overview.pdf.
<?xml version="1.0" encoding="utf-8"?> <smil xmlns="http://www.w3.org/2001/SMIL20/Language"> <head> <meta name="clientManifestRelativePath" content="source_MS_IIS_h264_LF_16x9_720p.ismc" /> </head> <body> <switch> <video src="source_MS_IIS_h264_LF_16x9_720p_109Kb.ismv" systemBitrate="109952"> <param name="trackID" value="2" valuetype="data" /> <param name="trackName" value="video" valuetype="data" /> <param name="timeScale" value="10000000" valuetype="data" /> </video> <video src="source_MS_IIS_h264_LF_16x9_720p_229Kb.ismv" systemBitrate="229952"> <param name="trackID" value="2" valuetype="data" /> <param name="trackName" value="video" valuetype="data" /> <param name="timeScale" value="10000000" valuetype="data" /> </video> <video src="source_MS_IIS_h264_LF_16x9_720p_480Kb.ismv" systemBitrate="480000"> <param name="trackID" value="2" valuetype="data" /> <param name="trackName" value="video" valuetype="data" /> <param name="timeScale" value="10000000" valuetype="data" /> </video> <video src="source_MS_IIS_h264_LF_16x9_720p_990Kb.ismv" systemBitrate="990000"> <param name="trackID" value="2" valuetype="data" /> <param name="trackName" value="video" valuetype="data" /> <param name="timeScale" value="10000000" valuetype="data" /> </video> <video src="source_MS_IIS_h264_LF_16x9_720p_1800Kb.ismv" systemBitrate="1800000"> <param name="trackID" value="2" valuetype="data" /> <param name="trackName" value="video" valuetype="data" /> <param name="timeScale" value="10000000" valuetype="data" /> </video> <video src="source_MS_IIS_h264_LF_16x9_720p_3000Kb.ismv" systemBitrate="3000000"> <param name="trackID" value="2" valuetype="data" /> <param name="trackName" value="video" valuetype="data" /> <param name="timeScale" value="10000000" valuetype="data" /> </video> <audio src="source_MS_IIS_h264_LF_16x9_720p_109Kb.ismv" systemBitrate="64000"> <param name="trackID" value="1" valuetype="data" /> <param name="trackName" value="audio" valuetype="data" /> <param name="timeScale" value="10000000" valuetype="data" /> </audio> </switch> </body> </smil>
.ism file is used by the Smooth Streaming extension of Microsoft's IIS Web server. It uses XML formatting and contains bit rate and track information for audio (.ISMA) and video (.ISMV) files hosted on the Web server for streaming; saved in the same server directory as the multimedia files; allows the server to know which bit rates map to which multimedia files, which is useful for determining the streaming quality after negotiating the connection speed with a client.
ISM files are often referenced in Silverlight and other streaming applications for accessing video or audio streams. In the Smooth Streaming API, the SmoothStreamingSource is used to specify a streaming source for a SmoothStreamingMediaElement (SSME) that streams the multimedia content.
NOTE: ISM files are generated using Expression Encoder, a program that creates the multimedia content in addition to the manifests.
The following files are generated by Sorenson Squeez 9.0 for Mpeg-Dash ((zip file source_MPEG_DASH_x264_LF_16x9_720p.zip):
- .mpd (media presentation description) - describes segment information (timing, URL, media characteristics such as video resolution and bit rates.
- .m4s - Segments can contain any media data, however the specification provides specific guidance and formats for use with two types of containers: MPEG-4 file format or MPEG-2 Transport Stream.
<?xml version="1.0" encoding="utf-8"?> <MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011" mediaPresentationDuration="PT112.988S" minBufferTime="PT2.00S" type="static" profiles="urn:mpeg:dash:profile:isoff-main:2011"> <BaseURL></BaseURL> <Period start="PT0.00S" duration="PT112.988S"> <BaseURL>source_MPEG_DASH_x264_LF_16x9_720p/</BaseURL> <AdaptationSet mimeType="audio/mp4" codecs="mp4a.0x40" lang="en" subsegmentAlignment="true"> <SegmentTemplate media="$RepresentationID$/seg_$Number$.m4s" initialization="$RepresentationID$/seg_init.mp4" duration="6" startNumber="0"/> <Representation id="audio-160Kbps" bandwidth="160000"/> </AdaptationSet> <AdaptationSet bitstreamSwitching="true" mimeType="video/mp4" codecs="avc1.4D401f" subsegmentAlignment="true"> <SegmentTemplate media="$RepresentationID$/seg_$Number$.m4s" initialization="$RepresentationID$/seg_init.mp4" duration="6" startNumber="0"/> <Representation id="video-480Kbps" bandwidth="480000" width="512" height="288"> </Representation> <Representation id="video-1800Kbps" bandwidth="1800000" width="852" height="480"> </Representation> <Representation id="video-3000Kbps" bandwidth="3000000" width="1280" height="720"> </Representation> </AdaptationSet> </Period> </MPD>
Ph.D. / Golden Gate Ave, San Francisco / Seoul National Univ / Carnegie Mellon / UC Berkeley / DevOps / Deep Learning / Visualization