[Hack] Convert any video file for an iPod

Information should be consumable any which way.

Neither my iPod nor my phone support the flv format in which you can download videos from Youtube and several other video sites (using the All-In-One Video Bookmarklet).

I found a very good ruby script that can convert from the flv (or any other format) to mp4 (the format that iPod supports): mp4ize. You can specify the target resolution that you want by editing the file (default is 320×240) and the script will convert the original video to this resolution (by padding the video if the original aspect ratio is different from what you want).

All is good, except that the script fails when the resolution of the original video is less than the resolution that you want (some videos on Youtube are in the weird resolution of 288×240). So I just fixed up the script. You can download it below.

Download p4ize.

To get help on the usage type:

$ mp4ize.rb -h

You will need to install ffmpeg for this script to work.

This entry was posted in Hacks and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
  • About grok.in

    This is a blog primarily focussed on the subjects of Information Engineering—Retrieval, Extraction & Management, Machine Learning, Scalability and Cloud Computing.