Skip to main content

Create your own multibitrate SMIL file

It is possible to upload your own multi bit rate smil-file along with the single bit rate files that will make up the multi bit rate file. This technique can be used to generate multi bit rate Flash, iOS, Smooth and Adobe HLS streams from single bit rate files that are H264/AAC encoded (typically, but not always mp4 files). Just make sure that the VOD files and the smil file that together make up the multi bit rate asset are uploaded to the same folder. All you need to specify in the smil-file are the names and bit rates and movie widths of the individual VOD files. Please make sure that the lowest bit rate is named first. There is no limit to the amount of files that make up the multi bit rate file, but it is advisable not to have more than five bit rates. Below you can find an example of a smil-file that is made up of the three single bit rate files stream_1.mp4, stream_2.mp4 and stream_3.mp4:

<?xml version="1.0"?>
<smil>
<head/>
<body>
<switch>
<video src="stream_1.mp4" system-bitrate="354304" width="428"/>
<video src="stream_2.mp4" system-bitrate="507904" width="428"/>
<video src="stream_3.mp4" system-bitrate="1122304" width="640"/>
</switch>
</body>
</smil>

This is a rather more complex version which holds multiple audio tracks

<?xml version="1.0"?>
<smil>
<head/>
<body>
<switch>
<video src="video_small.mp4" height="360" width="640" system-bitrate="187290">
<param name="videoCodecId" value="avc1.66.30" valuetype="data"/>
<param name="videoOnly" value="TRUE" valuetype="data"/>
<param name="cupertinoTag.AUDIO" value="aac" valuetype="data"/>
<param name="audioCodecId" value="mp4a.40.2" valuetype="data"/>
</video>
<video src="video_high.mp4" height="720" width="1280" system-bitrate="340890">
<param name="videoCodecId" value="avc1.66.30" valuetype="data"/>
<param name="videoOnly" value="TRUE" valuetype="data"/>
<param name="cupertinoTag.AUDIO" value="aac" valuetype="data"/>
<param name="audioCodecId" value="mp4a.40.2" valuetype="data"/>
</video>
<video src="video_high.mp4?audioindex=0" system-language="de" title="Deutsch" audio-bitrate="512000">
<param name="audioOnly" value="TRUE" valuetype="data"/>
<param name="cupertinoTag" value="EXT-X-MEDIA" valuetype="data"/>
<param name="cupertinoTag.GROUP-ID" value="aac" valuetype="data"/>
<param name="cupertinoTag.DEFAULT" value="YES" valuetype="data"/>
</video>
<video src="video_high.mp4?audioindex=1" system-language="en" title="English" audio-bitrate="512000">
<param name="audioOnly" value="TRUE" valuetype="data"/>
<param name="cupertinoTag" value="EXT-X-MEDIA" valuetype="data"/>
<param name="cupertinoTag.GROUP-ID" value="aac" valuetype="data"/>
<param name="cupertinoTag.DEFAULT" value="YES" valuetype="data"/>
</video>
<video src="video_high.mp4?audioindex=2" system-language="fr" title="France" audio-bitrate="512000">
<param name="audioOnly" value="TRUE" valuetype="data"/>
<param name="cupertinoTag" value="EXT-X-MEDIA" valuetype="data"/>
<param name="cupertinoTag.GROUP-ID" value="aac" valuetype="data"/>
<param name="cupertinoTag.DEFAULT" value="YES" valuetype="data"/>
</video>
</switch>
</body>
</smil>```