Christian

Kildau

Network Engineer


Welcome to my little blog. I am mostly techie over here, blogging about networking and system administration topics, but there will also be some Travel Reports from time to time…

How to Encode Videos for iPhone or iPod on any Unix using ffmpeg

November 20, 2008Christian Kildau0 Comments

Imagine what? I’m a big fan of the iPhone/iPod touch for mobile entertainment and since I’m also a big fan of the commandline, I of course want to use ffmpeg for video conversion.
But… I’ve been looking for a working ffmpeg config for serveral months now. There were issues with Medibuntu’s version of ffmpeg for Ubuntu Hardy (or at least I had a lot of issues), there were issues with iTunes’ crazy restrictions, there are dozens of (non) working ffmpeg configs on the web… so I just want to share my config with you. It works at least with Ubuntu Intrepid’s and Debian Lenny’s versions of ffmpeg and should work with MacPort’s version too. I’m pretty sure the BSD’s also have a working one. You will also need x264libs and lame.

So, here comes my cmd:

$ ffmpeg -i infile.avi -f mp4 -title your.dot.seperated.title -vcodec libx264
-level 21 -s 480x270 -r 24000/1001 -b 768k -bt 768k -bufsize 2000k -maxrate 768k
-g 250 -coder 0 -threads auto -acodec libfaac -ac 2 -ab 128k outfile.mp4


This will cost you about 270MB of space for a 45min show.

Have fun watching movies on your iPhone/iPod Touch on your way to work or home or whereever.


Leave a Reply

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close