Search code examples
ffmpegscale

How to Resize Video 720:1280 Bigger Height, Width and Crop To 1280:720 using ffmpeg?


I have video Original size 720:1280 and want to convert it to size 1280:720 but before converting I want to increase it bigger first.

I have a video original size 720:1280 Below

Using Code Below, I can resize the video to 1280:720 but it is not the result that I want.

ffmpeg -i input.mp4 -filter_complex scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1:color=black output.mp4

enter image description here

This is what I want to get. Please Help Me To solve the problem. Your answer is so important to me. Thank you so much. I am waiting your reply.

This is what I want to get


Solution

  • Apply the crop first.

    -filter_complex crop=720:824,scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1:color=black