i'd like to extract thumbnails from videos. the problem i'm running into is that the boundaries of the reduced images aren't clear due to edge effects in the scaling algorithm. here is a simple mire test pattern to show what i mean : ffmpeg-extracted image of test pattern you can see here especially on the edges of the blue, red, and magenta fields that the borders have become indistinct due to blending from aliasing in the original video.
i want it to look more like this : same test pattern, idealised
i've tried all of the different scaling algorithms ; fast_bilinear
and neighbor
appear to work best, w/sws_dither
set to none
. however, i still can't get the results i'm looking for. is there some sort of 'fuzz' factor one can specify, as with image magick, or some way to have ffmpeg change the colours of edges to the same as other near colours, in order to 'flatten' or reduce the number and complexity of colours in the final image ?
EXAMPLE COMMAND LINE :
ffmpeg -hide_banner -i "$infile" -vf "scale=w=100:h=-1:sws_dither=none:sws_flags=neighbor" -y $output
format=rgb24
before the scale filter and check.