1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Last updated at Posted at 2015-09-15

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"
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?