Kagami / boram

:film_strip: Cross-platform graphical WebM converter
https://github.com/Kagami/boram/releases
433 stars 30 forks source link

Support -n as scale value #35

Closed OrcaXS closed 5 years ago

OrcaXS commented 5 years ago

Currently, inputting scale values like -1 x 320 will throw bad range error. According to https://trac.ffmpeg.org/wiki/Scaling, ffmpeg -i input.jpg -vf scale=320:-1 output_320.png is a valid command and a recommended way for keeping aspect ratio after scaling as well.

Kagami commented 5 years ago

You can just omit value to get the same behavior as -1. If I remember correctly negative values are not allowed intentionally, to simplify getFinalWidth and getFinalHeight routines.