Concept · Computer vision
Video Inpainting Explained: How AI Fills What You Remove
Remove a subtitle and you create a hole. Video inpainting is the family of techniques that fills that hole with plausible, temporally-stable content — sometimes from the same frame, sometimes from neighboring frames.
Core idea
The problem inpainting solves
When you erase a subtitle or logo, the pixels underneath are gone — but usually not irreplaceable. In video, most backgrounds are either static, slowly moving, or repeated across frames. Inpainting is the art of reconstructing the missing region so no viewer can tell it was ever covered.
Two strategies, one goal
| Strategy | How it works | Best for |
|---|---|---|
| Spatial (single-frame) | Fill the hole from surrounding pixels of the same frame | Logos, overlays on mostly-flat backgrounds |
| Temporal (multi-frame) | Steal clean pixels from other frames where the area was visible | Subtitles over moving scenes — the region is often uncovered in adjacent frames |
| Hybrid models | Combine both with learned priors | Hard cases: text over faces, textures, camera motion |
Why video inpainting is harder than image inpainting
Image inpainting fills one frame. Video inpainting must stay coherent across frames — the same object, the same texture, moving consistently — otherwise you get flicker, ghosting or 'swimming' artifacts. Models trained for video solve this with temporal attention: they look at neighboring frames before deciding what belongs in the hole.
How a subtitle-removal pipeline uses it
- Detect the subtitle region (text detection + tracking across frames)
- Build a temporal mask — where the text is, and where it moves
- Inpaint: reconstruct clean pixels from neighbors and spatial context
- Render the clean frames back into the timeline
When inpainting is not enough
If text is burned into a texture that never appears clean anywhere else (extreme camera motion, constant overlay), the model must invent content — and invention can look wrong. For those cases, compare inpainting against cropping or blurring approaches before committing.
FAQ
Common questions
Does inpainting work on any video?
Most professionally-produced video, yes — subtitles sit over backgrounds that reappear in other frames. Heavy camera shake and constant overlays are the hard cases.
Is it better than blurring subtitles?
For clean removal, yes — blurring leaves a visible smudge and is obviously 'edited'. Inpainting reconstructs the background. See our comparison of removal vs blurring vs cropping.
Does the API preserve audio and the rest of the frame?
Yes — only the masked region changes; audio, motion and untouched pixels pass through losslessly.
Keep exploring
Related guides
Subtitle Eraser API
Remove hardcoded subtitles cleanly for localization and short-drama export.
Learn moreAI Subtitle Removal vs Manual
Manual subtitle removal (clone stamp, frame-by-frame cleanup) vs AI video inpainting — compare time per minute of v...
Read guideSubtitle Removal vs Blurring
Blurring a subtitle is fast but leaves a visible smudge and can fail compliance checks. Compare blur vs inpainting-...
Read guide