Encode your files to several bitrates for Adaptive Streaming.
Package your media file for use in any web server with mg.
Publish your content to any Web Server and Let Play!
First of all, you need a media file you want to stream on the web.
In order to stream the file you need to encode the file to several mp4 files with different bitrates and with key frames aligned.
If you do not know how to do it the simplest way is to use ffmpeg.
For each bitrate you want ran the following command:
fmpeg -i "[your file path]" -vf "scale=w=1280:h=720" \ -codec:v libx264 -profile:v high -level 31 -b:v 750 \ -r 25 -g 50 -sc_threshold 0 -x264opts ratetol=0.1 \ -minrate 750 -maxrate 750 -bufsize 750 \ -b:a 96k -codec:a aac -profile:a aac_low -ar 44100 -ac 2 mg_750.mp4
In the above command line make sure you replace [your file path] with the path of the file with the content you want to stream.
The above example produces a 750kb file. You can repeat the process with each bitrate you think is appropriate.
You should modify any bold parameter with the most appropriate for you.
The mg tool allows you to package statically your MP4 files. In this way you they can be effectively streamed on the Internet. Packaging features:
The mg tool allows to statically package a set of mp4 files. Mp4 files should have the key frames aligned.
Once you have obtained mg you can run it using this parameters:
./mg -k:adaptive \ -o:[output directory] \ -i:[first input file] -s:0 -e:0 -b:750 \ -j:[second input file] -b:350 \ -j:[third input file] -b:120 \ -j:[nth input file] -b:[nth bitrate]