Sunday, May 24, 2020

ffmpeg scale video

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 fail if other dimension does not divide to an integer result
 
https://trac.ffmpeg.org/wiki/Scaling 

No comments:

Post a Comment