Handbrake

Encode a video to 480p
handbrake --optimize --encoder x264 --width 852 --height 480 -i input.mp4 -o output.mp4

Presets

Settings marked with an * are different from the x264 default medium preset.

Settings shown in brackets [] are what they will be set to, either by default or another setting. They do not need to be passed as an argument to the libav or x264 encoder.

Setting Normal High Profile x264 medium Universal iPod iPhone & iPod Touch iPhone 4 iPad AppleTV AppleTV2
x264 profile main* high* - baseline* baseline* baseline* high* high* high* high*
no-8x8dct [+]* - - [+]* [+]* [+]* - - - -
b-adapt 1 2* 1 1 1 1 1 1 2* 1
b-pyramid 2 2 2 2 2 2 2 2 0* 2
bframes 3 3 3 [0]* [0]* [0]* 3 3 3 3
bitrate - - - - 700* - - - - -
chroma-qp-offset 0* -2 -2 -2 -2 -2 -2 -2 -2 -2
crf 20.0* 20.0* 23.0 20.0* -* 20.0* 20.0* 20.0* 20.0* 20.0*
cqm [flat]* - - [flat]* [flat]* - - - - -
keyint 300* 300* 250 300* 300* 300* 300* 300* 300* 300*
level - - - - 3* 2.2* 3* 3* 3* 3*
me hex hex hex umh* umh* umh* hex hex umh* hex
min-keyint 30* 29* 25 30* 30* 30* 30* 30* 30* 30*
nal-hrd - - - - none* - - - none* -
no-cabac - - - +* +* +* - - +* -
no-fast-pskip - - - [+]* [+]* [+]* - - - -
no-mixed-refs +* - - - - - - - - -
no-weightb - - - - - - - - +* -
qpmax 69 51* 69 69 69 69 69 69 69 69
qpmin 3* 3* 0 3* 3* 3* 3* 3* 3* 3*
rc-lookahead 10* 50* 40 40 40 40 40 40 40 40
ref 1* 3 3 2* 1* 2* 3 3 3 3
subme 2* 7 7 6* 6* 6* 7 7 7 7
trellis 0* 1 1 0* 0* 0* 1 1 0* 1
vbv-bufsize 0 0 0 0 2000* 0 0 0 9500* 0
vbv-maxrate 0 0 0 0 768* 0 0 0 9500* 0
weightp 1* 2 2 [0]* [0]* [0]* 2 2 0* 2