mencoder -oac lavc \
-ovc lavc \
-of lavf \
-lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=aac \
-af lavcresample=24000 \
-vf harddup \
-lavfopts format=psp:i_certify_that_my_video_stream_does_not_use_b_frames \
-ofps 30000/1001
-vf scale=320:240 # 4:3 -vf scale=368:208 # 16:9
The video title will still unfotunately show up as "-" in the psp display because the "nam:" metadata atom is not set ;^( '-info name=' is reported to work.
width * height must be <= 64000 and both must be multiplies of 16
Notes:
vcodec=mpeg4:vbitrate=250:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo
Filenames must look like: M4V00001.mp4
Some interesting patches for PSP video support: http://www.nurs.or.jp/~calcium/3gpp/sources/
I used Ffmpeg-050310-0.30.tar.gz from mobilehackerz, xvidcore-1.1.0-beta2.tar.gz from xvid, and FAAC CVS snapshot 18-10-2004 from audiocoding.com. Dont forget to apply the patch ffmpeg_patched_diff_031.tar.gz, without it some aspects ratios do not work. There are one or two minor build issues, so read Sönke's instructions carefully. I used the following ffmpeg configuration: ./configure --enable-memalign-hack -enable-gpl --enable-xvid --enable-faac Using ffmpeg to Transcode Videos Here is an example of how to use ffmpeg to transcode a short mpg video to a PSP compatible MP4 file. ffmpeg -y -i cnn.mpg -title "cnn" -timestamp "2005-04-08 03:12:36" -bitexact -vcodec xvid -s 320x240 -r 29.97 -b 1500 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp -muxvb 768 M4V80113.mp4
> Dvd://1 -dvd-device d:\ -aspect 16:9 -of lavf -lavfopts > format=psp:i_certify_that_my_video_stream_does_not_use_b_frames -oac lavc > -ovc lavc -lavcopts > aglobal=1:vglobal=1:coder=1:vcodec=h264:acodec=aac:vbitrate=512:abitrate=64 > -vf scale=368:208,pp=fa,harddup -info name="movie name" -ofps 24000/1001 -o > "D:\PSP\MP_ROOT\100ANV01\MAQ10001.mp4"