Face Blurring in Videos

It is often necessary to blur, pixelate, or black out the faces of test users in videos of user tests, in order to help protect their identity.

ffmpeg

Using ffmpeg's boxblur function, a box can be defined in the video which is to be blurred. Assuming the box remains still, this can be achieved in a single commend line, something like:


ffmpeg -i in.mp4 \
-filter_complex "[0:v]crop=133:145:115:891,boxblur=10[fg]; [0:v][fg]overlay=115:891[v]" \
-map "[v]" -map 0:a -c:v libx264 -preset slow -crf 18 -c:a copy -movflags +faststart \
out.mp4

crop=133:145:115:891 indicates a 133×145 pixel box, located 115 pixels to the right and 145 pixels down from the top left corner.

See https://ottverse.com/blur-a-video-using-ffmpeg-boxblur/ or the ffmpeg documentation for more details.