I need to blur some uploaded videos and encoded them. Infact by blur, it means pixellate them so "big squares" appear and blur it.
Any idea on how I can do that ? (ffmpeg would be great, by any command line windows tool should be ok)
Thanks.
I need to blur some uploaded videos and encoded them. Infact by blur, it means pixellate them so "big squares" appear and blur it.
Any idea on how I can do that ? (ffmpeg would be great, by any command line windows tool should be ok)
Thanks.
If you don't want to install the frei0r plugin for this, there's an alternative way.
dimensions=$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of "csv=p=0:s=\:" input)
ffmpeg -i input -filter_complex \
"[0:v] scale='iw/15:-1', scale='$dimensions:flags=neighbor'" output
This scales down the input size (in this example, by 15) and then scales it back up to the original dimensions. The flags=neighbor tells ffmpeg to use the nearest neighbor rescaling algorithm which results in the pixelated effect. You can change the block size by changing the number 15.
The first line is needed to find out the input's original dimensions and scale back directly to it, otherwise the scaling down and scaling up might result in rounding errors that slightly alter the size of the output.
head and sed by using "csv=p=0:s=\:".head in for when the input has a video and audio stream, because you get a blank line for the dimensions of the audio stream.-select_streams v:0.ffmpeg -i input -filter_complex "[0:v] scale='iw/15:-1', scale='iw*15:-1:flags=neighbor'" output

Example:
ffmpeg -i input -vf "frei0r=filter_name=pixeliz0r:filter_params=0.02|0.02" output
The two pixeliz0r filter_params parameters are:
Larger values will create larger blocks.
Windows users can get the "full build" from gyan.dev.
Linux users can download or compile:
frei0r.h (such as frei0r-plugins-dev in Ubuntu or frei0r-devel in CentOS) and then add --enable-frei0r to your ffmpeg configure. See FFmpeg Wiki: Compile Guides.macOS users can use Homebrew. You may need the --with-frei0r option.
The pixelize filter can do the trick:
ffmpeg -i input -vf pixelize=300 output
Replace 300 with your intensity (limited to 1024).