Skip to main content

npx remotion 基准测试

从 v3.2.28 版本开始可用

通过多次运行渲染来测量渲染时间,如果需要,可以使用多个组合和并发值进行比较。

bash
npx remotion benchmark src/index.ts [composition-ids]
bash
npx remotion benchmark src/index.ts [composition-ids]

您可以提供多个由逗号分隔的组合 ID,例如:npx remotion benchmark src/index.ts --codec=h264 Main,Canvas,CSS

如果未传递 composition-ids,Remotion 将让您从列表中选择组合。

标志

--runs

可选。默认值为 3

指定必须渲染视频的次数。默认值为 3。

--concurrencies

可选

您可以指定在渲染视频时应使用哪个并发值。可以通过逗号分隔传递多个并发值。了解更多关于并发性

--codec

可选

继承自 npx remotion render

--audio-codecv3.3.42

可选

Set the format of the audio that is embedded in the video. Not all codec and audio codec combinations are supported and certain combinations require a certain file extension and container format. See the table in the docs to see possible combinations.

--crf

可选

继承自 npx remotion render

--frames

可选

继承自 npx remotion render

--image-format

可选

继承自 npx remotion render

--pixel-format

可选

继承自 npx remotion render

--props

可选

继承自 npx remotion render

--prores-profile

可选

继承自 npx remotion render

--jpeg-quality

可选,从 v4.0.0 版本开始可用

继承自 npx remotion render

--quality

可选,已在 v4.0.0 版本中移除

重命名为 --jpeg-quality

--log

可选

继承自 npx remotion render

--ignore-certificate-errors

可选

继承自npx remotion render

--disable-web-security

可选

继承自npx remotion render

--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.

--gl

可选

继承自npx remotion render

--timeout

可选

继承自npx remotion render

--scale

可选

继承自npx remotion render

--port

可选

继承自npx remotion render

--number-of-gif-loops

可选

Allows you to set the number of loops as follows:
  • null (or omitting in the CLI) plays the GIF indefinitely.
  • 0 disables looping
  • 1 loops the GIF once (plays twice in total)
  • 2 loops the GIF twice (plays three times in total) and so on.

--every-nth-frame

可选

继承自npx remotion render

--log

可选

继承自npx remotion render

--muted

可选

继承自npx remotion render

--enforce-audio-track

可选

继承自npx remotion render

--browser-executable

可选

继承自npx remotion render

--public-dir

可选

继承自npx remotion render

--config

可选

继承自npx remotion render

--bundle-cache

可选

继承自npx remotion render

--video-bitrate

可选

继承自npx remotion render

--audio-bitrate

可选

继承自npx remotion render

--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

--color-spacev4.0.28

Color space to use for the video. Acceptable values: "default"(default since 5.0), "bt709" (since v4.0.28), "bt2020-ncl" (since v4.0.88), "bt2020-cl" (since v4.0.88), .
For best color accuracy, it is recommended to also use "png" as the image format to have accurate color transformations throughout.
Only since v4.0.83, colorspace conversion is actually performed, previously it would only tag the metadata of the video.

--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.

--ffmpeg-executable

可选的,在v4.0中已移除

继承自npx remotion render

--ffprobe-executable

可选的,在v4.0中已移除

继承自npx remotion render