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 API2
Specified via the render UI in the Remotion Preview3
Specified via CLI flag4
Specified via config file5
Fallback to a default valueNaming
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.