Skip to main content

npx remotion 基准测试

v3.2.28

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

🌐 Measures render time by running a render multiple times, if desired with multiple compositions and concurrency values to compare against each other.

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

你可以提供多个作品ID,用逗号分隔,例如:npx remotion benchmark src/index.ts --codec=h264 Main,Canvas,CSS

🌐 You can provide multiple composition IDs separated by comma, ex: npx remotion benchmark src/index.ts --codec=h264 Main,Canvas,CSS

如果未传入 composition-ids,Remotion 将允许你从列表中选择组合。

🌐 If composition-ids is not passed, Remotion will let you select compositions from a list.

标志

🌐 Flags

--runs

Specify how many times the video should be rendered during a benchmark. Default 3.

--concurrencies

Specify which concurrency values should be used while benchmarking. Multiple values can be passed separated by comma. Learn more about concurrency.

--codec

继承自 npx remotion render

🌐 Inherited from 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

🌐 Inherited from npx remotion render

--frames

继承自 npx remotion render

🌐 Inherited from npx remotion render

--image-format

继承自 npx remotion render

🌐 Inherited from npx remotion render

--pixel-format

继承自 npx remotion render

🌐 Inherited from npx remotion render

--props

继承自 npx remotion render

🌐 Inherited from npx remotion render

--prores-profile

继承自 npx remotion render

🌐 Inherited from npx remotion render

--jpeg-qualityv4.0.0

继承自 npx remotion render

🌐 Inherited from npx remotion render

--quality

在 v4.0.0 中被移除。重命名为 --jpeg-quality

🌐 Removed in v4.0.0. Renamed to --jpeg-quality.

--log

继承自 npx remotion render

🌐 Inherited from npx remotion render

--ignore-certificate-errors

继承自 npx remotion render

🌐 Inherited from npx remotion render

--disable-web-security

继承自 npx remotion render

🌐 Inherited from npx remotion render

--dark-modev4.0.381

Whether Chromium should pretend to be in dark mode by emulating the media feature 'prefers-color-scheme: dark'. Default is false.

--disable-headless

Deprecated - will be removed in 5.0.0. With the migration to Chrome Headless Shell, this option is not functional anymore.

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

Changelog
  • From Remotion v2.6.7 until v3.0.7, the default for Remotion Lambda was swiftshader, but from v3.0.8 the default is swangle (Swiftshader on Angle) since Chrome 101 added support for it.
  • From Remotion v2.4.3 until v2.6.6, the default was angle, however it turns out to have a small memory leak that could crash long Remotion renders.

Select the OpenGL renderer backend for Chromium.
Accepted values:

  • "angle"
  • "egl"
  • "swiftshader"
  • "swangle"
  • "vulkan" (from Remotion v4.0.41)
  • "angle-egl" (from Remotion v4.0.51)

The default is null, letting Chrome decide, except on Lambda where the default is "swangle"

--chrome-modev4.0.248

One of headless-shell, chrome-for-testing. Default headless-shell. Use chrome-for-testing to take advantage of GPU drivers on Linux.

--timeout

继承自 npx remotion render

🌐 Inherited from npx remotion render

--scale

继承自 npx remotion render

🌐 Inherited from npx remotion render

--port

继承自 npx remotion render

🌐 Inherited from 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

🌐 Inherited from npx remotion render

--log

继承自 npx remotion render

🌐 Inherited from npx remotion render

--muted

继承自 npx remotion render

🌐 Inherited from npx remotion render

--enforce-audio-track

继承自 npx remotion render

🌐 Inherited from npx remotion render

--disallow-parallel-encodingv4.0.315

继承自 npx remotion render

🌐 Inherited from npx remotion render

--browser-executable

继承自 npx remotion render

🌐 Inherited from npx remotion render

--public-dir

继承自 npx remotion render

🌐 Inherited from npx remotion render

--config

继承自 npx remotion render

🌐 Inherited from npx remotion render

--bundle-cache

继承自 npx remotion render

🌐 Inherited from npx remotion render

--video-bitrate

继承自 npx remotion render

🌐 Inherited from npx remotion render

--audio-bitrate

继承自 npx remotion render

🌐 Inherited from npx remotion render

--color-spacev4.0.28

Color space to use for the video. Acceptable values: "default"(default since 5.0), "bt601" (same as "default", since v4.0.424), "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.

--hardware-accelerationv4.0.228

One of "disable", "if-possible", or "required" . Default "disable". Encode using a hardware-accelerated encoder if available. If set to "required" and no hardware-accelerated encoder is available, then the render will fail.

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

--media-cache-size-in-bytesv4.0.352

Specify the maximum size of the cache that <Video> and <Audio> from @remotion/media may use combined, in bytes.
The default is half of the available system memory when the render starts.

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

--experimental-rspackv4.0.426

Uses Rspack instead of Webpack as the bundler for the Studio or bundle.

--ffmpeg-executable

在 v4.0 中移除。继承自 npx remotion render

🌐 Removed in v4.0. Inherited from npx remotion render

--ffprobe-executable

在 v4.0 中移除。继承自 npx remotion render

🌐 Removed in v4.0. Inherited from npx remotion render