Once in a while I need to convert some video files so they are playable on my Ipod. I can never remember all the parameters I need to specify to ffmpeg, so I hacked together a small scripts that does all the magic. It does a two-pass encoding of the video file and the quality is quite nice.

You can get the script here. If ffmpeg complains about missing codecs, etc. simply get it from Debian Multimedia.

If you insist on running ffmpeg directly you can try these parameters, that’s what I used to do before I made the script.

ffmpeg -i [in file] -vcodec xvid -b 384 -s 320x240 -qmin 2 -qmax 5 -bufsize 4096
-acodec aac -ab 96 -g 300 -pass [1 or 2] -passlogfile /tmp/ffmpeg.stats -f mp4 [out file]