2

How to do that? I need a fast method to make Instagram moments of ready videos without using video editor.

mevsme
  • 241

1 Answers1

4

The method below assumes that the source aspect ratio isn't greater than 720/1280.

ffmpeg -i in.mp4 -vf scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2,setsar=1 out.mp4

The force_original_aspect_ratio in the scale 'fits' the video within the dimensions specified. The pad then expands the canvas to get the size desired.

Gyan
  • 38,955