Separate the evidence from the decision
This task audits an external repair's spatial footprint. It is different from judging whether a generated background looks plausible or whether one global quality metric is high. The required artifact is an aligned difference clip or image set, a protected-region definition and a separate interpretation of changes. A tool can show where samples differ; it cannot decide whether those changes were approved. AISwapLab does not guarantee pixel-identical background preservation through a generative replacement.
Build the evidence
- 01
Establish the input evidence
Freeze the exact source and repair revisions. Confirm matching dimensions, sample aspect ratio, orientation and color interpretation. Establish corresponding picture times before subtracting anything. If one sequence has changed speed or content timing, an identical timestamp can depict a different action and contaminate the entire difference image. Do not hide that issue by casually shifting each frame until the protected region looks cleaner. Document any approved alignment transform and its effect on the claim.
- 02
Run a controlled diagnostic
The example rebases two already corresponding constant-timing inputs and blends their decoded pictures using difference mode. Rebasing alone does not solve divergent action timing. Render a separate diagnostic view, not a new master, and keep the unclipped source pair available. If a mask defines the protected region, retain its exact dimensions, position and revision. Changes outside it should be compared with an encoder-only baseline made from the same original and intended export path where exact-pixel claims matter.
- 03
Verify the actual handoff
Inspect representative residuals at native scale and ordinary playback. Distinguish temporal misalignment, geometry drift, color conversion, compression noise and genuine repair spread. Compare the actual displayed source and output around every important residual rather than reviewing the difference visualization alone. If a small repair has altered the whole frame through a new encode, report that honestly; a localized creative edit can still lead to distributed sample changes. The acceptable claim depends on the delivery contract.
A bounded example
Local executed scope: a synthetic source and its packet-preserving faststart derivative were aligned and processed through the difference blend under FFmpeg 7.1. The command completed. Separate frame-hash evidence confirmed equality for that pair. This does not measure how much a real repair changes a background or establish a universal pixel threshold. A production audit needs its own actual repair, protected-region mask and approved compression baseline.
Local workflow example
The difference render was executed on a synthetic source/remux pair. No real repair mask, threshold benchmark or paid generation was tested.
ffmpeg -n -i before.mp4 -i after.mp4 -filter_complex "[0:v:0]setpts=PTS-STARTPTS[a];[1:v:0]setpts=PTS-STARTPTS[b];[a][b]blend=all_mode=difference[v]" -map "[v]" -an -c:v libx264 difference.mp4Task evidence worksheet
| Residual cause | Evidence | Decision |
|---|---|---|
| Misalignment | Event/geometry mismatch | Fix comparison first |
| Compression baseline | Encoder-only derivative | Do not call all residuals repair spread |
| Protected-region change | Aligned local inspection | Compare with actual contract |
Acceptance evidence
- Confirm alignment before treating residuals as edits.
- Keep protected-region and codec-baseline definitions explicit.
- Inspect source/output pictures as well as the difference visualization.
Stop condition
Stop if the inputs cannot be aligned without concealing a real timing or geometry change. If the brief requires exact protected samples, use a compositing workflow that can enforce that requirement and verify the final encoding. Do not interpret a visually dark difference view as proof of correctness when scaling, display clipping or omitted intervals could hide important changes.
