How to automatically pixelate every face in a video with ai
- Step 1Drop your video onto the tool — Drag an MP4, MOV, MKV, WebM, or AVI onto the drop zone. Nothing uploads — the file is opened as a local object URL and decoded by your browser. Face pixelate needs the Pro-Media tier (100 GB / 50 files) or Developer (100 GB / unlimited); it is unavailable on Free and Pro.
- Step 2Wait for the one-time detector warm-up — On first run the stage shows
Loading face detector (one-time WebGPU + model warm-up)while TensorFlow.js compiles shaders and loads the MediaPipe model. It runs a warm-up inference at t=0 so the progress bar moves honestly instead of stalling on 'sample 1'. - Step 3Set the sample rate —
Sample rate (Hz)(1–15, default 4) is how many frames per second are sampled for detection. Higher catches fast-moving faces and short appearances but adds detection time; lower is faster but can miss a face that appears for under ¼ second at 4 Hz. - Step 4Set the pixel (mosaic block) size —
Pixel size(4–40, default 16) is the downscale factor. A 200px-wide face atPixel size16 is mosaiced to ~12 blocks across. Larger values = bigger blocks = stronger anonymisation; smaller values = finer mosaic that still leaves some facial structure. - Step 5Set padding around each face —
Padding (0–1)(default 0.25) grows each detection box by that fraction of its width/height before mosaicing — so ears, jawline, and hairline are covered, not just the tight bounding box. 0 = exact box; 1 = double-size box. - Step 6Run and download the MP4 — The detect stage fills the first 40% of the bar; the libx264 encode fills the rest, showing
Pixelating faces · N faces · t/total s. The output is always an MP4 (yuv420p, CRF 20) with the original audio copied. Verify the mosaics in the preview before publishing.
Face pixelate controls (the real client UI)
Exactly the three controls in the Face pixelate (AI) panel — no presets, no per-face selection, no blur-strength slider (that is the separate face-blur tool). Ranges and defaults are enforced in the processor.
| Control | Range | Default | What it changes |
|---|---|---|---|
Sample rate (Hz) | 1–15 | 4 | Frames per second sampled for detection. Clamped to [1,15] in code. Higher = better coverage of fast/brief faces, slower detect |
Pixel size | 4–40 | 16 | Nearest-neighbour downscale factor per face region. Region is scaled to w/pixelSize × h/pixelSize then back up. Larger = bigger mosaic blocks |
Padding (0–1) | 0–1 | 0.25 | Fraction the detection box is grown on each side before mosaicing. 0 = tight box; 0.25 covers hairline/jaw; 1 = double size |
Detection and encode pipeline (grounded in video-processor.ts)
What actually happens between drop and download. These are fixed behaviours, not options.
| Stage | Implementation | Consequence for your output |
|---|---|---|
| Model | MediaPipe FaceDetector, modelType: short, runtime tfjs | Tuned for faces near the camera (~within 2 m). Small/distant faces detect poorly — see the street-footage spoke |
| Backend | WebGPU → WebGL → CPU (first available) | Detection is fast on a GPU; on CPU fallback it still works but the sample loop is much slower |
| Clustering | IOU ≥ 0.2 merges a detection into an existing track | Two faces that overlap heavily can merge into one track; a face that jumps position can split into two tracks |
| Track cap | 12 most-detected tracks kept (TRACK_LIMIT = 12) | If a crowd produces >12 clusters, the 12 with the most hits win; rare noise clusters are dropped |
| Redaction box | One static rectangle = union of all the track's positions, padded | A face that moves across frame gets its whole travel path covered by one box, not a snug box that follows it |
| Time window | enable='between(t, minT−period, maxT+period)' | Mosaic is active from one sample before first detection to one after last — small margin, not the full clip |
| Encode | libx264 -preset ultrafast -crf 20 -pix_fmt yuv420p, -c:a copy | Output is always MP4; whole video is re-encoded (visually near-lossless at CRF 20); audio untouched |
Cookbook
Concrete settings for common clips, written as before → after notes. The tool re-encodes the full frame; only the face regions change visually.
One talking-head interview, default settings
A single face that fills a chunk of the frame and barely moves. Defaults are tuned for exactly this. The track is one cluster; the mosaic box is stable.
Input: interview_1080p.mp4 (one face, slow movement)
Settings: Sample rate 4, Pixel size 16, Padding 0.25
Detection: 1 track, high hit count
Filter: split=2 → crop face → scale 1/16 → scale back (neighbor)
→ overlay enable between(t, 0.000, end)
Output: interview_1080p_out.mp4 (mosaic over the one face, audio copied)Two people on screen, stronger anonymisation
Two faces side by side. As long as their boxes don't overlap past IOU 0.2 they stay as two tracks. Bumping Pixel size from 16 to 28 removes more residual facial structure for compliance-grade output.
Input: panel_two_speakers.mp4 Settings: Sample rate 4, Pixel size 28, Padding 0.3 Detection: 2 tracks Filter: split=3 → two crop/scale/scale chains → two overlays Output: two large-block mosaics, one per speaker Note: at Pixel size 28 a 200px face = ~7 blocks across — heavy anonymisation
Fast-moving subject — raise the sample rate
A face that turns quickly or appears for under a second. At 4 Hz a half-second appearance is only ~2 samples; raising to 10 Hz catches more frames so the track's time window and union box are tighter and more complete.
Input: quick_cameo.mp4 (face on screen ~0.6 s)
Settings: Sample rate 10, Pixel size 16, Padding 0.25
Why: at 4 Hz that face = ~2 detections → may not cluster reliably
at 10 Hz = ~6 detections → solid track, accurate enable window
Trade-off: detection takes ~2.5x longer (more frames sampled)Pixelate the face, mute the name in audio
Anonymising a face often pairs with bleeping a spoken name. Face pixelate copies audio untouched, so do the audio step separately. Run face pixelate, then drop the result into the audio region muter.
Step 1: face-pixelate → faces mosaiced, audio = original
Step 2: open /video-tools/audio-mute-region
mute 00:41–00:43 where the name is spoken
Result: face hidden AND name silenced, both done locallyDetector misses a face — switch to manual region
If a face is at a steep profile, heavily occluded, or far from camera, the short-range model may not detect it and it will not be mosaiced. There is no manual face picker in this tool. Use the video redactor to draw a fixed mosaic/blur rectangle by hand.
Symptom: one face in the crowd comes out un-pixelated
Reason: short-range model didn't detect it (profile / distance)
Fix: /video-tools/video-redactor → draw a manual region over it
(auto-detect handles the rest; manual covers the miss)Edge cases and what actually happens
No faces detected anywhere
Error: no facesIf every sampled frame returns zero boxes, the run throws No faces detected. Try lowering the sample rate or use a clearer source. Common causes: faces too small/distant for the short-range model, extreme profiles, heavy motion blur, or very dark footage. Try a higher sample rate, or use the video redactor to draw the region manually.
Output is always MP4, never the source container
By designEven if you drop a MOV, MKV, or WebM, the result is re-encoded to MP4 (libx264, yuv420p, +faststart). The tool does not preserve the input container or video codec. If you need a specific output format, transcode the MP4 afterward with the video transcoder.
A face moves across the frame
Covered (path union)The redaction box is the union of every position the track occupied, not a box that follows the face per-frame. So a subject walking left-to-right gets a wide rectangle covering the whole travel path mosaiced for the track's time window. Identity is hidden; the covered area is larger than the face at any single instant.
More than 12 faces in frame
Capped at 12 tracksTRACK_LIMIT = 12: only the 12 tracks with the most detections are kept and mosaiced. In a large crowd, faces in fewer frames may be left un-pixelated. For dense crowds, also consider downscaling/cropping the shot first, or manual passes with the video redactor.
Two faces overlap and merge into one box
Merge (IOU 0.2)Detections merge into the same track when IOU exceeds 0.2. Two people standing close can therefore be covered by a single larger mosaic. This still anonymises both; it just produces one rectangle rather than two snug ones.
Brief appearance below the sample interval
May be missedAt the default 4 Hz, a face on screen for under ~0.25 s might be caught in zero or one frames and fail to form a stable track. Raise Sample rate (Hz) toward 10–15 to catch fleeting faces, at the cost of longer detection time.
Pixel size below detail threshold
Weak anonymisationAt small Pixel size (4–8) the mosaic blocks are fine enough that facial structure can remain partially recognisable on large close-up faces. For compliance anonymisation use 20–40. The value is clamped to the 4–40 range regardless.
Detected box clamped outside the frame
Error: region invalidAfter padding, boxes are clamped to the frame and any region smaller than 4px is dropped. If every region collapses, the run throws Detected faces fell outside the frame after clamping. Try a clearer source or reduce padding. Lower Padding and re-run.
Tier gate on Free / Pro
Tier requiredFace pixelate is minTier: pro_media. On Free (1 GB / 1 file) and Pro (10 GB / 5 files) the tool is gated. Pro-Media allows 100 GB / 50 files and Developer 100 GB / unlimited files. Video size limits are streaming-based — there is no minutes cap, only file size and batch count.
Frequently asked questions
What model does the auto-detection use?
TensorFlow.js with @tensorflow-models/face-detection — specifically the MediaPipe FaceDetector, modelType: short (short-range). It runs on the WebGPU backend when your browser supports it, falling back to WebGL then CPU. The short-range model is optimised for faces near the camera, so it is excellent for interviews and portraits and weaker on small, distant faces.
Is this mosaic or Gaussian blur?
Mosaic (pixelation). Each face region is cropped, downscaled with nearest-neighbour by your Pixel size, then upscaled back — producing hard-edged blocks, the TV-news/documentary anonymisation look. If you want a smooth Gaussian-style blur instead, use the separate face blur tool, which exposes a blur-strength control rather than a pixel-size control.
Can I pick which faces to pixelate, or pixelate just one person?
No. This tool is fully automatic — it mosaics every face it detects (up to 12 tracks). There is no per-face toggle and no manual picker in the UI. To redact a specific person, object, screen, or license plate by hand, use the video redactor, which lets you draw a fixed region.
What is the pixel size and how big should it be?
Pixel size (4–40, default 16) is the nearest-neighbour downscale factor. At 16, a 160px-wide face becomes ~10 blocks across. For strong, compliance-grade anonymisation use 24–40; for a lighter mosaic that hints at a face use 8–12. Larger faces need a larger pixel size to fully obscure identity.
What does the sample rate do?
Sample rate (Hz) (1–15, default 4) controls how many frames per second are sampled for detection — it does not change the output frame rate. Higher values catch fast-moving or briefly-appearing faces and produce tighter time windows, but lengthen the detection stage. Lower values are faster but can miss short appearances.
Does it track a moving face frame-by-frame?
Not as a moving box. Detections are clustered into a track, and a single static rectangle equal to the union of all that track's positions is mosaiced for the track's time window. A subject who walks across the shot gets a wide rectangle covering the entire path. Identity is hidden; the covered area is larger than the face at any one moment.
What output format do I get?
Always an MP4 — H.264 (libx264) video, yuv420p, CRF 20, encoded -preset ultrafast with +faststart. The original audio is stream-copied (-c:a copy) so it stays byte-identical and in sync. The input container/codec is not preserved; transcode afterward with the video transcoder if you need WebM, MOV, etc.
Does my video upload anywhere?
No. The video is loaded as a local object URL into an offscreen <video> element for detection, and encoding runs in FFmpeg.wasm inside your tab. Frames and the file never leave your machine. The only server interaction is a usage counter (no content) for signed-in dashboard stats.
Why is the first run slow to start?
The detector loads once: TensorFlow.js initialises a backend, downloads the MediaPipe model, and compiles WebGPU shaders. You'll see Loading face detector (one-time WebGPU + model warm-up). Subsequent runs in the same session reuse the cached detector and start immediately.
What if some faces stay un-pixelated?
The short-range model can miss steep profiles, occluded faces, very small/distant faces, or faces in dark or motion-blurred frames. Raise the sample rate first. If a specific face is still missed, cover it manually with the video redactor after the auto pass — they compose cleanly since both write standard MP4.
Does pixelating the face also remove metadata or audio identifiers?
No. This tool only changes pixels in face regions; audio is copied unchanged and file metadata is untouched. To strip GPS, camera, and date metadata use the metadata scrubber, and to silence a spoken name use the audio region muter — see the evidence-prep solution.
Which plan do I need and how large can my file be?
Face pixelate requires Pro-Media or higher (it is gated on Free and Pro). Pro-Media allows files up to 100 GB and 50 files per batch; Developer allows 100 GB and unlimited files. Limits are file-size and batch-count based — there is no clip-length/minutes cap because processing is streaming.
Privacy first
Every JAD Video tool runs entirely in your browser via WebCodecs and FFmpeg (WebAssembly). Your video files never leave your device — verified by zero outbound network requests during processing.