Repository navigation
Conversation
… film's The render summary and the result's durationMs read the perf summary's compositionDurationSeconds, which is the whole film. A range render writes only its window, which job.duration measures, so a 1 s range of a 24 s film printed "24.0s video".
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
After a range render, the summary line prints the length of the whole film instead of the length of the file that was written. Rendering 11 s to 12 s of a 24 s composition prints:
while
ffprobesays the file is 1.000000 s (30 frames). ThedurationMsthatrenderLocalreturns (used for the batch manifest row) has the same problem.Why
The summary and
durationMsreadperfSummary.compositionDurationSeconds, which the orchestrator fills fromcomposition.duration, the full film. For a range render the producer already setsjob.durationto the window (totalFrames * fps.den / fps.numafterresolveFrameWindow), and to the probed film duration otherwise. So the CLI was just reading the wrong field.Related work
No issue for this one; it's a small, self-contained correction I hit while reproducing #8463 with the repro project from that issue. No overlapping PRs that I could find.
How
A small
outputDurationSeconds(job)helper incommands/render.tsreturnsjob.duration, falling back toperfSummary.compositionDurationSecondsif it is unset.printRenderCompletenow takes that value instead of reading it off the perf summary, and the returneddurationMsuses the same helper. Telemetry fields that are explicitly about the composition (compositionDurationMs) are left alone. The Docker path is unchanged: it has no job and already prints the render time only.Test plan
packages/cli/src/commands/render.test.ts: the producer mock setsjob.duration = 1andcompositionDurationSeconds = 24for arange: { startSeconds: 11, endSeconds: 12 }render. It checks that the summary says1.0s video(and not24.0s video) and thatdurationMsis 1000. Without the fix it fails withexpected '... 24.0s…' to contain '1.0s video'; with it,npx vitest run src/commands/render.test.tspasses (137/137).hyperframes render --start 11 --end 12 -o local.mp4→126.7 KB · 1.0s video · rendered in 4.9s, ffprobe 1.000000 shyperframes render -o full.mp4→425.3 KB · 24.0s video · rendered in 10.8s, ffprobe 24.000000 s (unchanged)bun run build,bun run lint,bun run format:check,tsc --noEmitinpackages/cli,node scripts/check-comment-citations.mjsandnode scripts/comment-ratchet.mjsare clean.packages/clivitest run: 10082 passed, 9 failed. The failures are in files this PR doesn't touch (offload.undecodableTrack,studioServer.openWritesNothing,publishProject,whisper/manager-resolution, file watcher and Chrome process tests) and the same ones fail onmainon this machine. They look tied to the local ffmpeg/whisper/filesystem setup.