#!/bin/bash ##OPTIONS="-vf pullup,softskip,hqdn3d,pp=ac -fps 29.97 -ofps 23.976" OPTIONS="-vf pullup,softskip,hqdn3d,pp=ac -fps 25.00 -ofps 23.976" ##OPTIONS="" COMMON="bitrate=700:frameref=7:bframes=3:direct_pred=auto:8x8dct:me=umh:subq=7:brdo:bime:nr=500:threads=2:ssim:trellis=2:b_pyramid:weight_b:mixed_refs:me_range=24" echo x264 3pass "$@" $COMMON $OPTIONS sleep 3 rm -f test.avi test.ogg test.wav test.mkv x264pass.log (nice mencoder "$@" -o test.avi -passlogfile x264pass.log -ni -oac copy -ovc x264 -x264encopts $COMMON:turbo=1:pass=1 $OPTIONS && nice mencoder "$@" -o test.avi -passlogfile x264pass.log -ni -oac copy -ovc x264 -x264encopts $COMMON:pass=2 $OPTIONS ) & (nice mplayer -channels 4 -quiet -ao pcm:fast:file=test.wav -vo null -vc null "$@" && nice normalize -q test.wav && nice oggenc -Q -q 4 test.wav) & wait mkvmerge --engage allow_avc_in_vfw_mode -o test.mkv --aspect-ratio 0:1.78 -A test.avi test.ogg echo Done\!