<静止>
一个 <Still />
是一个单帧的 <Composition />
。它是一种方便的方式来定义一个渲染图像而不是视频的合成。
示例
<Still />
组件与 <Composition />
组件具有相同的 API,只是不需要传递 durationInFrames
和 fps
。
tsx
import {Composition ,Still } from "remotion";import {MyComp } from "./MyComp";export constMyVideo = () => {return (<><Composition id ="my-video"component ={MyComp }width ={1080}height ={1080}fps ={30}durationInFrames ={3 * 30}/><Still id ="my-image"component ={MyComp }width ={1080}height ={1080} /></>);};
tsx
import {Composition ,Still } from "remotion";import {MyComp } from "./MyComp";export constMyVideo = () => {return (<><Composition id ="my-video"component ={MyComp }width ={1080}height ={1080}fps ={30}durationInFrames ={3 * 30}/><Still id ="my-image"component ={MyComp }width ={1080}height ={1080} /></>);};