Convert for iPhone using mencoder/ffmpeg
Posted by onlydarksets on June 13, 2008
I found this through the Google cache of I found this at http://www.dudek.org/blog/82. I’m not sure why I couldn’t access it before, but, like Mark Twain, the reports of it’s death were greatly exaggerated. For me, the most relevant part is the ffmpeg command line:
ffmpeg -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5
-bufsize 4096 -g 300 -acodec aac -ab 192 -s 480×320 -aspect 4:3 -i “$INFILE” “$OUTFILE”
This should be fine with any ipod-like device, but it is customized for the iPhone screen size. The -s 480×320 refers to the size of the iPhone screen; customization for the video iPod would use the same incantation, but with a screen size of 320×240 to produce slightly smaller files. On the other hand, showing the video on TV would benefit from the larger size, or even 640×480. The Apple TV uses as much as 1280×720. (It is never worth using a larger size than your input footage, however, which is often limited to 640×480 for NTSC.)
I’ll look into whether ffmpeg can do dynamic aspect ratios like mencoder when I get a chance.