Skip to content

fix(cli): snapshot picks the frame through a rate lane and up to 10x - #4170

Closed
miguel-heygen wants to merge 1 commit into
mainfrom
fix/snapshot-speed-ramp
Closed

miguel-heygen wants to merge 1 commit into
mainfrom
fix/snapshot-speed-ramp

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What changes

hyperframes snapshot picks the source frame for each video clip. It clamped a clip's constant playback rate at 5 and ignored a speed-ramp rate lane, so a clip at 8x, or one with a ramp, showed the wrong frame in a snapshot while the preview and the render were right.

It now reads the rate through the runtime's own reader (a rate lane wins, then data-playback-rate clamped 0.1 to 10, then the browser default) and maps time with the shared sourceTimeAt / timeAtSourceTime.

Verification

  • snapshot.test.ts: 38 passed on the devbox (exit 0). New tests cover rate 8, an invalid authored rate falling back to the browser default, and a rate lane mapping 2 s of clip to 3.641 s of source.
  • tsc --noEmit in packages/cli: exit 0.
  • Independent review found one regression (invalid authored rate ignoring the browser default); fixed and tested. Not exercised: a real snapshot render of a ramped clip.
Audited Trusting Not exercised
reader parity with the runtime on 11 attribute cases, every consumer of the rate in snapshot.ts, duration and loop arithmetic core's readElementRateSpec clamp real browser defaultPlaybackRate != 1, startup time of the core import

…to 10x

hyperframes snapshot clamped the constant playback rate at 5 and ignored a
rate lane in data-automation, so a sped-up or ramped clip showed the wrong
frame. It now reads the rate through the runtime's own reader and maps time
with the shared source-time function.
@miguel-heygen

Copy link
Copy Markdown
Collaborator Author

Folded into #4153 (one speed-ramp feature, one PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant