Repository navigation
Conversation
miguel-heygen
left a comment
There was a problem hiding this comment.
Carries a runtime-inserted or runtime-updated clip's speed into the export, and lets a video's detected audio inherit it.
Strengths
htmlCompiler.ts:2318readsdefaultPlaybackRaterather thanplaybackRate, so the transport speed never leaks into the export rate.probeStage.ts:603leaves an existing rate lane alone, so a ramp the collector already shifted for scene trimming keeps its phase.
Important (fine as a follow-up)
htmlCompiler.ts:2376: discovery reads only the scalar rate. A runtime-inserted clip with aratelane indata-automationis pushed with its default rate, so its ramp plays flat. Not a regression from main, but the description's "existing speed ramps stay intact" holds only for clips already in the static HTML. Returningdata-automationraw and resolving it with the sameresolveRateSpec(automation, readPlaybackRate(...))thatreadElementRateSpecuses (core/src/runtime/playbackRate.ts:34) would give the browser path and the static path one owner for clip rate.
Nit
probeStage.ts:604-613rebuilds the${id}-audionaming thatappendAutoDetectedVideoAudioowns (extractVideosStage.ts) and scans every audio entry per video. A small helper exported from there keeps the id format in one place.
Verdict: APPROVE
Reasoning: The fix is correct for scalar rates on both the new-element and reconcile paths, with regressions that fail before the change; the lane gap is pre-existing and can follow.
d0d3a39 to
692ec34
Compare
|
Addressed the runtime-inserted speed-ramp follow-up in 692ec34 with the shared A fresh Astra xhigh review approved this exact revision after 17 strict browser checks, 17 actual exports, and ten byte-identical picture/PCM control comparisons. The 238 focused tests pass. Ready for re-review while the remaining CI jobs finish. |
|
@miguel-heygen Both review follow-ups are addressed at 692ec34, and a fresh run of the 238 focused tests plus producer typecheck passes. All required checks pass or skip appropriately; the cancelled capture has a successful replacement on the same SHA. GitHub still requires approval of the latest push. Ready for another look. |
miguel-heygen
left a comment
There was a problem hiding this comment.
This is a clean follow through. Discovery now resolves the rate lane with the same resolveRateSpec and readPlaybackRate pair the static path uses, so a runtime inserted clip and an authored one get their speed from one place, and reading defaultPlaybackRate rather than playbackRate keeps the preview transport out of the export. The lane and scalar cases are both covered through the real probe stage.
Two small follow ups, neither blocking. The detected audio id format now lives in two files, so exporting the builder from the stage that creates those entries would keep it to one owner. And when an existing scalar rate is replaced by a lane the browser reported, I could not tell whether the scene trim phase is applied to the new lane the way a collected one carries it. A one line answer is enough.
Approving.
|
@miguel-heygen On the scene-trim question: scalar-to-lane reconciliation adopts the browser lane unchanged; only an already-collected lane carries the trim phase applied by |
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
|
@miguel-heygen Both follow-ups are addressed in 5cc2d9a. A focused reproduction confirmed the scalar-to-lane trim gap: with a 2s scene trim, the old path started at source 5s instead of 3s and restarted the ramp. Reconciliation now adjusts both the lane phase and source in-point for picture and linked audio, while retaining collected lanes. Video-audio IDs share the engine parser's builder. All 323 focused tests pass; engine/producer builds, producer/core typechecks, lint and comment checks pass. The description distinguishes these regressions from the prior browser/export comparisons. All 81 current checks now pass at 5cc2d9a. Ready for re-review; approval of the latest push is the only remaining merge gate. |
miguel-heygen
left a comment
There was a problem hiding this comment.
Thanks for closing both of these out. The detected audio id now has one owner: videoAudioId lives next to the parser that creates those entries and the three places that used to spell out the suffix all call it, so the format cannot drift.
On the scene trim question, your answer was the right one and the follow-up fix is right too. I lifted the arithmetic out of adoptRuntimeMediaTiming and replayed it on your worked example. With a 2 second scene trim, an authored in-point of 1 and a collected 2x rate, a browser lane running at 1x now lands the source in-point at 3 seconds and rebases the lane to the start of the kept portion. The old path left it at 5 and restarted the ramp. Replaying the untrimmed case gives a no-op, and a lane the collector already carried stays untouched, which is what the comment claims.
I also checked the degenerate shapes. A head past the lane's last point collapses to a single point, and because the table keeps the last rate as both ends, that still integrates at the right speed rather than silently falling back to 1x. The clamp on consumed keeps the shift non negative, so shiftRateLane never sees a negative offset.
Two small things for later, neither blocking. In the audio reconcile branch the entry picked by id has no type filter while the timing helper filters out video sourced audio, so a project with a video and an authored audio whose ids collide on the -audio suffix could update different entries. That predates this change. And nothing covers a runtime in-point change and a scalar to lane replacement happening in the same reconcile; the new tests exercise them separately.
Checks at this head look good: every non skipped job is green, the one cancelled capture run has a successful run at the same commit, and the Mintlify preview is waiting on a maintainer rather than on you.
|
@miguel-heygen The combined in-point change and scalar-to-lane replacement is covered by the |
jrusso1020
left a comment
There was a problem hiding this comment.
Approving. Media the producer only finds through the browser probe (clips inserted by script, or reconciled after a runtime source change) lost their speed on main: discoverMediaFromBrowser never read data-playback-rate or data-automation, and the auto-detected audio for a video never copied the video's rate. So a 1.5x clip exported at 1x and a runtime ramp played flat.
What I checked:
- Discovery now resolves the rate with the same
resolveRateSpec(automation, readPlaybackRate(...))pair the static parser uses, and falls back todefaultPlaybackRate, notplaybackRate, so the preview transport speed cannot leak into the export. Static and runtime clips now get their speed from one owner. appendAutoDetectedVideoAudiocopies the video's rate, so picture and sound stay in sync.- In
adoptRuntimeMediaTiming, lanes the collector already shifted for a scene trim are left alone. A scalar replaced by a browser lane gets the trim applied to both the lane phase and the source in-point. The collector does not compose parent rates into a clip's scalar, so replacing a scalar with the element's own rate loses nothing. - I merged this head onto current main (no conflicts), and the audio mixer and probe/extract stage suites pass. Producer
tsc --noEmitis clean.
Miguel's three rounds of follow-ups (shared rate parser, single owner for the -audio id via videoAudioId, the scene-trim phase) are all addressed at this head. His remaining note, that the audio reconcile branch picks an entry by id without a type filter, predates this PR and is fine as a follow-up.
Need: yes, runtime-discovered clips export at the wrong speed · Size: ok for the surface it covers · Reuse: reuses resolveRateSpec, readPlaybackRate, shiftRateLane and consolidates the video-audio id into videoAudioId · Simpler: already minimal
— Rames
|
Thanks, @AksharP5. This was approved and in the merge queue, but another PR that merged ahead of it touched the same lines, so GitHub took it out of the queue with a merge conflict. Could you rebase onto the latest — Rames |
What
Keep the clip speed of browser-discovered native video and audio in exports, including runtime-inserted media and media reconciled after a source update. Runtime-inserted clips also keep their
data-automationspeed ramps in picture and audio export.Why
Browser discovery drops playback rate before the producer creates or reconciles media entries. Automatically detected video audio also drops the video's rate. A clip authored at 1.5× exports at 1×, and a runtime-inserted speed ramp plays flat.
Related work
The duplicate search found no open issue or PR for this discovery path. #5300 audits authored audio slot length; #4736 carries existing video metadata into distributed rendering; #3542 scales extraction coverage; #3536 handles snapshot rate; #5440 handles preview transport speed. These paths do not populate the missing browser-discovered rate.
How
Use the existing playback-rate reader and rate-lane resolver at the browser discovery boundary. Carry the resulting
RateSpecthrough discovery and reconciliation, and inherit the video's rate when creating its audio entry. Already-collected lanes retain their scene-trimmed phase. When a browser lane replaces a scalar rate, shift the lane by the collected scene trim and recompute the source in-point using that lane. Picture and linked audio share the adjustment. The parser, probe and extraction stage share the engine's video-audio ID builder.For a scene trimmed by 2 seconds, a clip in-point of 1 second and a collected 2× rate, a browser lane that runs at 1× through the trimmed portion must start at source 3 seconds. Before this fix, it started at source 5 seconds and restarted the ramp.
Test plan
The preceding revision was checked with 17 strict browser checks, 17 exports and ten byte-identical picture/PCM control comparisons. Those exports were not rerun for the scene-trim correction; its fresh verification is through the collector and probe regressions. Full Studio/scripts typechecks are limited by missing installed checkout dependencies, and Mintlify validation awaits CI because
mintis unavailable locally.Minimal reproduction: generate a two-second video with a chirp, save the HTML below as
index.html, and runhyperframes check <dir>followed byhyperframes render <dir> --fps 30 --strict-all. The clip is inserted by JavaScript rather than appearing in the authored HTML.At timeline 0.2/0.5/0.8 seconds, expected chirp frequencies are 460/550/640 Hz. At output frame n, source frame must be
floor(15 + n × 1.5). Dropping the rate leaves the 1× timing of source frame15 + nand chirp frequencies 440/500/560 Hz.For the runtime-inserted ramp case raised in review, change the scalar rate to
0.5and also set:Its exported picture and PCM audio should match the same clip placed directly in static HTML. The scalar-only revision flattened this lane to the 0.5× fallback.