npx remotion render
Render a video or audio based on the entry point, the composition ID and save it to the output location.
bash
npx remotion render <entry-point|serve-url>? <composition-id> <output-location>
bash
npx remotion render <entry-point|serve-url>? <composition-id> <output-location>
You may pass a Serve URL or an entry point as the first argument, otherwise the entry point will be determined.
If composition-id
is not passed, Remotion will ask you to select a composition.
If output-location
is not passed, the media will be rendered into the out
folder.
Flags
Besides choosing a video and output location with the command line arguments, the following flags are supported:
--props
Input Props to pass to the selected composition of your video..
Must be a serialized JSON string (--props='{"hello": "world"}'
) or a path to a JSON file (./path/to/props.json
).
From the root component the props can be read using getInputProps()
.
You may transform input props using calculateMetadata()
.
Inline JSON string isn't supported on Windows shells because it removes the "
character, use a file name instead.
--height
v3.2.40
--width
v3.2.40
--concurrency
How many CPU threads to use. Minimum 1. The maximum is the amount of threads you have (In Node.JS os.cpus().length
). You can also provide a percentage value (e.g. 50%).
--pixel-format
Set a custom pixel format. See here for available values.
--image-format
v1.4.0
jpeg
or png
- JPEG is faster, but doesn't support transparency. The default image format is jpeg
since v1.1.
--config
v1.2.0
Specify a location for the Remotion config file.
--env-file
v2.2.0
Specify a location for a dotenv file. Default .env
.
--jpeg-quality
v4.0.0
Value between 0 and 100 for JPEG rendering quality. Doesn't work when PNG frames are rendered.
--quality
v1.4.0
--quality
Renamed to --jpeg-quality
in v4.0.0
--output
v4.0.0
Sets the output file path, as an alternative to the output-location
positional argument.
--overwrite
Write to output even if file already exists.. This flag is enabled by default, use --overwrite=false
to disable it.
--sequence
v1.4.0
Pass this flag if you want an image sequence as the output instead of a video.
--codec
v1.4.0
h264
or h265
or png
or vp8
or vp9
or mp3
or aac
or wav
or prores
or h264-mkv
. If you don't supply --codec
, it will use the H.264 encoder.
--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.--audio-bitrate
v3.2.32
Specify the target bitrate for the generated video. The syntax for FFmpeg's -b:a
parameter should be used. FFmpeg may encode the video in a way that will not result in the exact audio bitrate specified. Example values: 512K
for 512 kbps, 1M
for 1 Mbps. Default: 320k
--video-bitrate
v3.2.32
Specify the target bitrate for the generated video. The syntax for FFmpeg's-b:v
parameter should be used. FFmpeg may encode the video in a way that will not result in the exact video bitrate specified. Example values: 512K
for 512 kbps, 1M
for 1 Mbps.--buffer-size
v4.0.78
The value for the -bufsize
flag of FFmpeg. Should be used in conjunction with the encoding max rate flag.--max-rate
v4.0.78
The value for the -maxrate
flag of FFmpeg. Should be used in conjunction with the encoding buffer size flag.--prores-profile
v2.1.6
Set the ProRes profile. This option is only valid if the codec
has been set to prores
. Possible values: 4444-xq
, 4444
, hq
, standard
, light
, proxy
. See here for explanation of possible values. Default: hq
.
--x264-preset
v4.2.2
Sets a x264 preset profile. Only applies to videos rendered with h264
codec.Possible values:
superfast
, veryfast
, faster
, fast
, medium
, slow
, slower
, veryslow
, placebo
.Default:
medium
--crf
v1.4.0
To set Constant Rate Factor (CRF) of the output. Minimum 0. Use this rate control mode if you want to keep the best quality and care less about the file size. This option cannot be set if --video-bitrate
is set.
--browser-executable
v1.5.0
Path to a Chrome executable. If not specified and Remotion cannot find one, it will download one during rendering.
--scale
Scales the output frames by the factor you pass in. For example, a 1280x720px frame will become a 1920x1080px frame with a scale factor of 1.5
. Vector elements like fonts and HTML markups will be rendered with extra details. scale
must be greater than 0 and less than equal to 16. Default: 1
.
--frames
v2.0.0
Render a subset of a video. Example: --frames=0-9
to select the first 10 frames. To render a still, use the still
command.
--every-nth-frame
v3.1.0
Render only every nth frame. This option may only be set when rendering GIFs. This allows you to lower the FPS of the GIF.
For example only every second frame, every third frame and so on. Only works for rendering GIFs. See here for more details.
--muted
v3.2.1
Disables audio output. This option may only be used when rendering a video.
--enforce-audio-track
v3.2.1
Render a silent audio track if there wouldn't be one otherwise..
--number-of-gif-loops
v3.1.0
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.
--bundle-cache
v2.0.0
Enable or disable Webpack caching. This flag is enabled by default, use --bundle-cache=false
to disable caching.
--log
Set the log level. Increase or decrease the amount of output. Acceptable values: error
, warn
, info
(default), verbose
--port
Set a custom HTTP server port that will be used to host the Webpack bundle. If not defined, Remotion will try to find a free port.
--public-dir
v3.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
Define how long a single frame may take to resolve all delayRender()
calls before it times out in milliseconds. Default: 30000
.
Not to be confused with the --timeout
flag when deploying a Lambda function.
--ignore-certificate-errors
v2.6.5
Results in invalid SSL certificates in Chrome, such as self-signed ones, being ignored.
--disable-web-security
v2.6.5
This will most notably disable CORS in Chrome among other security features.
--disable-headless
v2.6.5
Opens an actual browser during rendering to observe the render.
--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 isswangle
(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"
--user-agent
v3.3.83
Lets you set a custom user agent that the headless Chrome browser assumes.
--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.
--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.
--repro
v4.0.88
Create a ZIP that you can submit to Remotion if asked for a reproduction.--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.
--for-seamless-aac-concatenation
v4.0.123
If enabled, the audio is trimmed to the nearest AAC frame, which is required for seamless concatenation of AAC files. This is a requirement if you later want to combine multiple video snippets seamlessly.This option is used internally. There is currently no documentation yet for to concatenate the audio chunks.
--separate-audio-to
v4.0.123
If set, the audio will not be included in the main output but rendered as a separate file at the location you pass. It is recommended to use an absolute path. If a relative path is passed, it is relative to the Remotion Root.--ffmpeg-executable
--ffmpeg-executable
removed in v4.0
Set a custom ffmpeg
executable. If not defined, a ffmpeg
executable will be searched in PATH
.
--ffprobe-executable
v3.0.17
--ffprobe-executable
removed in v4.0
Set a custom ffprobe
executable. If not defined, a ffprobe
executable will be searched in PATH
.