Skip to content
aseduto edited this page Dec 15, 2016 · 10 revisions

In the beginning you should have a file you want to play in a web page or in a mobile application using adaptive streaming instead of progressive download.

The first thing you need is ffmpeg. A free tool.

The basic command to create each of the needed file should be something similar to:

###Bash

fmpeg -i [input file] -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

###Powershell

fmpeg -i [input file] -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 this are the parameter used and their explanation:

  • -i This is the input file you want to convert.
  • -vf with this parameter you define the output size of your file. You should decrease the output size while you decrease the bitrate.
  • -codec this the codec. You should mainly use libx264 and aac.
  • -profile this is the h264 profile. For maximum compatibility use high.
Clone this wiki locally