Wednesday, January 16, 2008

Using ffmpeg

The magic key to all the video compression at work in iPSP, PSPWare, and PSP Video 9 is actually a little bit of open source goodness that is developed under Linux, but which can be downloaded and compiled for either Windows or Macintosh: ffmpeg ( There are a variety of options you can set for encoding files with ffmpeg, but the basic procedure for converting your videos to PSP-compatible MPEG4 files via ffmpeg is:

ffmpegi example.movb 300s 320x240vcodec xvid \
ab 32ar 24000acodec aac example.MP4

The file following is the source file, so replace with the location and name of the file you are converting. b 300 sets the bit rate to 300kbps. You can make this number higher if you want higher-quality video, but keep in mind that the higher quality the encoding, the larger the file size, and if you go over 768kbps, the file won't play on your PSP. s 320x240 sets the pixel size for the video, and vcodec xvid forces the codec to be used to xvid.

The next set of instructions contains the audio settings for the encoded file.ab 32 sets the audio bit rate to 32kbps, andar 24000 sets the frequency to 24000 Hz, whileacodec aac sets the codec to be used to aac. Finally, you need to specify the path to the new file (example.MP4).

If you're on Mac OS X and you don't like the idea of compiling ffmpeg, you can always use ffmpegX (; Shareware $15 USD), which provides a GUI front end for ffmpeg and automates all these settings for you. Its most recent version, shown in Figure 3-7, even includes a PSP MPEG4 preset to make things easier.

No comments: