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 <entry-file>
bash
npx remotion preview <entry-file>
If entry-file
is not passed, Remotion will try to detect the entry file with the following priority order:
- Get the path from the Config (Can be set using
Config.setEntryPoint("<entry-point>")
). - Look for some common paths i.e.
src/index.ts
,src/index.tsx
,src/index.js
,remotion/index.js
. - Fail as entry point could not be determined.
Flags
--props
React 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
). Can also be read using getInputProps()
.
Inline JSON string isn't supported on Windows because it removes the "
character, use a temporary file instead.
--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
.
--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. If not defined, Remotion will try to find a free port.
--public-dir
v3.2.13
Define the location of the public/
directory.. If not defined, Remotion will assume the location is the public
folder in your Remotion root.
--disable-keyboard-shortcuts
v3.2.11
Disables all keyboard shortcuts in the Preview.
--webpack-poll
v3.3.11
Enables Webpack polling instead of the file system event listeners for hot reloading. This is useful if you are inside a virtual machine or have a remote file system.
Pass a value in milliseconds, for example --webpack-poll=1000
.
--no-open
v3.3.19
Prevents Remotion from trying to open a browser. This is useful if you use a different browser for Remotion than the operating system default.
--browser
v3.3.79
Specify the browser which should be used for opening tab - using the default browser by default.
Pass an absolute string or "chrome"
to use Chrome.
If Chrome is selected as the browser and you are on macOS, Remotion will try to reuse an existing tab
For backwards compatibility, the BROWSER
environment variable is also supported.
--browser-args
v3.3.79
A set of command line flags that should be passed to the browser. Pass them like this:
remotion preview --browser-args="--disable-web-security"
remotion preview --browser-args="--disable-web-security"
Notice that Chrome will try to reuse the process, so you want to quit it first before you start it with the flags.