[FFmpeg-user] Recommended x.264 preset for live x.264 encoding

Stas Oskin stas.oskin at gmail.com
Mon Feb 13 23:49:38 CET 2012

Thanks, that seems very useful.

So in order to encode live video for mobiles (iOS and Android), would the
following settings suffice:
ffmpeg -i input -c:libx264 -profile:baseline -preset:ultrafast -level 1.2
(from http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels)


In fact, the new preset system is even easier to use than before, as
> it simply presents the options from x264.
> You can use -profile:v <x264 profile>, -preset:v <x264 preset>,
> -tune:v <x264 tuning>, -level and -x264opts crf=NN to control most
> aspects of encoding.
> Eg, if you want a video at Main at L3.1, then you can use this:
> ffmpeg -i input -c:v libx264 -profile:v main -preset:v fast -level 3.1
> If that is too slow, you can go faster with the preset.
> If you want to improve the quality of the encode, or reduce the
> bitrate of the encode, you can lower or higher the crf. A lower crf
> will give higher quality, at a higher bitrate, and a higher crf will
> give you lower quality, at a lower bitrate.
> ffmpeg -i input -c:v libx264 -profile:v main -preset:v fast -level 3.1
> -x264opts crf=18
> The faster the preset you use, the less efficient the encoding is, ie
> it will use a higher bitrate to achieve the same quality.
> To see all the profile, presets and tunings available from x264, run
> x264 --full-help.

More information about the ffmpeg-user mailing list