Repository navigation
fix(producer): export places a scene's media where preview plays it - #5454
Open
miguel-heygen wants to merge 4 commits into
Open
miguel-heygen wants to merge 4 commits into
miguel-heygen wants to merge 4 commits into
Conversation
… in-point A sub-composition host with a non-zero data-playback-start now shifts and cuts the video and audio it holds in render, matching Studio preview. Hosts without an in-point resolve exactly as before.
… files Media in a document with no inlined composition files carry no render id, so the collector never looked up their host and ignored an inline host's in-point. Key host windows on the id the parsers report, and cut a video's head the same way as audio so nothing plays before the host starts.
Contributor
Edit accuracy: accurate 2061 (base branch 2061), smooth 1583 of thoseThe gate passes. Quarantined, measured but not gated (0) |
…tart A scene written inline in index.html (no scene file, no in-point) with a start after 0 exported its video and audio from 0 s. Every composition host now shifts its media, as the preview's start resolver does; the root composition still does not cut media at its end. Also from review: a looping video in an in-point scene stays inside the scene's slot, and a media id only takes the window of an element the parsers report, never displacing a render id.
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 changes for a user
Exported video now places a sub-composition's media where Studio preview plays it:
data-playback-start) plays its video and audio from its in-point. Since fix(core): a split sub-composition plays its videos from its in-point in preview and timeline #5413, preview did this but export still played from 0, so a split scene exported seconds behind what was previewed.index.html(adata-composition-idhost with no separate scene file) that starts after 0 plays its media at its start. Export placed it at 0.Projects whose scenes are separate files with no in-point export exactly as before.
Why
packages/producer/src/services/renderMediaCollector.tsis the one place every exported video, audio and image gets its window on the root timeline; frame extraction and the audio mix both read it. It now follows the rules preview uses, through core's helpers (compositionOriginSeconds,hostInPointSeconds,cutToHostSlots):[data-composition-id], [data-composition-src], [data-composition-file], the set core's start resolver uses), not only inlined scene files, so an inline scene's start is no longer ignored; the root composition's start counts but its end no longer cuts media;video,audioandimg[src]only, and an author id never takes over a render id's window.Checked
Rendered on Linux through the producer (
createRenderJob+executeRenderJob), main vs this branch. Fixtures use a 19 s video with a frame counter and an audio track that plays one tone per source second.data-start=0, in-point 7data-start=6, no in-pointrenderMediaCollector.test.ts: 18 pass, three runs in a row. The new cases fail against main or the earlier head with the values they got (for example an inline scene's video at 0..19, a looping video starting at -1, a scene video moved to 0..12 by a root image sharing its id). Two compile the real document throughcompileForRender; one checks windows against main's for a document main got right.Not covered here
hyperframes renderCLI path end to end (it calls the producer API above), Studio snapshot, macOS.