Skip to content

🎥 Make videos programmatically with React

Merge branch 'main' into select-frames

Shankhadeep Deyf07f6593148d
diff --cc packages/docs/docs/cli.md
index 325f53ab19,733208f93f..093c75e82d
--- a/packages/docs/docs/cli.md
+++ b/packages/docs/docs/cli.md
@@@ -14,20 -14,19 +14,20 @@@ npx remotion render <entry-file> <compo
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.
- - `--concurrency`: [How many CPU threads to use.](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.](config#setpixelformat)
- - `--image-format`: [`jpeg` or `png` - JPEG is faster, but supports transparency.](config#setimageformat) The default image format is `jpeg` since v1.1. Flag available since v1.4.
+ - `--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.
- `--config`: Specify a location for the Remotion config file. Available in v1.2 and later.
-- `--quality`: [Value between 0 and 100 for JPEG rendering quality](/docs/config#setquality). Doesn't work when PNG frames are rendered. Available since v1.4.
-- `--overwrite`: [Write to output even if file already exists.](/docs/config#setoverwriteoutput)
-- `--sequence`: [Pass this flag if you want an image sequence as the output instead of a video.](/docs/config#setimagesequence) Available since v1.4.
-- `--codec`: [`h264` or `h265` or `png` or `vp8` or `vp9`](/docs/config#setoutputformat). If you don't supply `--codec`, it will use the H.264 encoder. Available since v1.4.
-- `--crf`: [To set Constant Rate Factor (CRF) of the output](/docs/config#setcrf). Minimum 0. Use this rate control mode if you want to keep the best quality and care less about the file size. Available since v1.4.
-- `--browser-executable`: [Path to a Chrome executable](/docs/config#setbrowserexecutable). If not specified and Remotion cannot find one, it will download one during rendering. Available since v1.5.
+- `--quality`: [Value between 0 and 100 for JPEG rendering quality](config#setquality). Doesn't work when PNG frames are rendered. Available since v1.4.
+- `--overwrite`: [Write to output even if file already exists.](config#setoverwriteoutput)
+- `--sequence`: [Pass this flag if you want an image sequence as the output instead of a video.](config#setimagesequence) Available since v1.4.
+- `--codec`: [`h264` or `h265` or `png` or `vp8` or `vp9`](config#setoutputformat). If you don't supply `--codec`, it will use the H.264 encoder. Available since v1.4.
+- `--crf`: [To set Constant Rate Factor (CRF) of the output](config#setcrf). Minimum 0. Use this rate control mode if you want to keep the best quality and care less about the file size. Available since v1.4.
+- `--browser-executable`: [Path to a Chrome executable](config#setbrowserexecutable). If not specified and Remotion cannot find one, it will download one during rendering. Available since v1.5.
+- `--range`: [To select frame range](config#setrange).`--range=1-10` (To select frame from 1 to 10) or <br/>`--range=50` (To select only 50th frame).
:::info
- If you don't feel like passing command line flags every time, consider creating a `remotion.config.ts` [config file](config).
+ If you don't feel like passing command line flags every time, consider creating a `remotion.config.ts` [config file](/docs/config).
:::
## Example command
diff --cc packages/docs/docs/config.md
index 91320e0055,eb8cbf9463..7b844f1999
--- a/packages/docs/docs/config.md
+++ b/packages/docs/docs/config.md
@@@ -66,21 -68,8 +68,21 @@@ Determines which in which image format
Config.Rendering.setImageFormat('png')
```
- The [command line flag](cli) `--image-format` will take precedence over this option.
+ The [command line flag](/docs/cli) `--image-format` will take precedence over this option.
+### setRange()
+
+To render a still frame or a range of frames. Which can be helpful to generate humbnails and stills.
+
+```tsx
+Config.Rendering.setRange(90); //to select only 90th frame
+```
+or
+
+```tsx
+Config.Rendering.setRange('10-20'); //To select frames from 10 to 20
+```
+
### setQuality()
The JPEG quality of each frame. Must be a number between 0 and 100. Will not work if you render PNG frames. [Default: 80](https://github.com/chromium/chromium/blob/99314be8152e688bafbbf9a615536bdbb289ea87/headless/lib/browser/protocol/headless_handler.cc#L32).