Repository navigation
fix(producer): a frame coverage abort names the clip's source and window - #8828
miguel-heygen wants to merge 3 commits into
Conversation
terencecho
left a comment
There was a problem hiding this comment.
[P2] The diagnostic reports a speed ramp as a constant rate (packages/producer/src/services/render/videoFrameCoverage.ts:252)
sourceTimeAt(rate, 1) integrates the first clip-local second. For a speed ramp it can be unrelated to how much of the file the reported clip window consumes. The message then says the entire clip reads at that multiplier, which can misdirect an end-of-source investigation. Keep the multiplier for constant rates. For ramps, label the rate as variable and report the source span computed over the actual clip duration.
[P3] Label the playable end separately from the stream duration (packages/producer/src/services/render/videoFrameCoverage.ts:250)
resolvePlayableVideoDuration includes the stream's lead when the stream duration is known. The message calls the result the stream length. A delayed stream therefore appears longer than it is. Label this value as the playable end, or report the stream length and lead separately.
All 42 focused tests passed locally. I verified that the 16 fixture pointer conversions match the base files byte for byte.
— tai (automated review)
…nd where the video plays to
|
Both points fixed in 0376ea8.
The new test "names a speed ramp's whole source range and a lead before the video's first frame" failed before the change on both points. Description correction (the description can't be edited here): its example line now reads |
Edit accuracy: accurate 273 (base branch 271), smooth 61 of thoseThe gate passes. Newly passing (2)
Not banked yet, reported and not gated (bank a full-grid run's baseline.json) (2)
Quarantined, measured but not gated (0) Unstable (1)
|
What
When the frame coverage gate aborts a render, its message now names what the clip reads, in its first sentence: the source's codec, frame rate, whether that rate is variable, the video stream's length, and the clip's window, media start and playback rate.
Why
The gate's message said only how many frames arrived. An abort seen from a report, without the project's files, gave no way to tell which source shape fell short: a variable frame rate recording, a held last frame, a window past the source's end, or a playback rate. Each needs a different fix. Tools that keep only the start of a long error still get the facts, because they come before the explanation.
Related work
None.
How
computeVideoFrameCoveragealready holds each clip's probed metadata. Each report now carries asource(codec, fps, VFR, the playable stream length fromresolvePlayableVideoDuration, media start, playback rate assourceTimeAt(rate, 1)), present only when the clip was extracted.assertVideoFrameCoverageputs it after the threshold. The gate's decision and the report's other fields are unchanged.Test plan
fails without the fix: packages/producer/src/services/render/videoFrameCoverage.test.ts "names the clip's source in the error's first sentence, so a cut report still says what the video was"
videoFrameCoverage.test.tspasses 3 runs in a row (42 of 42).packages/producer/src/services/renderunder vitest: every test that runs passes (1051). The 27 files reported as failed arebun:testfiles that vitest cannot load; none of them imports the coverage gate.Not exercised