Hi,

I have created a perl script you can use on UNIX or MacOS.

Tested with:

MacOS 10.5.4 - ffmpegx
Ubuntu 8.0.4 - (apt-get version, SVN-r14381, and the version with pspvc)

I highly suggest you compile your own ffmpeg. Here is my version that I compiled:
/usr/local/bin/ffmpeg -i
FFmpeg version SVN-r14381, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-libx264 --enable-libfaac --enable-liba52 --enable-libdc1394 --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libxvid --enable-libfaad --enable-libgsm --enable-swscale --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
libavutil version: 49.7.0
libavcodec version: 51.60.0
libavformat version: 52.18.0
libavdevice version: 52.0.0
built on Jul 28 2008 13:51:41, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

I had to compile x264 and xvidcore-1.1.3 also. Believe I had to compile x264 with --enable-shared also. You will also have to install the dev packages for those libraries listed in the ffmpeg output.

You can use this to encode for PSP, iPod, iPhone, iPod touch and Zune.

To queue multiple things just make a simple shell script that just calls the program many times.

You may need to modify the following variables:
$output_folder
$ffmpeg
They are at the top of the perl script.

Some of the comments and stuff in the script could be old and outdated information, or where I learned new stuff as I progressed.

./encode-handheld.pl -h

PSP & iPod h264 video and AAC audio encoder.
Zune 30GB Windows Media 8 A/V encoder.

usage: ./encode-handheld.pl [-hl] [-t ipod|psp|zune|zune30] [-s XXXXX] [-n title] [-f file]

-h : this (help) message
-a : hard box the video
(pillarbox and letterbox the video, AR set to AR of screen size)
-v : displays version
-l : legacy psp file naming
-s XXXXX : 5 digit legacy numbering sequence
-f file : file to encode
-n title : psp title displayed when using legacy naming
or file is renamed to this value
-t type : psp, ipod, zune, or zune30 encoding
-o XXX : volume 1x=256, 2x=512, 3x=768 (def 1024)
-c XXX : thumbnail capture time in seconds (def 120)
-z XXX : encode time in seconds (def whole thing)
-j XXX : start encode time in seconds (default beginning)
-b : encode using b frames (psp only) (def no)
-p : 2 pass encoding
-i : iPhone & iPod touch PSP compatible profile (switches coder to 0)
these 2 devices only support up to 480x270. It will not
support widths less than 480 unless its 320x240. Any
custom height can be used as long as the 480 width is used.

example: ./encode-handheld.pl -t psp -l -s 10101 -n "My Video" -f file -v 768 -c 120
example: ./encode-handheld.pl -t psp -f file
example: ./encode-handheld.pl -t psp -f file -n "hookah"
example: ./encode-handheld.pl -t zune30 -f file
example: ./encode-handheld.pl -t zune30 -f file -n "hookah"
example: ./encode-handheld.pl -t ipod -f file
example: ./encode-handheld.pl -t ipod -f file -n "hookah"


Please test it out and give me feedback or ways to make it better.

Thanks,

-HR


encode-handheld-2.5.tar.gz