BMS BGA HD (1080p) to 4:3 letterboxed at 1:1 using ffmpeg

More than 3 years have passed since last update.

As I am participating in BOFU2015, our team made BGAs in 1080p HD format, but to use them in LR2, we need to convert them to MPEG with 1:1 aspect ratio first.

For that, we first crop the video to 4:3 aspect ratio, then add letterbox.

Screen Shot 2015-09-12 at 1.06.16.png

We need to do both cropping and letterboxing, because otherwise, either the video is too small, or many surrounding details will be removed.

Screen Shot 2015-09-12 at 1.12.31.png

Here is the ffmpeg command I used:

ffmpeg -i "$1" -filter:v "scale=853x480, crop=640:480:107:0, pad=640:640:0:80" -pass 1 -f mpeg1video -b:v 2048k -an -passlogfile log_file -y "$1.mpeg"

ffmpeg -i "$1" -filter:v "scale=853x480, crop=640:480:107:0, pad=640:640:0:80" -pass 2 -f mpeg1video -b:v 2048k -an -passlogfile log_file -y "$1.mpeg"

512x512 version

ffmpeg -i "$1" -filter:v "scale=683x384, crop=512:384:86:0, pad=512:512:0:64" -pass 1 -f mpeg1video -b:v 2048k -an -passlogfile log_file -y "$1.mpeg"

ffmpeg -i "$1" -filter:v "scale=683x384, crop=512:384:86:0, pad=512:512:0:64" -pass 2 -f mpeg1video -b:v 2048k -an -passlogfile log_file -y "$1.mpeg"