Bookmark and Share


Adaptive Live Streaming with Sorenson Squeez






Sorensen Squeez 9.0

SorensenSqueez9

Using it is simple: import a source, specifying format, and press Squeeze button. That's it.



HLS

The following files are generated from Sorenson Squeez 9.0 (zip file SorensenSqueez.zip)


SorensenSqueezHLS

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.







Smooth Streaming

The following files are generated by Sorenson Squeez 9.0 for Smooth Streaming:

SorensenSqueezSmoothStreaming

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.



IIS Smooth Streaming Manifest File - source_MS_IIS_h264_LF_16x9_720p.ism
<?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.





Smooth Streaming Client Manifest File - source_MS_IIS_h264_LF_16x9_720p.ismc
<?xml version="1.0" encoding="utf-8"?>
<SmoothStreamingMedia MajorVersion="2" MinorVersion="1" Duration="1129878155">
<StreamIndex
	 Type="video"
	 TimeScale="10000000"
	 Name="video"
	 Chunks="19"
	 QualityLevels="6"
	 MaxWidth="1280"
	 MaxHeight="720"
	 DisplayWidth="1280"
	 DisplayHeight="720"
	 Url="QualityLevels({bitrate})/Fragments(video={start time})">
	 <QualityLevel 
		 Index="0"
		 Bitrate="109952"
		 FourCC="H264"
		 MaxWidth="512"
		 MaxHeight="288"
		 CodecPrivateData="0000000167428015965201004B602A10011356F0337F980E00006B6000D6C7F18E3000035B0006B63F8C70ED0B17240000000168CB8D48" />
	 <QualityLevel 
		 Index="1"
		 Bitrate="229952"
		 FourCC="H264"
		 MaxWidth="512"
		 MaxHeight="288"
		 CodecPrivateData="0000000167428015965201004B602A10011356F0337F980E00003824001C127F18E300001C12000E093F8C70ED0B17240000000168CB8D48" />
	 <QualityLevel 
		 Index="2"
		 Bitrate="480000"
		 FourCC="H264"
		 MaxWidth="512"
		 MaxHeight="288"
		 CodecPrivateData="0000000167428015965201004B602A10011356F0337F980E00001D4C0003A987F18E300000EA60001D4C3F8C70ED0B17240000000168CB8D48" />
	 <QualityLevel 
		 Index="3"
		 Bitrate="990000"
		 FourCC="H264"
		 MaxWidth="640"
		 MaxHeight="360"
		 CodecPrivateData="000000016742801E965201405FF2E02A10011356F0337F9809DA162E480000000168CB8D48" />
	 <QualityLevel 
		 Index="4"
		 Bitrate="1800000"
		 FourCC="H264"
		 MaxWidth="852"
		 MaxHeight="480"
		 CodecPrivateData="00000001674D401F965201B07BCFE02A10011356F0337F9809DA1831120000000168EB6352" />
	 <QualityLevel 
		 Index="5"
		 Bitrate="3000000"
		 FourCC="H264"
		 MaxWidth="1280"
		 MaxHeight="720"
		 CodecPrivateData="00000001674D4020965200A00B7602A10011356F0337F9809DA18311200000000168EB6352" />
	<c d="60148698" />
	<c d="60148699" />
	<c d="60149117" />
	<c d="60148699" />
	<c d="60149116" />
	<c d="60148699" />
	<c d="60148699" />
	<c d="60149117" />
	<c d="60148699" />
	<c d="60149116" />
	<c d="60148699" />
	<c d="60148699" />
	<c d="60149116" />
	<c d="60148699" />
	<c d="60149117" />
	<c d="60148699" />
	<c d="60148699" />
	<c d="60149116" />
	<c d="47200201" />
</StreamIndex>
<StreamIndex
	 Type="audio"
	 Name="audio"
	 Chunks="19"
	 QualityLevels="1"
	 Url="QualityLevels({bitrate})/Fragments(audio={start time})">
	 <QualityLevel
		 Index="0"
		 FourCC="AACL"
		 Bitrate="64000"
		 SamplingRate="44100"
		 Channels="2"
		 BitsPerSample="16"
		 PacketSize="4"
		 AudioTag="255"
		 CodecPrivateData="" />
	<c d="60139543" />
	<c d="59907345" />
	<c d="60139545" />
	<c d="59907345" />
	<c d="59907345" />
	<c d="60139541" />
	<c d="59907343" />
	<c d="60139543" />
	<c d="59907342" />
	<c d="59907342" />
	<c d="60139541" />
	<c d="59907342" />
	<c d="60139541" />
	<c d="59907342" />
	<c d="59907342" />
	<c d="60139541" />
	<c d="59907342" />
	<c d="60139541" />
	<c d="48128004" />
</StreamIndex>
</SmoothStreamingMedia>

.ismc is an extension for Microsoft's IIS Web server for streaming multimedia content; hosted on the IIS Web server and contains information about the codecs, resolutions, and fragments (the video chunks in .ISMV files) for hosted multimedia files; saved in an XML format.

ISMC files are used by Silverlight client applications that run within the user's Web browser. The ISMC file is hosted with an .ISM server file, and together, they contain the information required by the server and the client to initiate a multimedia stream.



The video below will play either Smooth Stream (generated by Sorenson Squeeze 9) on the Siverlight plug-in browsers
or h264_720p_hp_5.1_6mbps_ac3_planet.ogv file on other platforms.







Mpeg Dash

The following files are generated by Sorenson Squeez 9.0 for Mpeg-Dash ((zip file source_MPEG_DASH_x264_LF_16x9_720p.zip):

mpeg_dash

  • .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.




source_MPEG_DASH_x264_LF_16x9_720p.mpd
<?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>