Remotion 套件
一旦你用 React 编写了你的视频,你需要使用 Webpack 对其进行打包以便渲染。
打包过程的输出称为“包”。
它是一个包含 HTML、CSS、JavaScript 和你的资源的文件夹。
🌐 Once you have written your video in React, you need to bundle it using Webpack in order to render it.
The output of the bundling process is called the "bundle".
It is a folder containing HTML, CSS, JavaScript and your assets.
当你使用命令行进行渲染时,会自动生成一个打包包(这是 Bundling video 步骤)。
🌐 When you render using the command line, a bundle is automatically generated (this is the Bundling video step).
你可以使用 bundle() API 来以编程方式创建一个打包包。
🌐 You can use the bundle() API to create a bundle programmatically.
你可以使用 npx remotion bundle 命令在 CLI 上创建一个打包包。
🌐 You can create a bundle on the CLI using the npx remotion bundle command.
要打包并部署到 S3,你可以使用 npx remotion lambda sites create 命令。
🌐 To bundle and deploy to S3, you can use the npx remotion lambda sites create command.
如果你在某个 URL 下托管一个打包包,它就会变成一个 Serve URL,你可以指定它来渲染视频。
🌐 If you host a bundle under a URL, it becomes a Serve URL, which you can specify to render videos.