0

https://ffmpeg.org/ffmpeg-scaler.html

ffmpeg -i in.png -vf scale=3840:2160 -sws_flags lanczos out.png

-vf scale=3840x2160:flags=lanczos

I went down the list upscaling a 720p image to 4k using the various ones on the documentation, lanczos is input above. I tried the variation below as well. I noticed 0 difference after tossing them in gimp and zooming in and comparing....exact same. I also noticed it doesn't matter what I type, i could call them something wrong or spell them wrong and the command works the same. They don't seem to be applying at all. Is there any indication in command prompt as to what scaling algorithm is being used so I can confirm ? I didn't see any difference.

enter image description here

3
  • Set -v 40 to see selected algo.
    – Gyan
    Mar 7, 2019 at 4:48
  • w: 3840 h: 2160 flags: 'bicubic' interl:0......it keeps saying bicubic regardless of what I put in the commands. Hash program also telling me they are indeed the exact same images.
    – kite
    Mar 7, 2019 at 5:03
  • 1
    Bug with -sws_flags but -vf scale=3840x2160:flags=lanczos works here.
    – Gyan
    Mar 7, 2019 at 7:43

1 Answer 1

1

Use the print_info flag to see what the scaler is doing, example from an actual conversion:

-filter:v "scale=w=1280:h=-2:flags=print_info+bicubic"

Part of the relevant output:

[Parsed_scale_0 @ 000001d8187fef00] w:1280 h:-2 flags:'print_info+bicubic' interl:0
[swscaler @ 000001d819bc7fc0] bicubic scaler, from yuv420p to yuv420p using MMXEXT
[swscaler @ 000001d819bc7fc0] 1920x804 -> 1280x536
Parsed_scale_0 @ 000001d8187fef00] w:1920 h:804 fmt:yuv420p sar:1/1 -> w:1280 h:536 fmt:yuv420p sar:1/1 flags:0x1004

Edit: I also always use "-loglevel verbose", don't know if that changes the level of detail the scaler filter outputs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.