This is the ffmpeg command I've used to encode movies for movies for the Sony PSP. Different parts are shamelessly copied from other posts online.
The main benefit is that the resolution is set correctly, eg a non-16:9 source is scaled to fit within 480x272.
ffmpeg -i input.mkv -vcodec libx264 -b:v 500k -vf scale=w=480:h=272:force_original_aspect_ratio=decrease -profile:v main -level:v 2.1 -x264-params ref=3:bframes=1 -acodec aac -b:a 128k -ac 2 out.mp4
If the framrate is higher than 30, I expect you'll need to reduce it (eg with -r 30
) for compatibility.