How to do that? I need a fast method to make Instagram moments of ready videos without using video editor.
Asked
Active
Viewed 6,005 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
- 36,303
ffmpeg -y -i "mobile_input.mp4" -filter_complex "[0:v]setpts=1.5*PTS,scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:white,setsar=1/1,setdar=16/9[v];[0:a]atempo=(1/1.5)[a]" -map "[v]" -map "[a]" output.mp4More info then the original question... but it may help someone.. – Roel Van de Paar May 30 '19 at 00:35