First off, it’s a good idea to use bitrate.py to calculate a target bitrate for a specific filesize. I usually store videos on my 1GB memory stick, so I calculate the target bitrate based on 885MB. This leaves some overhead for other files you might store on your PSP.
There are quite a bit of steps involved in this, but it produces excellent quality videos that work on your PSP.
This article assumes you have a decent knowledge of the tools listed below and how to use them.
You’re going to need mplayer, x264, normalize, neroaacenc, and mp4box. You will optionally want ffmpeg if you want to create a thumbnail for the video.
To start off, you’ll want to rip the audio.
mplayer -vc null -vo null -ao pcm:fast:file=audio.wav -af lavcresample=48000
normalize-audio –peak audio.wav
neroaacenc -lc -if audio.wav -of audio.mp4 -q 0.35
mp4box -raw 1 audio.mp4
This will dump the audio, resample it to 48 kHz, normalize it, encode it to AAC, and rip the AAC out of the MP4 it creates.
Now you’ll want to encode the video. x264 requires the video to be in a particular format and colorspace before it can encode it. I recommend using AviSynth for Windows. Simple create a script that specifies your video source, and then use ConvertToYV12() to convert the video to a compatible colorspace. You’ll also want to use this to crop, resize, apply other filters. The video can be a maximum of 480×272 in resolution.
x264 –ref 3 –bitrate –pass 1 –partitions all –me tesa –subme 7 –b-rdo –mixed-refs –no-fast-pskip –trellis 2 –qpmin 0 –bime –threads auto –level 30 –progress -o video.264
x264 –ref 3 –bitrate –pass 2 –partitions all –me tesa –subme 7 –b-rdo –mixed-refs –no-fast-pskip –trellis 2 –qpmin 0 –bime –threads auto –level 30 –progress -o video.264
Because we are using such low a bitrate, I recommend grabbing the latest revision of x264 that has psy rdo already patched in. This will greatly increase the quality at low bitrates. Once this is completed, your video will be in a raw H.264 format. We need to put this in a container that the PSP can use.
mp4box -add audio_track1.aac -add video.264 -fps -psp test.mp4
Make sure you specify the correct FPS for the video. Now that this is complete, you can copy the MP4 file to your PSP’s VIDEO directory that resides in the root of the memory stick.
You may also want a thumbnail for the video file.
ffmpeg -y -i -title -s 160×88 -padtop 16 -padbottom 16 -r 1 -t 1 -ss -an -f mjpeg .THM
Replace with the number of seconds into the video you want to capture an image of.
This should be all you need to get a top quality video on your PSP. Enjoy.
This entry was posted in PSP, Software, Videos. Bookmark the permalink. Trackbacks are closed, but you can post a comment.