Skip to main content

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:

  1. Get the path from the Config (Can be set using Config.Preview.setEntryPoint("<entry-point>")).
  2. Look for some common paths i.e. src/index.tsx, src/index.ts, src/index.js, remotion/index.js.
  3. 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().

info

Inline JSON string isn't supported on Windows because it removes the " character, use a temporary file instead.

--config

Specify a location for the Remotion config file. Available in v1.2 and later.

--env-file

Specify a location for a dotenv file. Default .env. Available in v2.2 and later.

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

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

Available from v3.2.11

Disables all keyboard shortcuts in the Preview.