Multimodal inspection / Guide 98
A Film Shot Continuity Agent Should Flag Evidence, Not Rewrite the Edit
Build a film shot continuity agent that checks edit provenance, object state, color context, and timing uncertainty before editors review possible mismatches.
Illustrative engineering guide. Examples are not client deployments, production-ready integrations, or evidence of measured results. Validate the design with your domain and security owners.

A hypothetical dialogue edit cuts from a wide shot to a close-up. A cup appears on opposite sides of the table, and an assistant recommends replacing the close-up. The second camera is looking from the opposite direction, however, and the cut intentionally crosses elapsed story time. Screen position alone has produced an incorrect continuity complaint. The first task is establishing whether the two observations are actually comparable.
Candidate interpretations can identify prop presence, costume state, approximate liquid level, or an apparent lighting change. The system should package those observations with uncertainty and edit context. It must not rewrite the timeline, replace takes, or infer an actor’s identity, behavior, or performance quality. Editorial intent belongs to the editor and script supervisor, not to a visual consistency score.
Resolve Edit Time to Source Time
Freeze the edit revision, shot identifiers, source media digests, take metadata, trim ranges, handles, and any retiming or reverse playback. Timeline frame 1200 is not necessarily source frame 1200. Store the complete mapping and its version, including rational frame rates and time bases. A new cut changes the comparison pairs even when the media itself remains unchanged.
FFprobe documentation describes frame and stream reporting and timecode extraction. Use decoded presentation timestamps to anchor image evidence, especially when proxies or variable frame rate material are involved. A proxy’s burned-in timecode is useful to a reviewer but is not an authenticated substitute for source mapping. Seeking can land near rather than exactly at a requested boundary, so retain actual extracted timestamps.
Define coverage over eligible edit boundaries, not over every decoded frame. Select frames on both sides that show the relevant prop without motion blur or obstruction. Repeated neighboring frames are correlated. If the required prop is never visible near the cut, record an unreviewable boundary rather than declaring continuity intact. Handles may help interpretation but should not be confused with frames used in the final edit.
Compare a Scene State, Not Two Pixels
Annotate original images in top-left pixel coordinates, preserving crop, resize, stabilization, and mirror transforms. For a table prop, use a registered table-plane coordinate system, measured in millimeters only if calibrated references support that unit. Otherwise, report normalized plane coordinates or categorical locations without pretending they are physical distances.
OpenCV’s calibration tutorial explains camera intrinsics, extrinsics, distortion, and object-point scale. Different camera views require an appropriate registration; simply subtracting image coordinates is invalid. A plane model may compare the cup’s contact point but not reconstruct its handle or liquid surface accurately. Reflective props and changing lens focus add uncertainty that should be exposed.
For costume or lighting candidates, compare only after establishing compatible color interpretation. OpenColorIO’s usage guide describes configuration-based color transforms and their validation limits. A valid configuration cannot prove that a camera file was tagged correctly or that a creative grade should match another shot. Keep technical normalization separate from the director’s lighting and color intent.
Exercise a Cut-Pair Harness
This self-contained Python fixture tests the HARNESS on synthetic metadata and registered prop measurements. It does not run a trained vision model, camera, color pipeline, CAD engine, or real continuity inspection. The 30 millimeter location threshold and 40 millisecond mapping budget are illustrative project policies. They are not universal filmmaking rules.
from math import hypot, isfinite
base = dict(edit="cut-r6", same_story_moment=True, visible=True,
frame="table-mm", color_config="show-v2", map_bound_ms=10,
before=(100.0, 50.0), after=(105.0, 50.0), bound_mm=3.0)
def compare(row):
if row["edit"] != "cut-r6":
return "stale-edit"
if not row["same_story_moment"]:
return "editorial-context-review"
if not row["visible"] or row["frame"] != "table-mm":
return "unknown"
if row["color_config"] != "show-v2":
return "color-context-review"
values = (*row["before"], *row["after"], row["bound_mm"], row["map_bound_ms"])
if not all(isfinite(v) for v in values):
return "unknown"
if row["bound_mm"] < 0 or not 0 <= row["map_bound_ms"] <= 40:
return "unknown"
d = hypot(*(b - a for a, b in zip(row["before"], row["after"])))
if d - row["bound_mm"] > 30:
return "prop-review"
return "comparable-packet" if d + row["bound_mm"] <= 30 else "uncertain"
assert compare(base) == "comparable-packet"
assert compare(dict(base, after=(150.0, 50.0))) == "prop-review"
assert compare(dict(base, same_story_moment=False)) == "editorial-context-review"
assert compare(dict(base, visible=False)) == "unknown"
assert compare(dict(base, map_bound_ms=80)) == "unknown"
assert compare(dict(base, edit="cut-r5")) == "stale-edit"
print("six synthetic cut-pair checks passed")
The same-story-moment flag must come from editorial context, not be guessed to force a match. Likewise, the frame and color configuration fields stand for verified upstream registration and provenance. The code cannot establish that those labels are truthful. Production dependencies include media authentication, typed schema validation, edit interchange parsing, color transforms, measurement calibration, and durable reviewer decisions.
The result comparable-packet does not mean the cut is artistically correct. It means the supplied location interval does not exceed this narrow review rule. A cup could retain its position while changing fill level, logo orientation, or handle direction. Each property needs its own observation contract, and some should remain categorical because the media cannot support a precise measurement.
Keep the Editor in Control
Present paired crops with original frame references, a short reason, comparison assumptions, and the relevant edit boundary. Let the script supervisor classify a finding as accidental mismatch, intentional change, false observation, or insufficient coverage. Store exceptions against exact edit and media versions. A waiver for a dream sequence should not suppress future findings on the same prop elsewhere.
Restrict footage access server side by production and role. Proxy generation should minimize distribution of unreleased material. Embedded captions and metadata are untrusted text, never commands to upload files or change the edit. The model can draft a review note; only the editor authorizes timeline changes. A timed-out note publication is reconciled by edit-boundary-and-finding identity before retrying.
The news research guide provides a useful evidence discipline: preserve what the source shows separately from the interpretation placed on it. Here that separation prevents a continuity candidate from becoming a fabricated claim about what happened on set. Do not collapse uncertain observations into confident production history.
Acceptance Tests and Evaluation
- Mirror one proxy while retaining the original scene geometry; require transform correction before comparing screen positions.
- Insert an intentional time jump; route to editorial-context review rather than forcing equal prop state.
- Retarget a source clip after a recut; invalidate all affected boundary comparisons.
- Obscure the cup on one side of the cut; label that property unknown instead of absent.
- Apply incompatible display transforms; prevent an unsupported costume-color mismatch claim.
- Repeat adjacent frames in evaluation; count the edit boundary once, not as many independent successes.
Baseline against blinded script-supervisor review of eligible cut boundaries. Measure confirmed accidental mismatches divided by all flagged boundaries, detected adjudicated mismatches divided by all adjudicated mismatches, and reviewable boundaries divided by all eligible boundaries. Track intentional edits incorrectly challenged and minutes spent per accepted finding. Split evaluation by scene and production sequence to avoid leakage from neighboring takes.
Start with static props across a small dialogue scene and no automatic timeline writes. VFX compositing readiness covers the distinct technical delivery checks behind those frames. A focused AI systems workflow should first make source mapping and editor waivers reliable, then expand visual interpretation only where review evidence supports it.