clipcheck: check a generated clip before you use it
Generation is the expensive step and you cannot see the result. Run the check first, then decide: use the clip, trim it, or fix the prompt and regenerate.
Setup
pip install clipcheck # needs ffmpeg/ffprobe on PATH for audio and metadata
# or: pipx install clipcheck / uvx clipcheck check out.mp4
Workflow
-
After a video finishes generating, run:
clipcheck check out.mp4 --jsonFor several clips pass a folder:
clipcheck check shots/ --json(the output is then a list). -
Read
verdict:keep: use the clip.review: look at every check with statuswarn. Many warnings are fine in context (a fast camera in an action shot). For a visual summary runclipcheck sheet out.mp4 -o sheet.pngand look at the image.regenerate: at least one check isfail. Fix the prompt (table below) and generate again.
-
When you regenerate, change the prompt according to the failed or warned check's
hintand the table. Change one thing per attempt so you can see what helped. -
Stop after three attempts for the same shot and tell the user which check keeps failing instead of burning more generations.
Useful flags: --profile strict (tighter thresholds for final deliverables),
--expect-cuts (the clip is an edit, cuts are intended), --window 3 (find the calmest 3 s
window of a fast clip), --fail-on review|regenerate (exit code 1 for scripts).
JSON you get back
{"verdict": "review",
"checks": [{"name": "camera", "status": "warn", "summary": "too fast, 2.6 px/frame avg (p95 3.8)",
"metrics": {"avg_px_per_frame": 2.6}, "hint": "ask for a locked-off camera ..."}]}
Statuses are ok, warn, fail, skip (a check that could not run, for example audio on a
silent clip). avsync is experimental: treat it as a hint.
Error to prompt fix
| Check | Symptom | Change in the prompt |
|---|---|---|
| camera | too fast / lively | "slow dolly-in" or "locked-off camera", "one slow move per shot". Remove whip pans, orbits, handheld, "dynamic". |
| flicker | shimmering background, strobing texture | Reduce fine patterns and textures (stripes, grids, foliage, rain, crowds); ask for a shorter clip; simplify the background. |
| frozen | static image or long holds | Add a motion verb for the subject: "subject walks", "turns toward the camera", "hand reaches for the cup". Keep the camera calm but make the world move. |
| cuts | unexpected cut inside a single shot | "single continuous shot, no cuts, no scene change". Shorten the described action to what fits one shot. Ignore if the clip is an edited output (use --expect-cuts). |
| exposure | black frames at start or end | Trim the first/last frames (ffmpeg -ss ... -to ...); no need to regenerate. Black frames mid-clip or mostly black: regenerate. |
| exposure | letterbox bars | Request the exact aspect ratio, or crop to the reported content_aspect. |
| audio | clipping / true peak over 0 dBTP | Lower the gain or run a limiter; regenerating is rarely needed. |
| avsync | audio late or early vs lips (experimental) | Re-time the audio track against the video (clipcheck does not auto-fix). If the offset varies through the clip, regenerate the speech. |
| technical | variable frame rate, odd dimensions, dropped frames | Re-encode at constant frame rate and even dimensions before editing; re-export if frames were dropped. |
Python API
import clipcheck
report = clipcheck.check("out.mp4", profile="default")
if report.verdict != "keep":
for c in report.checks:
if c.status in ("warn", "fail"):
print(c.name, c.summary, "->", c.hint)
Limits
clipcheck measures signals, it does not understand content. It does not detect morphing,
anatomical errors (hands, limbs) or a face that drifts away from the reference. Look at the
contact sheet before trusting a keep on anything important.