fix(remotion): honor per-render duration/fps/dimensions via calculateMetadata
The ShortVideo Composition hardcoded durationInFrames/fps/width/height from DEFAULT_PROPS. Since there was no calculateMetadata callback, selectComposition()/renderMedia() in render-service ignored whatever durationInFrames/fps/width/height was actually passed in inputProps at render time, always producing a fixed 900-frame (30s) 1080x1920 output regardless of the real clip length. Verified: rendered with durationInFrames=300 (10s) before this fix produced a 30s file (base video frozen on its last frame for the remaining ~20s). After adding calculateMetadata, output duration matches the requested frame count exactly.
This commit is contained in:
parent
d83e0dddbf
commit
b8816b2db5
1 changed files with 6 additions and 0 deletions
|
|
@ -84,6 +84,12 @@ export const RemotionRoot: React.FC = () => {
|
||||||
width={DEFAULT_PROPS.width}
|
width={DEFAULT_PROPS.width}
|
||||||
height={DEFAULT_PROPS.height}
|
height={DEFAULT_PROPS.height}
|
||||||
defaultProps={DEFAULT_PROPS}
|
defaultProps={DEFAULT_PROPS}
|
||||||
|
calculateMetadata={({ props }) => ({
|
||||||
|
durationInFrames: props.durationInFrames,
|
||||||
|
fps: props.fps,
|
||||||
|
width: props.width,
|
||||||
|
height: props.height,
|
||||||
|
})}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue