🎥 Make videos programmatically with React
@remotion/docs: Document CRF incompatibility with hardware acceleration
copilot-swe-agent[bot]9943eb188793
diff --git a/packages/docs/docs/cli/render.mdx b/packages/docs/docs/cli/render.mdxindex 5042ee2bc2..04d6797b0c 100644--- a/packages/docs/docs/cli/render.mdx+++ b/packages/docs/docs/cli/render.mdx@@ -126,6 +126,10 @@ Sets the output file path, as an alternative to the `output-location` positional[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. This option cannot be set if `--video-bitrate` is set.+:::note+If you enable [hardware acceleration](/docs/hardware-acceleration), you cannot set a `crf`. Use the [`--video-bitrate`](#--video-bitrate) option instead.+:::+### `--browser-executable`<AvailableFrom v="1.5.0" />[Path to a Chrome executable](/docs/config#setbrowserexecutable). If not specified and Remotion cannot find one, it will download one during rendering.diff --git a/packages/docs/docs/config.mdx b/packages/docs/docs/config.mdxindex c867f3b8de..8aeb665895 100644--- a/packages/docs/docs/config.mdx+++ b/packages/docs/docs/config.mdx@@ -641,6 +641,10 @@ Config.setCrf(16);The [command line flag](/docs/cli/render#--crf) `--crf` will take precedence over this option.+:::note+If you enable [hardware acceleration](/docs/hardware-acceleration), you cannot set a `crf`. Use the [`setVideoBitrate()`](#setvideobitrate) option instead.+:::+## `setVideoBitrate()`<AvailableFrom v="3.2.32" /><Options id="video-bitrate" />diff --git a/packages/docs/docs/hardware-acceleration.mdx b/packages/docs/docs/hardware-acceleration.mdxindex b4d26842b7..6588f9362a 100644--- a/packages/docs/docs/hardware-acceleration.mdx+++ b/packages/docs/docs/hardware-acceleration.mdx@@ -79,13 +79,19 @@ Config.setHardwareAcceleration('if-possible');These options are not supported in Remotion Lambda and Cloud Run, because those cloud services do not support hardware acceleration.-## File size+## Controlling quality using `--video-bitrate`++:::note+If you enable hardware acceleration, you cannot set a `crf`.+:::Note that the file size is significantly larger by default when using hardware acceleration, likely because less compression is applied.We recommend that you use the `--video-bitrate` flag to control the file size.We find that `--video-bitrate=8M` achieves a similar file size than software encoding when exporting a H.264 Full HD video.+The [`crf` option](/docs/encoding#controlling-quality-using-the-crf-setting) is not compatible with hardware-accelerated encoders. Instead, use the [`--video-bitrate`](/docs/cli/render#--video-bitrate) flag to control the quality and file size of the output video.+## Tell if hardware acceleration is being used[Run the render with verbose logging.](/docs/troubleshooting/debug-failed-render)diff --git a/packages/docs/docs/quality.mdx b/packages/docs/docs/quality.mdxindex 418e014055..a28ab44b24 100644--- a/packages/docs/docs/quality.mdx+++ b/packages/docs/docs/quality.mdx@@ -13,6 +13,10 @@ This document explains a few factors and settings that can be used to control thThe main setting to control the quality of the video is the [Constant Rate Factor (CRF)](/docs/encoding/#controlling-quality-using-the-crf-setting).All ways to render a video in Remotion allow passing a CRF value. Allowed values depend on the codec.+:::note+If you enable [hardware acceleration](/docs/hardware-acceleration), you cannot set a `crf`. Use the [`--video-bitrate`](/docs/cli/render#--video-bitrate) option instead.+:::+## Resolution (Unsharp text)A somewhat surprising way to lose quality is the fact that many computers have a high-density display, but the dimensions of a video don't consider that.diff --git a/packages/docs/docs/renderer/render-media.mdx b/packages/docs/docs/renderer/render-media.mdxindex b675802dfa..60da4f280f 100644--- a/packages/docs/docs/renderer/render-media.mdx+++ b/packages/docs/docs/renderer/render-media.mdx@@ -137,6 +137,10 @@ _number | null - optional_The constant rate factor, controlling the quality. See: [Controlling quality using the CRF setting.](/docs/encoding/#controlling-quality-using-the-crf-setting)+:::note+If you enable [hardware acceleration](/docs/hardware-acceleration), you cannot set a `crf`. Use the [`videoBitrate`](#videobitrate) option instead.+:::+### `bufferSize?`<AvailableFrom v="4.0.78" /><Options id="buffer-size" />