Skip to content

Commit

Permalink
Merge pull request #3907 from remotion-dev/improve-props-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger committed May 22, 2024
2 parents c440e82 + 8b5b744 commit 0f2251a
Show file tree
Hide file tree
Showing 20 changed files with 138 additions and 59 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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" />
Expand Down Expand Up @@ -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" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ crumb: "Cloud Run API"
---

<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>

Kicks off a media rendering process on Remotion Cloud Run.
Expand Down Expand Up @@ -83,7 +90,10 @@ See also [`renderMedia() -> codec`](/docs/renderer/render-media#codec).

_optional_

React props that are passed to your composition. You define the shape of the props that the component accepts.
[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
Must be a JSON object.
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).

### `privacy?`

Expand Down Expand Up @@ -128,21 +138,21 @@ See [`renderMedia() -> jpegQuality`](/docs/renderer/render-media#jpegquality).

_optional_

<Options id="audio-bitrate"/>
<Options id="audio-bitrate" />

### `videoBitrate?`

_optional_

<Options id="video-bitrate"/>
<Options id="video-bitrate" />

### `bufferSize?`<AvailableFrom v="4.0.78" />

<Options id="buffer-size"/>
<Options id="buffer-size" />

### `maxRate?`<AvailableFrom v="4.0.78" />

<Options id="max-rate"/>
<Options id="max-rate" />

### `proResProfile?`

Expand Down Expand Up @@ -224,7 +234,7 @@ Results in invalid SSL certificates, such as self-signed ones, being ignored.

#### `gl`

<Options id="gl" />
<Options id="gl" />

### `muted?`

Expand All @@ -246,7 +256,7 @@ Overrides default composition height.

### `logLevel?`

<Options id="log"/>
<Options id="log" />

### `outName?`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ The `id` of the [composition](/docs/composition) you want to render.

_optional_

React props that are passed to your composition. You define the shape of the props that the component accepts.
[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
Must be a JSON object.
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).

### `privacy?`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ A URL pointing to a Remotion project. Use [`deploySite()`](/docs/lambda/deploysi

### `inputProps`

React props that can be obtained using [`getInputProps()`](/docs/get-input-props) from inside the React component while evaluating the list of compositions.
[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
Must be a JSON object.
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).

### `envVariables?`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ The `id` of the [composition](/docs/composition) you want to render.

_optional since v3.2.27_

React props that are passed to your composition. You define the shape of the props that the component accepts.
[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
Must be a JSON object.
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).

### `codec`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ The `id` of the [composition](/docs/composition) you want to render..

### `inputProps`

React props that are passed to your composition. You define the shape of the props that the component accepts.
[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
Must be a JSON object.
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).

### `privacy`

Expand Down Expand Up @@ -207,7 +210,7 @@ Either:

### `deleteAfter?`<AvailableFrom v="4.0.32"/>

<Options id="delete-after"/>
<Options id="delete-after" />

### `chromiumOptions?`

Expand All @@ -229,7 +232,7 @@ Results in invalid SSL certificates, such as self-signed ones, being ignored.

#### `gl`

<Options id="gl" />
<Options id="gl" />

#### `userAgent`<AvailableFrom v="3.3.83"/>

Expand All @@ -245,7 +248,7 @@ Specify a specific bucket name to be used. [This is not recommended](/docs/lambd

_optional_

<Options id="log"/>
<Options id="log" />

Logs can be read through the CloudWatch URL that this function returns.

Expand Down
5 changes: 4 additions & 1 deletion packages/docs/docs/renderer/get-compositions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ An object containing one or more of the following options:

_optional in &lt;5.0, required from 5.0_

Define custom props that can be retrieved using [`getInputProps()`](/docs/get-input-props) at runtime. Useful for [setting a dynamic duration or dimensions](/docs/dynamic-metadata) for your video.
[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
Must be a JSON object.
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).

#### `puppeteerInstance?`<AvailableFrom v="3.0.0" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: renderFrames()
crumb: "@remotion/renderer"
---

import {AngleChangelog} from '../../components/AngleChangelog';
import { AngleChangelog } from "../../components/AngleChangelog";

_Part of the `@remotion/renderer` package._

Expand Down Expand Up @@ -72,7 +72,10 @@ A `string` specifying the directory (absolute path) to which frames should be sa

### `inputProps`

[Custom props which will be passed to the component.](/docs/parameterized-rendering) Useful for rendering videos with dynamic content. Can be an object of any shape.
[Input Props to pass to the selected composition of your video.](/docs/parameterized-rendering#passing-input-props-in-the-cli).
Must be a JSON object.
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).

### `serveUrl`

Expand Down Expand Up @@ -124,7 +127,7 @@ Disables audio output. This option may only be set in combination with a video c

### `logLevel?`<AvailableFrom v="4.0.0"/>

<Options id="log"/>
<Options id="log" />

### `puppeteerInstance?`

Expand Down Expand Up @@ -270,7 +273,7 @@ Results in invalid SSL certificates, such as self-signed ones, being ignored.

#### `headless?`

<Options id="disable-headless" />
<Options id="disable-headless" />

#### `gl?`

Expand Down
Loading

0 comments on commit 0f2251a

Please sign in to comment.