4/17/2023 0 Comments Ffmpeg scale maintain aspect ratio![]() ![]() Next step is to calculate the output resolution by multiplying the scaling-factor with input-width and input-height: a scaling factor > 1.0) so you add another minimum function: You do this by selecting the smallest scaling factor with the minimum function: You want to fit the scaled image inside the output box and keep the (storage) aspect ratio. A more readable version can look like follows: -filter_complex "scale=iw*min(1\,min(640/iw\,360/ih)):-1"Ħ40/iw is the horizontal scaling factor and 360/ih is the vertical scaling factor ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |