Maintaining FFMPEG aspect ratio

2019-03-07 19:11发布

I need to convert a bunch of video files using ffmpeg. I run a bash file that converts all the files nicely, however there is a problem if a file converted is not in 16:9 format. As I am fixing the size of the screen to -s 720x400, if the aspect ratio of the original is 4:3, the ffmpeg creates a 16:9 output file, screwing the aspect ratio.

Is there a setting that allows setting an aspect ratio as the main parameter, with size being adjusted (for example, by fixing an X or Y dimension only)?

标签: ffmpeg
7条回答
闹够了就滚
2楼-- · 2019-03-07 19:34

Use force_original_aspect_ratio, from the ffmpeg trac:

ffmpeg -i input.mp4 -vf scale=720:400:force_original_aspect_ratio=decrease output.mp4
查看更多
登录 后发表回答