In this example, 720 (original height) must be explicitly stated for the crop. By combining scaling and cropping, the example script below scales/crops 30 pixels from each side of the input with the minimum loss of image. Q3: What variant of Lanczos is used in default lanczos from scale and zscale? Are these both Lanczos3? The number of taps for Lanczos3 can be defined as 3 or 6 ( source1, source2). Referencing original Height and Width of input. Q2: The descriptions of param0 and param_aare a little different - do these parameters define same thing? Q1: Are there any important differences between scale and zscale in terms of quality? Which one could be better to use to downscale the video? Lanczos can use additional parameter here: param_a is defined as "the number of filter taps", I don't know its default value. Lanczos can use additional parameter here: param0 is defined as "the width (alpha)", its default value is 3.įFmpeg can use zscale with lanczos, spline16 and spline36 parameters. Variants of the algorithm are defined by "the number of filter taps".įFmpeg can use scale/ sws_flags with lanczos and spline parameters. Spline ( documentation), it has a few variants: Spline16, Spline36 (and others) Lanczos ( documentation), it has a few variants: Lanczos3, Lanczos4 (and others) I noticed 0 difference after tossing them in gimp and.
I went down the list upscaling a 720p image to 4k using the various ones on the documentation, lanczos is input above. There are two filters best to downscale the video ( source): ffmpeg -i in.png -vf scale3840:2160 -swsflags lanczos out.png -vf scale3840x2160:flagslanczos. Note: I've read that -sws_flags method can be sometimes buggy ( source) and in these cases FFmpeg will use its default filter, not the selected one. There are three main methods with these options to select resize filter: Notice that once you start decoding-filtering-encoding (i.e., no copy) the process will be much slower (x100 time slower or even more). It looks like scale is the default scaler and zscale requires additional library to enable it. Video copy will ignore the video filter chain of ffmpeg, so no scaling is available (man ffmpeg is a great source of information that you will not find on Google). There are two main options to scale the video in FFmpeg: scale ( documentation) and zscale ( documentation).