onlydarksets

Just another WordPress.com weblog

Convert for iPhone using mencoder/ffmpeg

Posted by onlydarksets on June 13, 2008

UPDATE: Check my newer post for detailed instructions.

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:

iphone video
INFILE=”$1″
OUTFILE=”$2″
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.

3 Responses to “Convert for iPhone using mencoder/ffmpeg”

  1. dudek said

    The original web cite you cite should be up (it’s mine) and it includes a few minor adjustments and updates.

  2. Interesting – I still can’t access your site, but I see it’s not down. Did you switch DNS servers lately?

    Edit: OK, now I can see it. Not sure what was going on. I took down the bulk of the text, since I only posted it because I thought it would get lost in the ether.

  3. [...] http://onlydarksets.wordpress.com/2008/06/13/convert-for-iphone-using-mencoderffmpeg/ [...]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>