6

I have a 3840x1920 video and want it to be 1920x1080 without it being stretched.

  • I have already resized it to 1920x960, but I want to add black bars for it to be 1920x1080

I used the commands below to resize it, but I don't know what is next to change its height without being stretched.

ffmpeg -i input.mp4 -vf scale=1920:960 output.mp4
ffmpeg -i input.mp4 -vf "scale=iw*0.5:ih*0.5" output.mp4
Ali Khakbaz
  • 1,057
Mike
  • 61

1 Answers1

12

This question on StackOverflow seems to be asking for a similar thing regarding black bars.

Quoting the accepted answer:

Use

-vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1"

The scale will ensure that its output fits within 1920x1080. The pad then fills that out.

Toby Speight
  • 5,213