画質を気にするなら、もちろんtwo-passを行うべきです。1st パスに turbo を使うと少し時間を節約できます。これでsubqとframerefが1になります。また容量を少し節約する為に、 ss を使うのも良いでしょう。これで最初の数秒をカットできます。この素材では32秒ぶんのクレジットとロゴが入っていました。bframesは0か1。その他のオプションは Encoding with the x264 codec と man pageを見て下さい。
mencoder dvd://1 -o /dev/null -ss 32 -ovc x264 \
-x264encopts pass=1:turbo:bitrate=900:bframes=1:\
me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 \
-vf crop=720:352:0:62,scale=-10:-1,harddup \
-oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 \
-ofps 24000/1001
マルチプロセッサを持っているなら、threads=autoを忘れないように。x264のマルチスレッドモードで圧縮時間が劇的に短縮します。
2ndパスは、 pass=2 指定を除いて同じ。
mencoder dvd://1 -o narnia.avi -ss 32 -ovc x264 \
-x264encopts pass=2:turbo:bitrate=900:frameref=5:bframes=1:\
me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 \
-vf crop=720:352:0:62,scale=-10:-1,harddup \
-oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 \
-ofps 24000/1001
こうしてできたAVIはMPlayerでは完璧に再生できますが、H.264-in-AVIをサポートしていないQuickTime では無理です。ここからMP4 コンテナにremuxする必要があります。
You are now ready to encode the video. Since you care about quality, of course you will be doing a two-pass encode. To shave off some encoding time, you can specify the turbo option on the first pass; this reduces subq and frameref to 1. To save some disk space, you can use the ss option to strip off the first few seconds of the video. (I found that this particular movie has 32 seconds of credits and logos.) bframes can be 0 or 1. The other options are documented in Encoding with the x264 codec and the man page.
mencoder dvd://1 -o /dev/null -ss 32 -ovc x264 \
-x264encopts pass=1:turbo:bitrate=900:bframes=1:\
me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 \
-vf crop=720:352:0:62,scale=-10:-1,harddup \
-oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 \
-ofps 24000/1001
If you have a multi-processor machine, don't miss the opportunity to dramatically speed-up encoding by enabling x264's multi-threading mode by adding threads=auto to your x264encopts command-line.
The second pass is the same, except that you specify the output file and set pass=2.
mencoder dvd://1 -o narnia.avi -ss 32 -ovc x264 \
-x264encopts pass=2:turbo:bitrate=900:frameref=5:bframes=1:\
me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 \
-vf crop=720:352:0:62,scale=-10:-1,harddup \
-oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 \
-ofps 24000/1001
The resulting AVI should play perfectly in MPlayer, but of course QuickTime can not play it because it does not support H.264 muxed in AVI. So the next step is to remux the video into an MP4 container.