How to quickly blur faces in videos (Mac)
If you need to run a clip through a tool that automatically blurs every face in frame, there's a great open-source CLI called deface. One command and you're done - no editor needed.
It works by detecting human faces frame by frame and applying a blur (or black box, or mosaic) on each detected region. Audio is discarded by default.
Install
On modern macOS plain pip won't work due to PEP 668, and Homebrew doesn't ship a deface formula. The right path is via pipx, which installs CLI tools into isolated environments.
brew install pipx
pipx ensurepath
After ensurepath, restart the shell (exec fish), then:
pipx install deface
Verify:
deface --help
Apple Silicon acceleration
By default deface runs on CPU. To get hardware acceleration on M-series Macs, inject the Apple-Silicon ONNX Runtime build. deface ships an optional ONNX Runtime backend; if multiple Execution Providers are installed, ONNX Runtime picks the fastest one automatically, so no extra flag is needed:
pipx inject deface onnxruntime-silicon
Next time you run deface, CoreML will be used under the hood.
Usage
The simplest case:
deface input.mp4
Output: input_anonymized.mp4 next to the original.
Useful flags
# multiple files at once (or shell glob)
deface video1.mp4 video2.mp4
deface *.mov
# replace blur with solid black boxes
deface --boxes input.mp4
# or a mosaic instead of blur
deface --replacewith mosaic --mosaicsize 20 input.mp4
# tune detection sensitivity (default is 0.2)
deface --thresh 0.15 input.mp4
# keep the audio track (it's dropped by default)
deface --keep-audio input.mp4
A note on --thresh: the default of 0.2 works well on most test videos. Raise it if you get false positives (blur on non-face regions), lower it if faces in profile or partially occluded faces get missed.
Battle-tested preset
For maximum coverage on an M-chip Mac:
deface --thresh 0.15 --keep-audio *.mov
Runs every .mov in the current folder with a slightly more aggressive detector and preserves audio.
When it's not enough
If you need manual control — pick which face to blur and which to keep, or blur something other than a face — reach for DaVinci Resolve Free (Magic Mask) or CapCut. But for the "shot in public, need to publish without bystanders" task, deface handles it in one pass.