Add Black background to a vertical video I have several vertical videos which I would like to display in the 16/9 or 4/3 format.

I would like to have the video centered and have a black Background.

I normally use Handbrake to compress my videos but did not find an option to do that.

Is there another Video compressor (open source) who allows to do that? Other wise I have to compress it with handbrake and add the background with Premiere, which takes ages.

Really would like an easier solution.

Thanks in advance for any response.
You can use ffmpeg*, a command-line tool, to do this.

Let's say your source video is 360x640, then to make it 4:3, use

ffmpeg -i input.mp4 -vf pad=854:640:247:0 -c:v libx264 -crf 20 -c:a copy output.mp4


where 854 is used because it's 4/3 of 640, and 247 places the video in the center of the padded canvas. See details for the pad filter here.

Similarly for 16:9, use

ffmpeg -i input.mp4 -vf pad=1138:640:389:0 -c:v libx264 -crf 20 -c:a copy output.mp4


where 1138 is used because it's 16/9 of 640, and 389 for centering.

The width value you specify should be an even integer, so you may have to round up/down your calculated width.

*get the latest nightly or snapshot binary for your platform.