命令行参考
如何使用
🌐 How to use
你可以通过安装 @remotion/cli 并运行来使用 CLI:
🌐 You can run the CLI by installing @remotion/cli and running:
npx remotion在一个 npm 项目中yarn remotion在 Yarn 项目中pnpm exec remotion在 pnpm 项目中。bunx remotion在 Bun 项目中
为了简洁起见,在文档中我们总是说 npx remotion。
🌐 For brevity, in the documentation we always say npx remotion.
在 npm 脚本中,你不需要 npx 前缀:
🌐 Inside an npm script, you don't need the npx prefix:
package.json{ "scripts": { "render": "remotion render" } }
使用 Bunv4.0.118
🌐 Using Bunv4.0.118
默认情况下,npx remotion 命令是使用 Node 执行的。
即使是 bunx remotion 也使用 Node,除非你添加 --bun 标志。
要使用 Bun,请将 remotion 替换为 remotionb。
🌐 By default, the npx remotion command is being executed using Node.
Even bunx remotion is using Node, unless you add the --bun flag.
To use Bun, replace remotion with remotionb.
package.json{ "scripts": { "render": "remotionb render" } }
使用 Denov4.0.227
🌐 Using Denov4.0.227
Remotion 不支持 Deno。
如果你仍然想尝试,可以使用 npx remotiond 来运行 Deno 版本的 CLI。
🌐 Deno is not supported by Remotion.
If you like to experiment nonetheless, use npx remotiond to run the Deno version of the CLI.
package.json{ "scripts": { "render": "remotiond render" } }
命令
🌐 Commands
以下命令可用 —— 你可以始终使用 npx remotion 运行它们,或者如果将命令放入 npm 脚本中,甚至可以不使用 npx 前缀运行它们。
🌐 The following commands are available - you can always run them using npx remotion or even without the npx prefix if you put the command inside an npm script.
ffmpeg commandffprobe command示例命令
🌐 Example command
npx remotion render --codec=vp8 HelloWorld out/video.webm另请参阅
🌐 See also