Reputation: 49
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?
Upvotes: 2
Views: 10059
Reputation: 133873
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.
Upvotes: 9