https://www.ffmpeg.org/download.html
Keeping the Aspect Ratio
If we'd like to keep the aspect ratio, we need to specify only one component, either width or height, and set the other component to -1. For example, this command line:
ffmpeg -i input.jpg -vf scale=320:-1 output_320.png
will set the width of the output image to 320 pixels and will calculate the height of the output image according to the aspect ratio of the input image. The resulting image will have a dimension of 320⨉207 pixels.
No comments:
Post a Comment