Skip to content

🎥 Make videos programmatically with React

update guides

Jonny Burgera2132f0df015
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 17e781e763..ad29531fd4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,97 +1,11 @@
-Want to watch a tutorial video instead? [Click here](https://www.youtube.com/watch?v=tgBfJw2tET8)
+Issues and pull requests of all sorts are welcome! Please read the [contribution guide](https://remotion.dev/docs/contributing) before you start.
----
+## Getting started (Video)
-## Contributing
+Watch the contributing video tutorial: [Click here](https://www.youtube.com/watch?v=tgBfJw2tET8)
-Issues and pull requests of all sorts are welcome!
+## Contribution guide
-For bigger projects, please coordinate with [Jonny Burger](https://jonny.io) to make sure your changes get merged.
-
-Please note that since I charge for Remotion when companies are using it, this is a **commercial project** by me (Jonny Burger). By sending pull requests, you agree that I can use your code changes in a commercial context.
-
-Furthermore, also note that you **cannot redistribute** this project. Please see [LICENSE.md](LICENSE.md) for what's allowed and what's not.
-
-Please note that this project is released with a [Contributor Code of Conduct](CODE-OF-CONDUCT.md). By participating in this project you agree to abide by its terms.
-
-### Code setup
-
-1. Remotion uses [`pnpm`](https://pnpm.io/) as the package manager for development in this repository. Please install the latest version of pnpm globally:
-
-```console
-[sudo] npm i -g pnpm
-```
-
-2. Clone the Remotion repository
-
-```console
-git clone https://github.com/remotion-dev/remotion.git && cd remotion
-```
-
-3. Install all dependencies:
-
-```console
-pnpm i
-```
-
-4. Build the project initially:
-
-```console
-pnpm build
-```
-
-5. Rebuild whenever a file changes:
-
-```console
-pnpm watch
-```
-
-6. You can start making changes!
-
-### Testing your changes
-
-You can start the Testbed using
-
-```console
-cd packages/example
-npm start
-```
-
-You can render a test video using
-
-```console
-cd packages/example
-pnpm render
-```
-
-You can run tests using
-
-```console
-pnpm test
-```
-
-in either a subpackage to run tests for that package or in the root to run all tests.
-
-### Running the `@remotion/player` testbed
-
-You can test changes to [@remotion/player](https://remotion.dev/docs/player) by starting the Player testbed:
-
-```console
-cd packages/player-example
-pnpm start
-```
-
-For information about testing, please consult [TESTING.md](./TESTING.md).
-
-### Running documentation
-
-You can run the Docusaurus server that powers our docs using:
-
-```console
-cd packages/docs
-pnpm start
-```
-
-### Developing Rust parts
-
-To develop the Rust parts of Remotion, see the README in [packages/renderer/README.md](packages/renderer/README.md)
+- [General information](https://remotion.dev/docs/contributing)
+- [Implementing a new feature](https://remotion.dev/docs/contributing/feature)
+- [Implementing a new option](https://remotion.dev/docs/contributing/option)
diff --git a/packages/docs/docs/contributing/feature.md b/packages/docs/docs/contributing/feature.md
new file mode 100644
index 0000000000..c1343ccec5
--- /dev/null
+++ b/packages/docs/docs/contributing/feature.md
@@ -0,0 +1,33 @@
+---
+title: Implementing a new feature
+---
+
+We are happy to accept contributions to the Remotion project that implement new features.
+
+## Setup
+
+See the [CONTRIBUTING.md](https://github.com/remotion-dev/remotion/blob/main/CONTRIBUTING.md) file for instructions on how to set up the project.
+
+## What's important to us
+
+- **Planning**: Signal beforehand that you would like to propose the feature by opening an issue and mentioning that you would like to work on it.
+ This gives us the chance to comment on whether we like the feature and lets us discuss the architecture.
+- **Generic:** The feature should be as unopinionated as possible. Instead of making decisions that are specific to your usecase, try to make the feature as generic as possible so that it can be used by everyone.
+- **Size**: The feature should not bloat lightweight packages by adding dependencies that can be avoided. Consider if the feature should be a new package in a monorepo if there are a lot of dependencies that are not needed by everyone.
+- **Documentation:** The feature should be documented and the documentation should have the same level of quality as the rest docs.
+
+## Technical standards
+
+- **TypeScript or Rust**: The code should be written in one of these two languages.
+- **Tests**: Add tests if you think it makes sense.
+- **Forward-compatibility**: Be mindful of how the feature might evolve in the future. Using objects in the input and output of an API makes it easier to add new properties in the future.
+- **Backwards-compatibility**: Your feature cannot break existing code if Remotion is upgraded, unless the feature lands in a major version.
+- **Naming conventions**: Use `camelCase` for variables. If the API interfaces with numeric values, the unit should be included. For example `durationInFrames` instead of `duration` or `timeoutInMilliseconds` instead of `timeout`.
+
+## Communicate with us
+
+Use the `#development` channel on [Discord](https://remotion.dev/discord) to quickly ask questions and get feedback.
+
+## See also
+
+- [Implementing a new option](/docs/contributing/option)
diff --git a/packages/docs/docs/contributing/index.md b/packages/docs/docs/contributing/index.md
index adf1902c62..5a39c502b1 100644
--- a/packages/docs/docs/contributing/index.md
+++ b/packages/docs/docs/contributing/index.md
@@ -1,29 +1,110 @@
---
-title: Implementing a new feature
+title: Contributing to Remotion
+sidebar_label: General information
---
-We are happy to accept contributions to the Remotion project that implement new features.
+Issues and pull requests of all sorts are welcome!
+
+For bigger projects, please coordinate with [Jonny Burger](https://jonny.io) to make sure your changes get merged.
+
+Please note that since we charge for Remotion when companies are using it, this is a **commercial project**.
+By sending pull requests, you agree that I can use your code changes in a commercial context.
+
+Furthermore, also note that you **cannot redistribute** this project. Please see [LICENSE.md](https://remotion.dev/license) for what's allowed and what's not.
+
+This project is released with a [Contributor Code of Conduct](https://remotion.dev/coc). By participating in this project you agree to abide by its terms.
## Setup
-See the [CONTRIBUTING.md](https://github.com/remotion-dev/remotion/blob/main/CONTRIBUTING.md) file for instructions on how to set up the project.
+<Step>1</Step> Remotion uses <a href="https://pnpm.io/"><code>pnpm</code></a> as the package manager for development in this repository. We recommend using Corepack so you get the same version of pnpm as we have. <br/><br/>
+
+```sh
+corepack enable
+```
+
+If you don't have `corepack`, install pnpm manually:
+
+```sh
+```
+
+Prefix with `sudo` if necessary.
+
+<Step>2</Step> Clone the Remotion repository:<br/>
+
+```sh
+git clone https://github.com/remotion-dev/remotion.git && cd remotion
+```
+
+<Step>3</Step> Install all dependencies:<br/>
+
+```sh
+pnpm i
+```
+
+<Step>4</Step> Build the project initially:<br/>
+
+```sh
+pnpm build
+```
+
+<Step>5</Step> Rebuild whenever a file changes:
+
+```sh
+pnpm watch
+```
+
+<Step>6</Step> You can start making changes!
+
+## Testing your changes
+
+You can start the Testbed using
+
+```sh
+cd packages/example
+npm start
+```
+
+You can render a test video using
+
+```sh
+cd packages/example
+pnpm render
+```
+
+You can run tests using
+
+```sh
+pnpm test
+```
+
+in either a subpackage to run tests for that package or in the root to run all tests.
+
+## Running the `@remotion/player` testbed
+
+You can test changes to [@remotion/player](https://remotion.dev/docs/player) by starting the Player testbed:
+
+```sh
+cd packages/player-example
+pnpm start
+```
+
+For information about testing, please consult [TESTING.md](./TESTING.md).
+
+## Running documentation
-## What's important to us
+You can run the Docusaurus server that powers our docs using:
-- **Planning**: Signal beforehand that you would like to propose the feature by opening an issue and mentioning that you would like to work on it.
- This gives us the chance to comment on whether we like the feature and lets us discuss the architecture.
-- **Generic:** The feature should be as unopinionated as possible. Instead of making decisions that are specific to your usecase, try to make the feature as generic as possible so that it can be used by everyone.
-- **Size**: The feature should not bloat lightweight packages by adding dependencies that can be avoided. Consider if the feature should be a new package in a monorepo if there are a lot of dependencies that are not needed by everyone.
-- **Documentation:** The feature should be documented and the documentation should have the same level of quality as the rest docs.
+```sh
+cd packages/docs
+pnpm start
+```
-## Technical standards
+## Developing Rust parts
-- **TypeScript or Rust**: The code should be written in one of these two languages.
-- **Tests**: Add tests if you think it makes sense.
-- **Forward-compatibility**: Be mindful of how the feature might evolve in the future. Using objects in the input and output of an API makes it easier to add new properties in the future.
-- **Backwards-compatibility**: Your feature cannot break existing code if Remotion is upgraded, unless the feature lands in a major version.
-- **Naming conventions**: Use `camelCase` for variables. If the API interfaces with numeric values, the unit should be included. For example `durationInFrames` instead of `duration` or `timeoutInMilliseconds` instead of `timeout`.
+To develop the Rust parts of Remotion, see the README in [packages/renderer/README.md](https://github.com/remotion-dev/remotion/blob/main/packages/renderer/README.md)
-## Communicate with us
+## See also
-Use the `#development` channel on [Discord](https://remotion.dev/discord) to quickly ask questions and get feedback.
+- [Implementing a new feature](/docs/contributing/feature)
+- [Implementing a new option](/docs/contributing/option)
diff --git a/packages/docs/docs/contributing/option.md b/packages/docs/docs/contributing/option.md
new file mode 100644
index 0000000000..e834eae5db
--- /dev/null
+++ b/packages/docs/docs/contributing/option.md
@@ -0,0 +1,43 @@
+---
+title: 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](/docs/terminology#remotion-preview).
+- If the action is available as a [CLI](/docs/cli) command, the option should also be added as a CLI flag.
+- The [config](/docs/config) file can be also be used to specify multiple options. <br/>
+ :::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:
+
+<Step>1</Step> Directly passed to the Node.JS API<br/>
+<Step>2</Step> Specified via the render UI in the <a href="/docs/terminology#remotion-preview">Remotion Preview</a><br/>
+<Step>3</Step> Specified via <a href="/docs/cli">CLI flag</a><br/>
+<Step>4</Step> Specified via <a href="/docs/config">config file</a><br/>
+<Step>5</Step> 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](/docs/api) and the [CLI reference](/docs/cli).
+
+Note from which version the option is available.
+
+## See also
+
+- [Implementing a new feature](/docs/contributing/feature)
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index 3d89d6ae7b..47e2069af0 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -502,7 +502,11 @@ module.exports = {
{
type: "category",
label: "Contributing",
- items: ["contributing/index"],
+ items: [
+ "contributing/index",
+ "contributing/feature",
+ "contributing/option",
+ ],
},
"license",
],