Skip to main content

npx remotion compositions

从 v2.6.12 版本开始可用。

基于入口点路径打印组合 ID 列表。

bash
npx remotion compositions <serve-url|entry-file>?
bash
npx remotion compositions <serve-url|entry-file>?

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

标志

--props

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

note

由于 Windows shells 不支持内联 JSON 字符串,因为它会移除 " 字符,所以请使用文件名。

--config

指定 Remotion 配置文件的位置。

--env-filev2.2.0

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

--bundle-cache

启用或禁用 Webpack 缓存。此标志默认启用,使用 --bundle-cache=false 来禁用缓存。

--log

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

info

如果您不想每次都传递命令行标志,考虑创建一个 remotion.config.ts 配置文件

--port

设置自定义 HTTP 服务器端口以托管 Webpack bundle。如果未定义,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.

--timeout

定义在毫秒中解析所有 delayRender() 调用之前,组合获取超时的时间。默认值:30000

info

不要与部署 Lambda 函数时的 --timeout 标志 混淆。

--ignore-certificate-errors

导致 Chrome 忽略无效的 SSL 证书,如自签名证书。

--disable-web-security

自 v2.6.5 起可用

这将主要在 Chrome 中禁用 CORS,以及其他安全功能。

--disable-headless?

If disabled, the render will open an actual Chrome window where you can see the render happen. The default is headless mode.

--enable-multiprocess-on-linuxv4.0.42

Removes the --single-process flag that gets passed to Chromium on Linux by default. This will make the render faster because multiple processes can be used, but may cause issues with some Linux distributions or if window server libraries are missing.
Default: false until v4.0.136, then true from v4.0.137 on because newer Chrome versions don't allow rendering with the --single-process flag.
This flag will be removed in Remotion v5.0.

--user-agentv3.3.83

允许您设置 headless Chrome 浏览器假定的自定义用户代理。

--offthreadvideo-cache-size-in-bytesv4.0.23

From v4.0, Remotion has a cache for <OffthreadVideo> frames. The default is null, corresponding to half of the system memory available when the render starts.
This option allows to override the size of the cache. The higher it is, the faster the render will be, but the more memory will be used.
The used value will be printed when running in verbose mode.
Default: null

--binaries-directoryv4.0.120

The directory where the platform-specific binaries and libraries that Remotion needs are located. Those include an ffmpeg and ffprobe binary, a Rust binary for various tasks, and various shared libraries. If the value is set to null, which is the default, then the path of a platform-specific package located at node_modules/@remotion/compositor-* is selected.
This option is useful in environments where Remotion is not officially supported to run like bundled serverless functions or Electron.

--quiet, --q

仅打印由空格分隔的组合 ID。

--ffmpeg-executable

在 v4.0 中移除

设置自定义 ffmpeg 可执行文件。如果未定义,将在 PATH 中搜索 ffmpeg 可执行文件。

--ffprobe-executable

在 v4.0 中移除

设置自定义 ffprobe 可执行文件。如果未定义,将在 PATH 中搜索 ffprobe 可执行文件。

另请参阅