AI Video Flickering: Repair It or Regenerate?

Separate brightness pulses from changing product details before paying for another generation. Compare measured controls and download a frame-pair inspection script.

Published: 2026-11-06 - By nglsong

If only the light pulses, test a small exposure correction. If the product's lettering, shape or identity changes, brightness correction cannot make it accurate. Inspect the downloaded original first: a problem introduced by an editor, export or upload needs a different repair.

This guide helps you decide what to keep, what to repair and when to generate a simpler take. The decision table works without installing anything. The optional experiment and script show why a lower flicker number can still leave the important defect untouched.

Find the problem before choosing a fix

What changes?Check this firstNext action
The whole scene gets brighter and darkerWhen the camera, background and lighting should stay still, compare consecutive background frames; moving shadows or reflections can imitate exposure flickerTest exposure correction on a duplicate; inspect highlights and shadows afterward
Letters, a cap or a package edge changeCompare the product with the approved reference photo, not just the previous generated frameReplace the affected section, composite an accurate product layer, or regenerate
Fine fabric or hair seems to crawlInspect the affected region at normal speed and frame by frameDecide whether cleanup loses detail you need to keep
Only the preview or uploaded copy flickersCompare the original, local export and processed uploadFind the first stage that introduces the defect before changing the prompt
The interruption happens only at a repeating joinWatch the last frames and the restartUse the loop pause and jump checks

A moving highlight is not automatically a defect. Neither is a large pixel difference: genuine motion changes pixels too. For a product video, accurate packaging matters more than making every measurement smaller.

When regeneration is the useful next step

If the downloaded source repeatedly changes the product's identity, preserve any acceptable footage and simplify the failing shot. Use an accurate reference, steady lighting and one restrained movement. Runway's image-to-video guidance recommends clean input images and simple motion-focused prompting; that is model-specific guidance, not a guarantee for every generator.

You can try a new reference-led take with imgmov Image to Video, after checking the start-image requirements and pricing. This is a generation workflow, not a dedicated deflicker repair feature. Keep the old clip and compare the same detail before accepting the new one.

If the product stays geometrically stable, replacing only an inaccurate label or product region may be practical—but only if you can track the replacement and integrate it convincingly. Unpredictable shape changes, rotation or occlusion can make compositing impractical. Regenerate a simpler shot when needed, then compare it with the approved reference; regeneration is not a guarantee of accuracy.

Our test: a smoother exposure can hide an unchanged defect

We made four synthetic stationary controls, not AI-generated model samples: clean, brightness changes only, a shifting mark only, and both changes together. Each contains 96 frames at 24 fps, at 480 × 270 pixels. Brightness changes by ±4% every four frames; the mark shifts every six frames. The still strip below shows frames 0, 4 and 6 of the mixed control.

Three synthetic frames: exposure changes, then a light mark moves across a dark product label.

For each adjacent pair, we measured the background brightness ratio, then compared the product region after compensating for that ratio. The second number is the mean absolute difference in decoded RGB values, on a 0–255 scale. It is not a perceptual quality score or a reliable detector of invented details.

We tested FFmpeg 7.1's deflicker=size=5:mode=am with an explicit full-range YUV444 conversion for these known full-range controls. The FFmpeg filter documentation describes the moving window and averaging modes.

Synthetic controlAverage background-ratio change, before → afterResidual product change, before → after
Clean0% → 0%0 → 0
Brightness only1.766% → 1.125%0.043 → 0.220
Shifting mark only0% → 0%4.577 → 4.577
Brightness + shifting mark1.766% → 1.125%4.618 → 4.787

The background-ratio measure fell by about 36%, not to zero. The shifting mark remained. Even the exposure-only control's residual increased. A correction can improve one measurement while making another worse; watch the actual product before accepting it.

The first experiment failed. With implicit color conversion, the exposure-only residual after filtering was 0.955 instead of 0.220. That is why the range handling is explicit in the reproducible test. Do not force full range onto an arbitrary video: source color metadata and the complete processing path matter. Compare the failed conversion trial with the final measurements.

Compression changed the flag threshold

We also encoded the four controls before and after filtering as H.264, yuv420p, at CRF 23 and 30: 16 files in total. A residual threshold of 1 incorrectly flagged exposure-only pairs as detail changes. We raised the illustrative threshold to 4 after observing a maximum exposure-only residual of 3.190 and a minimum actual mark-shift residual of 27.794.

At that tuned threshold, clean and exposure-only clips had zero detail flags; geometry and mixed clips each retained all 15 mark-shift pairs. This is in-sample calibration, not validation on arbitrary AI videos. The threshold sits only about 1.25 times above the largest exposure residual in these tests. More compression or noise can cross it. The initial failure, final results and calibration values are available.

A zero detail flag does not prove the product is accurate. This threshold may miss subtle lettering changes, gradual deformation or other defects. Compare the product with the approved reference image, regardless of the flags.

Filtering also increased the exposure-only mean residual after H.264 encoding: 0.298 → 0.678 at CRF 23 and 0.417 → 1.107 at CRF 30. The brightness improvement does not erase this cost.

As a separate real-footage check, we encoded Xiph's fixed-camera Hall Monitor test sequence at H.264 CRF 23 and examined two stationary wall regions. There were 0 flags in 299 adjacent pairs. That is one no-injected-defect observation, not evidence that the script finds defects in real generated footage. See the regions, provenance and hashes. We do not redistribute that footage here.

Optional: inspect your own stationary shot

You do not need the script for the basic decision. Watch the original at normal speed, compare suspect frames with the approved reference, and test a correction on a duplicate. Compare the original, corrected copy and reference side by side before accepting a repair. Use measurements only to support that inspection.

Download flicker_probe.py. It writes frame-pair measurements to CSV; it does not repair the video or tell you whether to buy another generation. Use a fixed camera, a stationary product region and a separate stationary background patch. Moving objects, shadows, reflections and clipped highlights can invalidate the comparison.

With uv installed, run this in the folder containing the script:

uv run --with numpy --with imageio-ffmpeg flicker_probe.py --input clip.mp4 --roi 180,100,121,81 --bg 20,20,80,80 --output review.csv

Replace the example regions with coordinates from your original-resolution video. Each region is left,top,width,height, measured in pixels from the top-left corner. The example numbers fit our synthetic sample, not every video. The script rejects out-of-frame regions, very dark backgrounds, images larger than 4K and an existing output filename.

It checks the first 300 decoded frames by default. Use --max-frames for a limit from 2 to 3000. --residual-threshold 4 is the calibrated default, not a universal acceptance rule. Read lighting_flag and detail_flag separately, then inspect those frame pairs in an editor. Frame numbers are authoritative; time values use the reported frame rate and may be approximate for variable-frame-rate files.

For a known input, download the mixed H.264 sample. It contains repeated brightness changes; if you are sensitive to flashing images, use the still strip and data instead. Nothing plays automatically. Reproduce the controls with reproduce_controls.py, saved beside the probe:

uv run --with numpy --with pillow --with imageio-ffmpeg reproduce_controls.py --output new-controls

Use a fresh output directory. Add --implicit-range to reproduce the failed conversion trial; its failed check is expected. Download integrity hashes are in SHA256SUMS.txt.

Back to blog | Pricing | Start creating