HLS from MP4s on the fly

With the SpareVideos CDN service you do not need to convert your files to HLS formats, pay additional costs for those conversions and permanent storage…

Just add /playlist.m3u8 at the end of your MP4 location and you are done. The video will be served through your player in HLS chunks as if you had it converted previously.

This offers additional security as HLS is a bit harder for simple users to download.

Also with our SignKeys you can create a signature and add to the URLs so that your videos remain protected even further.

Another advantage of HLS is the fact that it can adapt the bitrate according to the internet speed of your users.

You can have multiple MP4s of different qualities.

Just make a SMIL file in the appropriate format and add in the SMIL the URLS of the MP4s with their corresponding bitrates.

We will create a multi-bitrate HLS instantly when the video is requested by your users and serve the MP4s in chunks as if that was a converted HLS somewhere locally stored.

Creating SMIL

The following SMIL file should be created to enable adaptive bitrate streaming:

<?xml version=”1.0″ encoding=”UTF-8″?>
<smil title=””>
<body>
<switch>
<video height=”240″ src=”bigbuckbunny_450.mp4″ system-bitrate=”450000″ systemLanguage=”eng” width=”424″>
</video>
<video height=”360″ src=”bigbuckbunny_750.mp4″ system-bitrate=”750000″ systemLanguage=”eng” width=”640″>
</video>
</switch>
</body>
</smil>

Let’s name it bunny.smil.

You may also create SMIL file using the following format.

<?xml version=”1.0″ encoding=”UTF-8″?>
<smil title=””>
<body>
<switch>
<video height=”240″ src=”bigbuckbunny_450.mp4″ systemLanguage=”eng” width=”424″>
<param name=”videoBitrate” value=”450000″ valuetype=”data”></param>
<param name=”audioBitrate” value=”44100″ valuetype=”data”></param>
</video>
<video height=”360″ src=”bigbuckbunny_750.mp4″ systemLanguage=”eng” width=”640″>
<param name=”videoBitrate” value=”750000″ valuetype=”data”></param>
<param name=”audioBitrate” value=”44100″ valuetype=”data”></param>
</video>
</switch>
</body>
</smil>

If you’d like to have NAME parameter in #EXT-X-STREAM-INF header of your result playlist, you may use “title” parameter in video tag of SMIL.

Now imagine you were serving your MP4s from the following URLS

http://myaddress.com/vod/my360.mp4
http://myaddress.com/vod/my480.mp4
http://myaddress.com/vod/my720.mp4

Now you have created a SpareVideos CDN and you serve them under

https://stream.sparevideos.com/cdn-kjdasuichk/vod/my360.mp4
https://stream.sparevideos.com/cdn-kjdasuichk/vod/my480.mp4
https://stream.sparevideos.com/cdn-kjdasuichk/vod/my720.mp4

You have to create a SMIL, as described above, placed at

http://myaddress.com/vod/bunny.smil

Then just put in your player

https://stream.sparevideos.com/cdn-kjdasuichk/vod/smil:bunny.smil/playlist.m3u8

What our CDN does is to go at your /vod directory, read the .smil file as you defined in the src attribute and see where the MP4s are located, fetch them and serve them to your users in the adequate adaptive rate in HLS format instantly.