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
可选
--audio-codec
v3.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
可选
--frames
可选
--image-format
可选
--pixel-format
可选
--props
可选
--prores-profile
可选
--jpeg-quality
可选,从 v4.0.0 版本开始可用
--quality
--quality
可选,已在 v4.0.0 版本中移除
重命名为 --jpeg-quality
。
--log
可选
--ignore-certificate-errors
可选
--disable-web-security
可选
--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-linux
v4.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
可选
--timeout
可选
--scale
可选
--port
可选
--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 looping1
loops the GIF once (plays twice in total)2
loops the GIF twice (plays three times in total) and so on.
--every-nth-frame
可选
--log
可选
--muted
可选
--enforce-audio-track
可选
--browser-executable
可选
--public-dir
可选
--config
可选
--bundle-cache
可选
--video-bitrate
可选
--audio-bitrate
可选
--offthreadvideo-cache-size-in-bytes
v4.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-space
v4.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-directory
v4.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
--ffmpeg-executable
可选的,在v4.0中已移除
--ffprobe-executable
--ffprobe-executable
可选的,在v4.0中已移除