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 Studio.
  • 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:

Directly passed to the Node.JS API


Specified via the render UI in the Remotion Studio


Specified via CLI flag


Specified via config file


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.

Testing changes to the CLI

Check out the Running the CLI section in the contributing docs.

See also