π₯ Make videos programmatically with React
refine docs
Jonny Burgere8beb75d15df
diff --git a/packages/docs/docs/config.mdx b/packages/docs/docs/config.mdxindex d559f784a5..ab8a40f92e 100644--- a/packages/docs/docs/config.mdx+++ b/packages/docs/docs/config.mdx@@ -197,14 +197,19 @@ Choose one of the supported codecs: `h264` _(default)_, `h265`, `vp8`, `vp9`.- `h265` is the successor of H264, with smaller file sizes. Also known as HEVC. Poor browser compatibility.- `vp8` is the codec for WebM.- `vp9` is the next-generation codec for WebM. Lower file size, longer compression time.-- `mp3` will export audio only as an MP3 file.-- `wav` will export audio only as an WAV file.-- `aac` will export audio only as an AAC file.+- `prores` is a common codec if you want to import the output into another video editing program _(available from v2.1.6)_+- `mp3` will export audio only as an MP3 file _(available from v2.0)_+- `wav` will export audio only as an WAV file _(available from v2.0)_+- `aac` will export audio only as an AAC file _(available from v2.0)_```tsxConfig.Output.setCodec('h265');```+The [command line flag](/docs/cli#--codec) `--codec` will take precedence over this option.++**See also**: [Encoding guide](/docs/encoding)+### setProResProfile()_Available from Version 2.1.6._diff --git a/packages/docs/docs/encoding.md b/packages/docs/docs/encoding.mdindex 4d2f7f19de..a764bf624c 100644--- a/packages/docs/docs/encoding.md+++ b/packages/docs/docs/encoding.md@@ -7,7 +7,7 @@ Backed by [FFMPEG](https://ffmpeg.org/), Remotion allows you to configure a vari## Choosing a codec-Remotion supports 4 codecs: `h264` (_default_), `h265`, `vp8` and `vp9`. The first two produce an output that will be an MP4, the last two are for generating WebM videos. While H264 will work well in most cases, sometimes it's worth going for a different codec. Refer to the table below to see the advantages and drawbacks of each codec.+Remotion supports 5 codecs: `h264` (_default_), `h265`, `vp8`, `vp9`, `prores`. The first two produce an output that will be an MP4, the last two are for generating WebM videos. While H264 will work well in most cases, sometimes it's worth going for a different codec. Refer to the table below to see the advantages and drawbacks of each codec.<table><tr>@@ -45,6 +45,13 @@ Remotion supports 4 codecs: `h264` (_default_), `h265`, `vp8` and `vp9`. The fir<td style={{color: 'red', fontWeight: 'bold'}}>Very slow</td><td><a href="https://caniuse.com/webm" style={{color: 'darkorange'}}>Okay</a></td></tr>+ <tr>+ <td>ProRes</td>+ <td>.mov</td>+ <td style={{color: 'red'}}>Large</td>+ <td style={{color: 'green'}}>Fast</td>+ <td style={{color: 'red', fontWeight: 'bold'}}>None</td>+ </tr></table>:::info@@ -55,6 +62,8 @@ You can set a config using [`Config.Output.setCodec()` in the config file](/docs## Controlling quality using the CRF setting+_Applies only to `h264`, `h265`, `vp8` and `vp9`._+No matter which codec you end up using, there's always a tradeoff between file size and video quality. You can control it by setting the so called CRF (Constant Rate Factor). The **lower the number, the better the quality**, the higher the number, the smaller the file is β of course at the cost of quality.Be cautious: Every codec has it's own range of acceptable values and a different default. So while `23` will look very good on a H264 video, it will look terrible on a WebM video. Use this chart to determine which CRF value to use:@@ -141,6 +150,79 @@ VP9You can [set a CRF in the config file using the `Config.Output.setCrf()`](config#setcrf) function or use the [`--crf`](/docs/cli#flags) command line flag.+## Controlling quality using ProRes profile++_Applies only to `prores` codec_.++For ProRes, there is no CRF option, but there are profiles which you can set using the [`--prores-profile` flag](/docs/cli#--prores-profile) or the [`setProResProfile`](/docs/config#setproresprofile) config file option.++<table>+ <tr>+ <th>+ Value+ </th>+ <th>+ FFMPEG setting+ </th>+ <th>+ Bitrate+ </th>+ <th>+ <a href="/docs/transparent-videos">Supports alpha channel</a>+ </th>+ </tr>+ <tr>+ <td>+ <code>"proxy"</code>+ </td>+ <td>0</td>+ <td>~45Mbps</td>+ <td>No</td>+ </tr>+ <tr>+ <td>+ <code>"light"</code>+ </td>+ <td>1</td>+ <td>~102Mbps</td>+ <td>No</td>+ </tr>+ <tr>+ <td>+ <code>"standard"</code> (default)+ </td>+ <td>2</td>+ <td>~147Mbps</td>+ <td>No</td>+ </tr>+ <tr>+ <td>+ <code>"hq"</code>+ </td>+ <td>3</td>+ <td>~220Mbps</td>+ <td>No</td>+ </tr>+ <tr>+ <td>+ <code>"4444"</code>+ </td>+ <td>4</td>+ <td>~330Mbps</td>+ <td>Yes</td>+ </tr>+ <tr>+ <td>+ <code>"4444-xq"</code>+ </td>+ <td>4</td>+ <td>~500Mbps</td>+ <td>Yes</td>+ </tr>+</table>++Higher bitrate means higher quality and higher file size.+## Audio-only exportYou can pass `mp3`, `wav` or `aac` as a codec. If you do it, an audio file will be output in the corresponding format. Quality settings will be ignored.