Skip to content

🎥 Make videos programmatically with React

Improve documentation for --props

Jonny Burgerc53044ee7e45
diff --git a/packages/docs/docs/cli/benchmark.md b/packages/docs/docs/cli/benchmark.mdx
similarity index 100%
rename from packages/docs/docs/cli/benchmark.md
rename to packages/docs/docs/cli/benchmark.mdx
diff --git a/packages/docs/docs/cli/compositions.md b/packages/docs/docs/cli/compositions.mdx
similarity index 85%
rename from packages/docs/docs/cli/compositions.md
rename to packages/docs/docs/cli/compositions.mdx
index 821d754386..e4612e2a5a 100644
--- a/packages/docs/docs/cli/compositions.md
+++ b/packages/docs/docs/cli/compositions.mdx
@@ -19,10 +19,13 @@ You may pass a [Serve URL](/docs/terminology/serve-url) or an [entry point](/doc
### `--props`
-[React Props that can be retrieved using `getInputProps()`.](/docs/get-input-props) Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
+Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+From the root component the props can be read using [`getInputProps()`](/docs/get-input-props).
+You may transform input props using [`calculateMetadata()`](/docs/calculate-metadata).
-:::info
-Inline JSON string isn't supported on Windows because it removes the `"` character, use a temporary file instead.
+:::note
+Inline JSON string isn't supported on Windows shells because it removes the `"` character, use a file name instead.
:::
### `--config`
diff --git a/packages/docs/docs/cli/render.md b/packages/docs/docs/cli/render.mdx
similarity index 92%
rename from packages/docs/docs/cli/render.md
rename to packages/docs/docs/cli/render.mdx
index 99bb920494..d2dbe9fae9 100644
--- a/packages/docs/docs/cli/render.md
+++ b/packages/docs/docs/cli/render.mdx
@@ -5,7 +5,7 @@ sidebar_label: render
crumb: CLI Reference
---
-import {AngleChangelog} from '../../components/AngleChangelog';
+import { AngleChangelog } from "../../components/AngleChangelog";
Render a video or audio based on the entry point, the composition ID and save it to the output location.
@@ -24,10 +24,13 @@ Besides choosing a video and output location with the command line arguments, th
### `--props`
-[React Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli) Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`). Can also be read using [`getInputProps()`](/docs/get-input-props).
+[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
+Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+From the root component the props can be read using [`getInputProps()`](/docs/get-input-props).
+You may transform input props using [`calculateMetadata()`](/docs/calculate-metadata).
-:::info
-Inline JSON string isn't supported on Windows because it removes the `"` character, use a temporary file instead.
+:::note
+Inline JSON string isn't supported on Windows shells because it removes the `"` character, use a file name instead.
:::
### `--height`<AvailableFrom v="3.2.40" />
@@ -96,11 +99,11 @@ Sets the output file path, as an alternative to the `output-location` positional
### `--buffer-size`<AvailableFrom v="4.0.78" />
-<Options id="buffer-size"/>
+<Options id="buffer-size" />
### `--max-rate`<AvailableFrom v="4.0.78" />
-<Options id="max-rate"/>
+<Options id="max-rate" />
### `--prores-profile`<AvailableFrom v="2.1.6" />
diff --git a/packages/docs/docs/cli/still.md b/packages/docs/docs/cli/still.mdx
similarity index 89%
rename from packages/docs/docs/cli/still.md
rename to packages/docs/docs/cli/still.mdx
index 8fe69114a7..8eb85ea270 100644
--- a/packages/docs/docs/cli/still.md
+++ b/packages/docs/docs/cli/still.mdx
@@ -24,10 +24,13 @@ If `composition-id` is also not passed, Remotion will let you select a compositi
### `--props`
-[React Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli) Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`). Can also be read using [`getInputProps()`](/docs/get-input-props).
+[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
+Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+From the root component the props can be read using [`getInputProps()`](/docs/get-input-props).
+You may transform input props using [`calculateMetadata()`](/docs/calculate-metadata).
-:::info
-Inline JSON string isn't supported on Windows because it removes the `"` character, use a temporary file instead.
+:::note
+Inline JSON string isn't supported on Windows shells because it removes the `"` character, use a file name instead.
:::
### `--image-format`
diff --git a/packages/docs/docs/cli/studio.md b/packages/docs/docs/cli/studio.mdx
similarity index 80%
rename from packages/docs/docs/cli/studio.md
rename to packages/docs/docs/cli/studio.mdx
index ba69bafeee..322dae3b9b 100644
--- a/packages/docs/docs/cli/studio.md
+++ b/packages/docs/docs/cli/studio.mdx
@@ -19,10 +19,15 @@ You may pass an [entry point](/docs/terminology/entry-point) as an argument, oth
### `--props`
-[React Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli) Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`). Can also be read using [`getInputProps()`](/docs/get-input-props).
+[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
+We don't recommend passing this flag when using the Studio - use [`defaultProps`](/docs/composition#defaultprops) instead.
-:::info
-Inline JSON string isn't supported on Windows because it removes the `"` character, use a temporary file instead.
+Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+From the root component the props can be read using [`getInputProps()`](/docs/get-input-props).
+You may transform input props using [`calculateMetadata()`](/docs/calculate-metadata).
+
+:::note
+Inline JSON string isn't supported on Windows shells because it removes the `"` character, use a file name instead.
:::
### `--config`<AvailableFrom v="1.2.0" />
diff --git a/packages/docs/docs/cloudrun/cli/render.md b/packages/docs/docs/cloudrun/cli/render.mdx
similarity index 87%
rename from packages/docs/docs/cloudrun/cli/render.md
rename to packages/docs/docs/cloudrun/cli/render.mdx
index 2847e7569f..808606e9b8 100644
--- a/packages/docs/docs/cloudrun/cli/render.md
+++ b/packages/docs/docs/cloudrun/cli/render.mdx
@@ -8,7 +8,14 @@ crumb: "Cloud Run CLI Reference"
---
<ExperimentalBadge>
-<p>Cloud Run is in <a href="/docs/cloudrun-alpha">Alpha</a>, which means APIs may change in any version and documentation is not yet finished. See the <a href="https://remotion.dev/changelog">changelog to stay up to date with breaking changes</a>.</p>
+ <p>
+ Cloud Run is in <a href="/docs/cloudrun-alpha">Alpha</a>, which means APIs
+ may change in any version and documentation is not yet finished. See the{" "}
+ <a href="https://remotion.dev/changelog">
+ changelog to stay up to date with breaking changes
+ </a>
+ .
+ </p>
</ExperimentalBadge>
Using the `npx remotion cloudrun render` command, you can render a video on GCP.
@@ -51,7 +58,14 @@ The [GCP region](/docs/cloudrun/region-selection) to select. For lowest latency,
### `--props`
-[React Props to pass to the root component of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli) Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
+Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+From the root component the props can be read using [`getInputProps()`](/docs/get-input-props).
+You may transform input props using [`calculateMetadata()`](/docs/calculate-metadata).
+
+:::note
+Inline JSON string isn't supported on Windows shells because it removes the `"` character, use a file name instead.
+:::
### `--privacy`
diff --git a/packages/docs/docs/cloudrun/cli/still.md b/packages/docs/docs/cloudrun/cli/still.mdx
similarity index 87%
rename from packages/docs/docs/cloudrun/cli/still.md
rename to packages/docs/docs/cloudrun/cli/still.mdx
index a5e9e64e1b..7a63263c4c 100644
--- a/packages/docs/docs/cloudrun/cli/still.md
+++ b/packages/docs/docs/cloudrun/cli/still.mdx
@@ -51,7 +51,14 @@ The [GCP region](/docs/cloudrun/region-selection) to select. For lowest latency,
### `--props`
-[React Props to pass to the root component of your still.](/docs/parameterized-rendering#passing-input-props-in-the-cli) Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
+Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+From the root component the props can be read using [`getInputProps()`](/docs/get-input-props).
+You may transform input props using [`calculateMetadata()`](/docs/calculate-metadata).
+
+:::note
+Inline JSON string isn't supported on Windows shells because it removes the `"` character, use a file name instead.
+:::
### `--privacy`
diff --git a/packages/docs/docs/lambda/cli/compositions.md b/packages/docs/docs/lambda/cli/compositions.mdx
similarity index 88%
rename from packages/docs/docs/lambda/cli/compositions.md
rename to packages/docs/docs/lambda/cli/compositions.mdx
index 7a094881f6..991a491069 100644
--- a/packages/docs/docs/lambda/cli/compositions.md
+++ b/packages/docs/docs/lambda/cli/compositions.mdx
@@ -51,10 +51,13 @@ You should use `npx remotion lambda compositions` if you cannot use [`npx remoti
### `--props`
-[React Props that can be retrieved using `getInputProps()`.](/docs/get-input-props) Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
+Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+From the root component the props can be read using [`getInputProps()`](/docs/get-input-props).
+You may transform input props using [`calculateMetadata()`](/docs/calculate-metadata).
-:::info
-Inline JSON string isn't supported on Windows because it removes the `"` character, use a temporary file instead.
+:::note
+Inline JSON string isn't supported on Windows shells because it removes the `"` character, use a file name instead.
:::
### `--config`
diff --git a/packages/docs/docs/lambda/cli/render.md b/packages/docs/docs/lambda/cli/render.mdx
similarity index 94%
rename from packages/docs/docs/lambda/cli/render.md
rename to packages/docs/docs/lambda/cli/render.mdx
index ff1ebb0bcd..7023a8a92c 100644
--- a/packages/docs/docs/lambda/cli/render.md
+++ b/packages/docs/docs/lambda/cli/render.mdx
@@ -80,7 +80,14 @@ The [AWS region](/docs/lambda/region-selection) to select. Both project and func
### `--props`
-[React Props to pass to the root component of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli) Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
+Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+From the root component the props can be read using [`getInputProps()`](/docs/get-input-props).
+You may transform input props using [`calculateMetadata()`](/docs/calculate-metadata).
+
+:::note
+Inline JSON string isn't supported on Windows shells because it removes the `"` character, use a file name instead.
+:::
### `--log`
diff --git a/packages/docs/docs/lambda/cli/still.md b/packages/docs/docs/lambda/cli/still.mdx
similarity index 85%
rename from packages/docs/docs/lambda/cli/still.md
rename to packages/docs/docs/lambda/cli/still.mdx
index bb0d9c1a96..7fd69306f8 100644
--- a/packages/docs/docs/lambda/cli/still.md
+++ b/packages/docs/docs/lambda/cli/still.mdx
@@ -61,7 +61,14 @@ The [AWS region](/docs/lambda/region-selection) to select. Both project and func
### `--props`
-[React Props to pass to the root component of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli) Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
+Must be a serialized JSON string (`--props='{"hello": "world"}'`) or a path to a JSON file (`./path/to/props.json`).
+From the root component the props can be read using [`getInputProps()`](/docs/get-input-props).
+You may transform input props using [`calculateMetadata()`](/docs/calculate-metadata).
+
+:::note
+Inline JSON string isn't supported on Windows shells because it removes the `"` character, use a file name instead.
+:::
### `--scale`