Converting Videos for the iPod Video

Soon after buying my Video iPod, I wanted to put my massive library of videos onto it, so I could watch them on long trips without carrying along my entire laptop. I wrote a small shell script to perform the mundane task of converting for me, using the free, open-source tool ffmpeg (<a href="http://ffmpeg.org">http://ffmpeg.org</a>;).

Shell Script for iPod Video Conversion:

#!/bin/bash # video2ipod conversion script # Christopher Gilbert # September 26, 2006 # # Usage: # video2ipod infile outfile

if [ -z "$2" ]; then echo $0 "infile outfile" else echo "ffmpeg -i `pwd`/$1 -f mp4 -s 320x240 `pwd`/$2" ffmpeg -i "`pwd`/$1" -f mp4 -s 320x240 "`pwd`/$2" fi

After copying this to a file, you must give the script execute permissions: $ chmod +x video2ipod

To run the script, you supply it with a file to convert, as well as the desired output file: $ video2ipod Chemical_Brothers_-_Believe.wmv Chemical_Brothers_-_Believe.mp4

Voila! Your video is ready to be loaded onto your iPod!

Hope this helps, Motoma

Post your comment

Comments

No one has commented on this page yet.

RSS feed for comments on this page