Repository navigation
feat(producer): render long videos with windowed source frames behind a flag - #7242
Conversation
96452ee to
a6e5589
Compare
2c08d8a to
79072a0
Compare
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · 1768fb8
Every exit from the segmented route is covered. The only replanAfterFailure calls on an sdr_segmented plan are the drawElement retry, which stays segmented, and the spawn fallback, which fills the frames first. A plan that resolves to anything other than sdr_segmented fills them at line 4747. The FrameLookupTable holds the ExtractedFrames objects and reads framePaths lazily, so the in-place fill reaches createRenderVideoFrameInjector. The one finding, a missing transient retry that also affects the calibration forFrames, is posted inline on #7241, where the code lives.
Scope
Read the orchestrator diff, videoFrameWindow.ts, deferredVideoFrames.ts (extractAllDeferredFrames), videoFrameCoverage.ts and the calibration wiring end to end. I skimmed the integration and orchestrator tests. Run 42039548198, dispatched at 1768fb8, is green, including the integration lane and Build. Comments is green.
— Genesis (Claude)
79072a0 to
920661f
Compare
The base branch was changed.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
…d HF_VIDEO_FRAME_WINDOW Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ll extraction reports itself Co-Authored-By: Claude Opus 5.5 <[email protected]>
Renders ten compositions twice on the segmented route, with and without HF_VIDEO_FRAME_WINDOW, and compares FFmpeg framemd5 of the two outputs: a mid-clip start, NTSC 24000/1001, a loop crossing a slice edge, a playback-rate ramp, a held tail, two clips of one file, a VFR source beside a CFR one, two workers, auto workers (capture calibration runs), and motion blur, which declines the window. Each pair must also report the same capture mode. A separate test samples segment-frames during a four-segment, two-worker render and holds its peak under workers x segment frames x the largest frame file x 1.2, and checks the folder is empty once the render closes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ts what it claims Find the render's work dir with resolveRenderWorkDirPrefix and the owner record's pid, so the peak test works on Linux and never samples or deletes a concurrent render's dir. Assert the measured worker count, calibration, and the exact up-front frame count of the VFR video. Retry a dead Chrome only with HF_TEST_RETRY_BROWSER_STALL=1, and fail a case whose windowed render alone needed it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…er fails a render Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ration lane Co-Authored-By: Claude Opus 5.5 <[email protected]>
The new segment frame modules add about 9 KB to the packed producer package. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1768fb8 to
a21885c
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…view Adopts heygen-com#7240 (deferred frame extraction leaves the distributed code), heygen-com#7241 (a capture segment extracts and deletes its own frames), heygen-com#7255 (segmented and sequential capture check drawElement samples), heygen-com#7254 (normalize-audio --reference stops short of the peak ceiling), heygen-com#7256 (engine names a failed script's origin first), heygen-com#7258 (SVG gradient text judged by its stops) and heygen-com#7242 (windowed source frames, off unless HF_VIDEO_FRAME_WINDOW=true). Release v0.9.17 is not synced wholesale; the producer packed budget takes upstream's +12000 from this range. Watermark advances to 32eb4c3. Co-authored-by: Vance Ingalls <[email protected]> Co-authored-by: Miguel Ángel <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
What
HF_VIDEO_FRAME_WINDOW=truemakes a segmented render hold a few segments' worth of source frames on disk instead of every frame. Opt-in, off by default, and only on thesdr_segmentedplan. With the flag off, every path behaves as today.Why
A 46-minute three-camera podcast asks HyperFrames Desktop for 27 to 89 GB free, almost all of it extracted source frames. This brings the "extract per chunk" move from distributed renders to local ones.
How
shouldWindowVideoFramesdecides early, since the capture plan isn't final until the extract stage has probed.--keep-segments, and is best-effort: a leftover file must not throw away a finished render.Measured on real footage
Worktree-built CLI,
HF_SEGMENTED_CAPTURE=true,--quality standard --sdr --workers auto, drawElement capture, 3 workers.framemd5identical on both pairs, and the files are byte-identical withcmp. The whole podcast has no flag-off pair, because that doesn't fit on the disk.HF_SEGMENT_FRAMES=1500halves frames on disk and ran 5% faster, but doesn't move the peak, which is at the join.Known gaps
windowedFrames.integration.test.tspinsbrowserGpuMode: "software", so it takes the screenshot path. drawElement output parity was measured by hand in the runs above. A drawElement test exists as a draft that passes on macOS, but it can't run on CI today: self-verify's screenshot times out on a GPU-less Linux headless shell.captureSegmentedStagearms ground-truth samples and never compares drawElement frames with them; onlycaptureStreamingStageand the disk-sample path do. This predates this stack, and it means the parity results above are the evidence for these renders, not self-verify. Raised with the stage's owner.CI on a stacked PR
CI's integration lane and Build run only on PRs against
main, so they don't appear on this PR while it's stacked. I dispatched CI on this branch instead. Run 42039548198 at this head passed in full, includingProducer: integration testsandBuild. All 11 cases ofwindowedFrames.integration.test.tspassed on Linux in the previous run, whose only failure was the size budget below.Package size budget:
@hyperframes/producerpacked goes from 845,000 to 857,000 bytes. This branch measured 854,006. The growth is the new segment frame modules, with no tests or source maps added to the tarball.Test plan
windowedFrames.integration.test.tsrenders each case flag on and flag off and comparesframemd5: mid-clip start, NTSC, loop across a slice edge, rate ramp, held tail, two clips of one file, VFR beside CFR, 2 workers, calibrating workers, motion blur. Plus a disk bound. Fails without the fix: a one-frame shift insegmentVideoFrames.tsfirst differs at output frame 60.renderOrchestrator.videoFrameWindow.test.ts,videoFrameWindow.test.ts, stage tests.docs/packages/cli.mdx.🤖 Generated with Claude Code