[FFmpeg-user] How to add black bars as replacement for height?

Moritz Barsnick barsnick at gmx.net
Tue Nov 8 09:05:44 EET 2022


On Tue, Nov 08, 2022 at 03:02:36 +0100, FFmpeg user discussions wrote:
> Can I use ffmpeg to convert a 1920x800 resolution clip to 1920x1080? The
> goal is to fill the remaining pixels with a true black bar.

Have a look at the pad filter:
https://ffmpeg.org/ffmpeg-filters.html#pad-1

Something like
$ ffmpeg -i inputfile -vf "pad=h=1080:y=(oh-ih)/2" outputfile

The "y" expression is for centering the video vertically.

Cheers,
Moritz


More information about the ffmpeg-user mailing list