How to do that? I need a fast method to make Instagram moments of ready videos without using video editor.
Asked
Active
Viewed 6,454 times
1 Answers
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