Command line reference
Commands
The following commands are available - you can always run them using npx remotion
or even without the npx
prefix if you put the command inside an npm script.
npx remotion preview
Start the server which allows you to preview the Remotion video. The only argument to pass is the entry file:
bash
npx remotion preview src/index.tsx
bash
npx remotion preview src/index.tsx
npx remotion render
Render a video based on the entry point, the composition ID and save it to the output location.
bash
npx remotion render <entry-file> <composition-id> <output-location>
bash
npx remotion render <entry-file> <composition-id> <output-location>
npx remotion still
Available from v2.3.
Render a still frame basd on the entry point, the composition ID and save it to the output location.
bash
npx remotion still <entry-file> <composition-id> <output-location>
bash
npx remotion still <entry-file> <composition-id> <output-location>
npx remotion compositions
Available from v2.6.12.
Print list of composition ids from the index file provided separated by line break.
bash
npx remotion compositions <entry-file>
bash
npx remotion compositions <entry-file>
npx remotion lambda
Available from v3.0 and if you install @remotion/lambda
.
npx remotion versions
Prints and validates versions of all Remotion packages.
npx remotion upgrade
Upgrade all Remotion-related dependencies to the newest version.
npx remotion --help
Prints the list of commands and flags for quick lookup.
Flags
Besides choosing a video and output location with the command line arguments, the following flags are supported:
--props
available for preview
, render
, still
, lambda still
, lambda render
commands
React Props to pass to the root component of your video. Must be a serialized JSON string (--props='{"hello": "world"}'
) or a path to a JSON file (./path/to/props.json
).
info
Inline JSON string isn't supported on Windows because it removes the "
character, use a temporary file instead.
--concurrency
available for render
command
How many CPU threads to use. Minimum 1. The maximum is the amount of threads you have (In Node.JS os.cpus().length
).
--pixel-format
available for render
, lambda render
command
Set a custom pixel format. See here for available values.
--image-format
available for render
, still
, lambda render
, lambda still
commands
jpeg
or png
- JPEG is faster, but doesn't support transparency. The default image format is jpeg
since v1.1. Flag available since v1.4.
--config
available for preview
, render
, still
commands
Specify a location for the Remotion config file. Available in v1.2 and later.
--env-file
available for preview
, render
, still
commands
Specify a location for a dotenv file. Default .env
. Available in v2.2 and later.
--quality
available for render
, still
, lambda render
commands
Value between 0 and 100 for JPEG rendering quality. Doesn't work when PNG frames are rendered. Available since v1.4.
--overwrite
available for render
, still
commands
Write to output even if file already exists.
--sequence
available for render
command
Pass this flag if you want an image sequence as the output instead of a video. Available since v1.4.
--codec
available for render
, lambda render
command
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. Available since v1.4.
--prores-profile
available for render
, lambda render
command
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
. Available since v2.1.6.
--crf
available for render
, lambda render
command
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. Available since v1.4.
--browser-executable
available for still
, render
commands
Path to a Chrome executable. If not specified and Remotion cannot find one, it will download one during rendering. Available since v1.5.
--scale
available for render
, still
, lambda render
, lambda still
command.
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
available for render
command
Render a subset of a video. Example: --frames=0-9
to select the first 10 frames. To render a still, use the still
command. Available since v2.0.
--frame
available for still
, lambda still
command
Which frame should be rendered when rendering a still. Example --frame=10
. Default 0
. Available from v2.3
--bundle-cache
available for still
, render
commands
Enable or disable Webpack caching. This flag is enabled by default, use --bundle-cache=false
to disable caching. Available since v2.0.
--log
available for preview
, still
, render
, lambda still
, lambda render
commands
Set the log level. Increase or decrease the amount of output. Acceptable values: error
, warn
, info
(default), verbose
info
If you don't feel like passing command line flags every time, consider creating a remotion.config.ts
config file.
--port
available for preview
, still
, render
commands
Set a custom HTTP server port. If not defined, Remotion will try to find a free port.
--ffmpeg-executable
available for render
command
Set a custom FFMPEG executable. If not defined, a ffmpeg
executable will be searched in PATH
.
--timeout
available for still
, render
, lambda still
, lambda render
command
Define how long a single frame may take to resolve all delayRender()
calls before it times out in milliseconds. Default: 30000
.
info
Not to be confused with the --timeout
flag when deploying a Lambda function.
--ignore-certificate-errors
available for still
, render
, lambda still
, lambda render
command
Results in invalid SSL certificates in Chrome, such as self-signed ones, being ignored. Available since v2.6.5.
--disable-web-security
available for still
, render
, lambda still
, lambda render
command
This will most notably disable CORS in Chrome among other security features. Available since v2.6.5.
--disable-headless
available for still
, render
command
Opens an actual browser during rendering to observe the render. Available since v2.6.5.
--gl
available for still
, render
, lambda still
, lambda render
command
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"
null
- Chromiums default
Default for local rendering: null
.
Default for Lambda rendering: "swangle"
.
--help
Print the list of available CLI commands and flags.
Example command
npx remotion render --codec=vp8 src/index.tsx HelloWorld out/video.webm
npx remotion render --codec=vp8 src/index.tsx HelloWorld out/video.webm
Fig.io autocompletion
Install Fig (macOS only) to add Remotion autocomplete to your terminal. Type npx remotion
to start get suggestions.