Skip to content

🎥 Make videos programmatically with React

finish

Jonny Burgerdef590371912
diff --git a/packages/docs/docs/cli.md b/packages/docs/docs/cli.md
index f41a168245..1bda7063f3 100644
--- a/packages/docs/docs/cli.md
+++ b/packages/docs/docs/cli.md
@@ -13,7 +13,7 @@ npx remotion render <entry-file> <composition-id> <output-location>
Besides choosing a video and output location with the command line arguments, the following flags are supported:
-- `--props`: React Props to pass to the root component of your video. Must be a serialized JSON string or JSON file Name (`defaultProps.json`).
+- `--props`: React Props to pass to the root component of your video. Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
- `--concurrency`: [How many CPU threads to use.](/docs/config#setconcurrency) Minimum 1. The maximum is the amount of threads you have.
- `--pixel-format`: [Set a custom pixel format. See here for available values.](/docs/config#setpixelformat)
- `--image-format`: [`jpeg` or `png` - JPEG is faster, but supports transparency.](/docs/config#setimageformat) The default image format is `jpeg` since v1.1. Flag available since v1.4.
diff --git a/packages/docs/docs/parametrized-rendering.md b/packages/docs/docs/parametrized-rendering.md
index ae1ffef748..d81250d13e 100644
--- a/packages/docs/docs/parametrized-rendering.md
+++ b/packages/docs/docs/parametrized-rendering.md
@@ -49,27 +49,18 @@ By using `React.FC`, you can ensure type safety and avoid errors caused by typos
## Passing props in the CLI
-When rendering (for example using the `npm run build` script defined in `package.json`), you can override some or all default props by passing a CLI flag. It must be valid JSON, pay attention to quote escaping. Using this technique, no type safety can be guaranteed.
+When rendering (for example using the `npm run build` script defined in `package.json`), you can override some or all default props by passing a CLI flag. It must be either valid JSON or a path to a file that contains valid JSON. Using this technique, type safety cannot be guaranteed.
+
+**Using inline JSON**
```bash
-npx remotion render src/index.tsx HelloWorld helloworld.mp4 --props=defaultProps.json
+npx remotion render src/index.tsx HelloWorld helloworld.mp4 --props='{"propOne": "Hi", "propTwo": 10}'
```
-:::tip
-make sure `defaultProps.json` is in your root folder.
-:::
-
-```json
-//defaultProps.json
-{
- "propOne": "Hi",
- "propTwo": 10
-}
-```
-### Or for inline json
+**Using a file path:**
```bash
-npx remotion render src/index.tsx HelloWorld helloworld.mp4 --props='{"propOne": "Hi", "propTwo": 10}'
+npx remotion render src/index.tsx HelloWorld helloworld.mp4 --props=./path/to/props.json
```
[See also: CLI flags](/docs/cli)