创建新视频
如果你还没有开始,请启动录音机:
🌐 If you haven't done so yet, start the Recorder:
bun run devRemotion 将每个输出视频称为“组合”。生成新组合有两种方式:
🌐 Remotion calls each output video a "Composition". There are two ways to generate a new composition:
1. 视觉方式
🌐 1. Visual way
打开 http://localhost:3000,在左侧边栏中,右键点击“空”合成。选择“复制”,并给你的合成一个ID。确认。
🌐 Open http://localhost:3000 and in the left sidebar, right-click on the "empty" composition. Select "Duplicate" and give your composition an ID. Confirm.
2. 手动方式
🌐 2. Manual way
在代码编辑器中打开项目。你将在 remotion/Root.tsx 下看到一个空的 <Composition>:
🌐 Open the project in a code editor. You will see an empty <Composition> under remotion/Root.tsx:
<Composition
component={Main}
id="empty"
schema={videoConf}
defaultProps={{
theme: 'light' as const,
canvasLayout: 'square' as const,
scenes: [],
scenesAndMetadata: [],
platform: 'x' as const,
}}
calculateMetadata={calcMetadata}
/>复制并粘贴 <Composition /> 组件以进行复制,并为其提供一个不同于 "empty" 的 id。例如:
🌐 Copy and paste the <Composition /> component to duplicate it and give it an id that is different than "empty". For example:
remotion/Root.tsx<Composition component={Main} id="empty" schema={videoConf} defaultProps={{ theme: "light" as const, canvasLayout: "square" as const, scenes: [], scenesAndMetadata: [], }} calculateMetadata={calcMetadata} /> <Composition component={Main} id="my-video" schema={videoConf} defaultProps={{ theme: "light" as const, canvasLayout: "square" as const, scenes: [], scenesAndMetadata: [], }} calculateMetadata={calcMetadata} />
保存,然后当你在 http://localhost:3000 查看 Remotion Studio 时,你应该能看到新的作品。
🌐 Save, and you should see the new composition when you look at the Remotion Studio on http://localhost:3000.