H264 specific options

h264_preset

This sets the encoding preset for libx264. The default option is medium.

Valid options are:

Preset Speed relative to medium
ultrafast 0.45
superfast ?
veryfast ?
faster 0.75
fast 0.9
medium 1
slow 1.4
slower 2
veryslow 2.8

This controls the transcoding speed/quality tradeoff. The slower options create nicer output but cost more cpu time. Usually medium is the right choise.

h264_tune

This sets the tune parameter for the x264 encoder. Options are:

Tune Usage
film Use for high quality movie content; lowers deblocking
animation Good for cartoons; uses higher deblocking and more reference frames
grain Preserves the grain structure in old, grainy film material
stillimage Good for slideshow-like content
fastdecode Allows faster decoding by disabling certain filters

h264_profile

This sets the H.264 profile that is used for encoding, it defaults to main, The valid options are:

  • baseline
  • main
  • high
  • high10
  • high422
  • high444

h264_crf

This sets the constant rate factor. The CRF controls the output quality. The default is 23, higher numbers give higher quality and lower numbers give worse quality. The range is 0-51

h264_params

This can be used to pass extra settings to x264

h264_faststart

This moves the H.264 metadata to the start of the file instead of the end, this means that browsers can start playing the files quicker but it costs slightly more time to encode. It defaults to false

h264_yuv420p

This forces it to translate the video to YUV420 before encoding, this is required for most video players so it is true by default.