Repository navigation
feat(cli): render --start and --end render only that span of the film as its own MP4 - #6834
Conversation
… as its own MP4 The span reuses the chunked render path, so frames are captured at their absolute times and sub-composition timing matches a full render.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Edit accuracy: accurate 271 (base branch 271), smooth 122 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
There was a problem hiding this comment.
Verdict: REQUEST CHANGES · 2 blocker · 1 important · 0 nits
CI is red on this head: Producer: unit tests fails the named real-render test (no ffmpeg in that lane), so the fails without the fix: proof never runs in CI. The span path also ignores Ctrl-C/SIGTERM once planning ends. Details ↓ inline.
Scope
Read all 9 files. Checked how cancellation is wired through plan/renderChunk, the distributedConfigFromRequest defaults, and the chunk-audio sub-range mux. Did not run the render locally.
…t runs in the integration lane renderSpan checks the abort signal before each chunk part and before the stitch. The real-render tests move to their own file listed in the integration lane.
|
Pushed
|
What
hyperframes render --start <s> --end <s>renders only that span of the film as an MP4 that starts at 0, with the audio of the span. Either flag alone works (--startto the end,--endfrom 0).Why
renderhad no time range, so a caller that wants a few seconds of a film with sub-compositions (Desktop's video check) had to render the whole film.How
plan(), thenrenderChunk()with aframeRangefor each chunk the span touches, then the mp4 stitch (renderSpaninpackages/producer/src/services/distributed/renderSpan.ts, exported from the producer). Frames are captured at their absolute film times, so sub-composition timing is the same as in a full render; each chunk part carries the audio packets it owns.--start/--endinrender/plan.tsand refuses what the chunked path cannot render, naming the limit: not MP4, an fps outside 24/25/30/60 or a rational one,--hdr.--dockerforwards the flags.round(seconds * fps)), clamps to the film's last frame, and a range with no frame is an error that says how long the film is.Test plan
fails without the fix:
renders the frames of the span the way a full render renders them, sub-composition includedinrenderSpan.test.ts(a real render of a film with a sub-composition and a backdrop that brightens each frame: every frame of the span is within 1.5 grey levels of the same frame of a full render, and a span one frame off its place misses by about 20; with the start and end shifted by one frame it fails withExpected: < 1.5, Received: 20.15).spanFrameRangeunit tests cover the frame arithmetic and the empty range;plan.test.tscovers parsing and each refusal.What I measured
spanFrameRangetests and the real-render comparison pass; the CLIplan.test.tsfile passes (42 tests);tsc --noEmitfor the producer is clean.What I did NOT execute
A span of a film with a long source video, HEVC or a 4K source; the fixture has none.
--docker --start, the packaged Desktop app, andlint:quick(lefthook is not installed on the test box).tscfor the CLI package: it stops on a missing@hyperframes/inspector/livebuild in that checkout, none of it in files this change touches.Plan-time work: the whole film is still planned (probe and video extraction) before the span's chunks render, so a span of a long film still pays for the plan.
Unit tests added/updated
Manual testing performed
Documentation updated (if applicable)
Comments follow CONTRIBUTING.md "Comments"
Size
About 330 changed lines across the producer and the CLI.