FFmpeg libx264 presets

UPDATE: Please use the preset files from the 0.5 FFmpeg release or from a current subversion checkout of the FFmpeg development code. These preset files in this post are deprecated! As always, see the FFmpeg x264 encoding guide for up-to-date information.

Shameless copying and pasting and subsequent editing and updating follows:

Uploaded libx264 ffpreset files:

  • default – x264 CLI default values
  • fastfirstpass – disables options unnecessary for first pass
  • normal – Dark Shikari’s Q55 preset
  • hq – Dark Shikari’s Q75 preset
  • max – all options maxed out

If you dump them into ~/.ffmpeg/ then you can use them as follows:

ffmpeg -i infile -vcodec libx264 -vpre hq -b 1M -bt 1M -threads 0 outfile.mp4
(Note: the ‘-threads 0′ part tells libx264 to use an automatically decided number of threads as it chooses.)

This entry was posted in ffmpeg, multimedia, personal, website, x264. Bookmark the permalink.

5 Responses to FFmpeg libx264 presets

  1. Pingback: links for 2009-03-11 | 水蘸李子

  2. Pingback: quick ffmpeg audio-video encoding usage help « <!– something random just like junk – yard –>

  3. Pingback: Install FFMPEG correctly on ubuntu 9.0.4 ­ www.chaoman.com

  4. David says:

    I have a somewhat generic problem (possibly specific). We are trying to roll our own encoder to encode video to H.264/mp4 so that we can stream in via RTMP. As I look around the web, I see many different recipes that seem to work, but others don’t. For example, I am getting an error with the hq recipe from above: http://ffmpeg.pastebin.com/905gUV7d

    I guess the bigger question is, was there a big change from FFMpeg 0.4 to 0.5 that all these settings would change so much? Here is my FFMpeg version info: http://ffmpeg.pastebin.com/WuFct0jQ

    Thanks for any help you can give me.

  5. rob says:

    I think some of the x264 options changed or maybe the hq preset was wrong and has been corrected since. The ‘brdo’ option is suspect. You could try removing ‘+brdo’ from the preset file, but it would be better to use a newer version with the corresponding preset files.

    I don’t think that in trunk we maintain the hq preset file anymore as we’re using files that have a better scale and correspond to presets available in the libx264 API. See my updated guide for more information.

    I recommend either using the current version from your distribution or building FFmpeg from an svn checkout and updating every so often. It certainly pays to have newer x264 as well (built with asm optimisations – install yasm).

Leave a Reply