Repository navigation
feat(cli): a start and end render that part of the film in any format, frame rate or HDR - #8878
Conversation
…, frame rate or HDR
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Edit accuracy: accurate 273 (base branch 271), smooth 74 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) |
No visible changeNo screen changes: the CLI, the render request and the two Studio servers now hand a range to the render job, and a Studio range that used to fail now renders. Also at d71e390: the range check moved into its own function, so the request validator stays under the complexity limit the audit flagged. |
jrusso1020
left a comment
There was a problem hiding this comment.
APPROVE. A CLI --start/--end render and a Studio range now go through the normal RenderConfig.range path, in place of the chunked renderSpan path and its MP4 / whole-fps / SDR limits.
Checked at d71e390a:
- One path.
renderConfigFromRequestalready spreadsoptions, so the new validatedrangereachesRenderConfig.range. The orchestrator turns it into a frame window:resolveFrameWindowclamps the end to the film and refuses an empty window. It forcesenableStreamingEncode = false, soassertRangeSupportedonly ever seessdr_diskorhdr_layered. It drops the inversion and parallel-router routes (renderOrchestrator.ts:3600-3612,:4328-4331), and trims audio to the window (audioStage.ts:120). That is the producer work from #8794 and #8802, so the CLI's old limits had no remaining reason. - The distributed adapter refuses a range instead of rendering the whole film without saying so. That is pinned in
renderRequest.test.ts. - Docker.
dockerRunArgsstill forwards--start/--endto the in-container CLI, which is the same version and so takes the same path. - Validation at both edges. The CLI still refuses negative, non-numeric and end-not-after-start values. The request now refuses a malformed
range(isRenderRange: finite, 0 or more, end after start). - The "fails without the fix:" line is present and holds. I removed
range: options.rangeinrender.ts: 1 test fails inrender.test.ts. I removed the spread instudioServer.ts: 1 test fails instudioServer.test.ts. - Tests run locally: producer
renderRequest+frameWindow35/35, CLI render/plan/studioServer 252/252, studio vite adapter 8/8.
Nit: nothing renders a non-MP4 range end to end in CI. The manual WebM 30000/1001 run in the body covers it for now.
Need · Size · Reuse · Simpler · Structure: needed (ranges were refused outside MP4, and in Studio entirely) · +96/−152, a net deletion · uses the producer's existing frame-window path · removes a second render path · validation lives at the request boundary.
Risk: Low — opt-in flags only; a render without a range is unchanged.
Review by Rames
What
hyperframes render --start/--endand a Studio render asked for a start and end now render that part of the film as a normal render job, in any format, frame rate or HDR mode. Before, the CLI allowed only MP4 at 24, 25, 30 or 60 fps in SDR, and both Studio servers refused any range.Why
The producer renders a frame window in one pass on every route (#8794, #8802), and the Studio render route takes a start and end (#8787). The CLI still sent a range through the chunked
renderSpanpath with its old limits, and both Studio adapters failed the job before the producer saw it.Related work
Refs #8787, #8794, #8802.
How
rangeand validates it at the boundary: start 0 or more, end after start.renderConfigFromRequestpasses it toRenderConfig.range, so the CLI, Docker and Studio all take one path.renderRangeand the--start/--endformat, frame rate and HDR limits. The--fpsand span checks stay.opts.rangetocreateRenderJob.RANGE_NOT_RENDEREDis removed.distributedConfigFromRequestrefuses a request that carries a range. A distributed render takes its range fromrenderSpan, so dropping it would render the whole film without saying so.executeRenderJobalready runs ffmpeg from the empty folder (fix(engine,cli,producer): ffmpeg reading project media runs from an empty folder #8832), so the CLI's wrapper around the span render goes with it.Test plan
renderRequest.test.ts: the range round-trips into the local config; a malformed range is refused; the distributed adapter refuses a range.render.test.ts: a WebM range at 30000/1001 reachescreateRenderJobwith its range.plan.test.ts: WebM, 30000/1001, 50 fps and--hdrplan with a range; bad spans are still refused. The old refusal case--fps 29.97failed on fps parsing before the range limit, so it never tested that limit.studioServer.test.tsand studiovite.adapter.render.test.ts: a job with a range completes, and the range reaches the render job.render.ts,studioServer.tsorvite.adapter.ts, or the request validation, each turns its new test red (1 failed per file); restored, all pass.@hyperframes/inspectorimports, none in changed files.render packages/producer/tests/audio-mux-parity/src --start 1 --end 2.5 --format webm --fps 30000/1001exits 0. ffprobe: VP9 at 30000/1001, 45 frames (1.5015 s), Opus audio, duration 1.522 s.--start,--endrow indocs/packages/cli.mdxand the flag help text.