Skip to main content

npx remotion studio

Alias: npx remotion preview

启动Remotion Studio

bash
npx remotion studio <entry-point>?
bash
npx remotion studio <entry-point>?

您可以将入口点作为参数传递,否则将会被确定

标志

--props

传递给视频所选组合的输入属性。
我们不建议在使用 Studio 时传递此标志 - 而是使用 defaultProps

必须是一个序列化的 JSON 字符串 (--props='{"hello": "world"}') 或指向 JSON 文件的路径 (./path/to/props.json)。
从根组件中,可以使用 getInputProps() 读取属性。
您可以使用 calculateMetadata() 转换输入属性。

note

在 Windows shells 上不支持内联 JSON 字符串,因为它会移除 " 字符,请改用文件名。

--configv1.2.0

指定 Remotion 配置文件的位置。

--env-filev2.2.0

指定 dotenv 文件的位置 - 默认为 .env了解 Remotion 中环境变量的工作原理。

--log

设置日志级别。增加或减少输出量。可接受的值:errorwarninfo默认)、verbose

--port

设置要在其上启动服务器的自定义 HTTP 服务器端口。如果未定义,Remotion 将尝试找到一个空闲端口。

--public-dirv3.2.13

The path of the URL where the bundle is going to be hosted. By default it is /, meaning that the bundle is going to be hosted at the root of the domain (e.g. https://localhost:3000/). If you are deploying to a subdirectory (e.g. /sites/my-site/), you should set this to the subdirectory.

--disable-keyboard-shortcutsv3.2.11

禁用 Studio 中的所有键盘快捷键

--webpack-pollv3.3.11

启用 Webpack 轮询 以替代文件系统事件监听器进行热重载。如果您在虚拟机内部或者拥有远程文件系统,则这很有用。 传递一个以毫秒为单位的值,例如 --webpack-poll=1000

--no-openv3.3.19

阻止 Remotion 尝试打开浏览器。如果您在 Remotion 中使用的浏览器与操作系统默认浏览器不同,这将非常有用。

--browserv3.3.79

指定应用于打开选项卡的浏览器 - 默认情况下使用默认浏览器。
传递一个绝对字符串或 "chrome" 以使用 Chrome。 如果选择 Chrome 作为浏览器,并且您在 macOS 上,Remotion 将尝试重用现有选项卡。

为了向后兼容,还支持 BROWSER 环境变量。

--browser-argsv3.3.79

应传递给浏览器的一组命令行标志。像这样传递它们:

sh
npx remotion studio --browser-args="--disable-web-security"
sh
npx remotion studio --browser-args="--disable-web-security"

--beep-on-finishv4.0.84

在视频渲染完成时播放蜂鸣声。如果您正在后台渲染视频并希望在完成时收到通知,这将非常有用。

sh
npx remotion studio --beep-on-finish
sh
npx remotion studio --beep-on-finish

--ipv4v4.0.125

强制 Studio 绑定到 IPv4 接口,即使存在 IPv6 接口。

sh
npx remotion studio --ipv4
sh
npx remotion studio --ipv4