abhi's logbook

Adventures in coding and coding for adventures.

ffmpeg

ffmpeg -vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab 96 -i input_file.avi -s 320x240 -aspect 4:3 ipod_output.mpg

This creates videos that work fine with the iPod. I had some problems, though. Following command also works (thanks go here):

ffmpeg -i in.avi -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab 192 -s 320x240 -aspect 4:3 out.mp4

For 16:9:

ffmpeg -i in.avi -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab 192 -s 320x180 -aspect 16:9 out.mp4