FFMPEG Scale video without filtering

You can rich your goal maybe with scale-down and then scale-up like:

ffmpeg -i in.mp4 -vf scale=iw/4:ih/4,scale=4*iw:4*ih:flags=neighbor out.mp4 

The 4 you can modify to your needs.


ffmpeg -i infile -vf scale=WIDTH:HEIGHT:flags=neighbor outfile

or

ffmpeg -i infile -s WIDTHxHEIGHT -sws_flags neighbor outfile

The critical part here is flags or -sws_flags, which selects the filter (and other scaling-related flags). The default filter value is bicublin (IIRC), which means a bicubic luma and bilinear chroma filter. Nearest-neighbour will do what you're asking for.

See scaler options for a list other scaling algorithms.

Tags:

Ffmpeg