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.

InpaintingSubtitle removalAI

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

StrategyHow it worksBest for
Spatial (single-frame)Fill the hole from surrounding pixels of the same frameLogos, overlays on mostly-flat backgrounds
Temporal (multi-frame)Steal clean pixels from other frames where the area was visibleSubtitles over moving scenes — the region is often uncovered in adjacent frames
Hybrid modelsCombine both with learned priorsHard 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

Note: Detection quality is the ceiling for everything downstream. A bad mask means either leftover text or an over-erased, smeary region.
  • 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.