I have upscaled and downscaled an image with following command.
ffmpeg -s:v 1280:720 -r 25 -i input.yuv -vf scale=1920x1080 -c:v rawvideo -pix_fmt yuv420p out.yuv
I'm wondering what kind of scaling algorithm is used to do down scaling (bilinear, bicubic,...)?
and how can I change the filter or add it if there is no filter in this command?
If using FFmpeg > 4.4, or a build from the git master branch as of commit lavfi/vf_scale: use default swscale flags for scaler, then the default scaling algorithm is bicubic.
-vf the default scaling algorithm is bicubic.-filter_complex the default scaling algorithm is bilinear.You can choose the algorithm with the flags option:
-vf scale=1920x1080:flags=lanczos
You can see a list of algorithms with:
ffmpeg -h filter=scale
They will be listed under the -sws_flags option which shows bicubic as the default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With