Skip to main content

Implementing a new option

Adding a new option to a feature is a great way to contribute to Remotion and enable more use cases.

Ways of specifying an option

There are multiple ways to specify an option:

  • APIs that can be called via Node.JS can directly accept a parameter.
  • Options influencing a render can be added to the render dialog in the Remotion Preview.
  • If the action is available as a CLI command, the option should also be added as a CLI flag.
  • The config file can be also be used to specify multiple options.
    note

    The config file should not be read when executing a CLI command, otherwise it's values should be ignored.

Option Resolution

The option should be resolved in the following order:

1
Directly passed to the Node.JS API
2
Specified via the render UI in the Remotion Preview
3
Specified via CLI flag
4
Specified via config file
5
Fallback to a default value

Naming

The option should be named in camelCase for options in Node.JS and in hyphen-case for options accepted by the CLI.

Options accepting numerical values should include the unit in the name. For example durationInFrames instead of duration or timeoutInMilliseconds instead of timeout.

Documentation

The option should be documented in the API reference and the CLI reference.

Note from which version the option is available.

See also