Skip to content

Instantly share code, notes, and snippets.

@adriankeenan
Last active March 3, 2024 00:24
Show Gist options
  • Save adriankeenan/7697876187afa2eb101a2ebedbc6d9a0 to your computer and use it in GitHub Desktop.
Save adriankeenan/7697876187afa2eb101a2ebedbc6d9a0 to your computer and use it in GitHub Desktop.
PSP Video Encoding

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment