🎥 Make videos programmatically with React
more docs
Jonny Burger3c953cbd38c5
diff --git a/packages/docs/docs/cli/benchmark.mdx b/packages/docs/docs/cli/benchmark.mdxindex a466b9790b..9996e40155 100644--- a/packages/docs/docs/cli/benchmark.mdx+++ b/packages/docs/docs/cli/benchmark.mdx@@ -113,7 +113,7 @@ Inherited from [`npx remotion render`](/docs/cli/render#--disable-web-security)_optional_-<Options id="disable-headless" />+<Options id="disable-headless" />### `--enable-multiprocess-on-linux`<AvailableFrom v="4.0.42"/>@@ -209,14 +209,18 @@ _optional_Inherited from [`npx remotion render`](/docs/cli/render#--audio-bitrate)-### `--offthreadvideo-cache-size-in-bytes`<AvailableFrom v="4.0.23"/>--<Options id="offthreadvideo-cache-size-in-bytes" />-### `--color-space`<AvailableFrom v="4.0.28"/><Options cli id="color-space" />+### `--hardware-acceleration`<AvailableFrom v="4.0.228" />++<Options cli id="hardware-acceleration" />++### `--offthreadvideo-cache-size-in-bytes`<AvailableFrom v="4.0.23"/>++<Options id="offthreadvideo-cache-size-in-bytes" />+### `--binaries-directory`<AvailableFrom v="4.0.120" /><Options cli id="binaries-directory" />diff --git a/packages/docs/docs/cli/render.mdx b/packages/docs/docs/cli/render.mdxindex 22f5b7ddb6..dcf64893db 100644--- a/packages/docs/docs/cli/render.mdx+++ b/packages/docs/docs/cli/render.mdx@@ -145,6 +145,14 @@ For example only every second frame, every third frame and so on. Only works for<Options id="number-of-gif-loops" />+### `--color-space`<AvailableFrom v="4.0.28"/>++<Options cli id="color-space" />++### `--hardware-acceleration`<AvailableFrom v="4.0.228" />++<Options cli id="hardware-acceleration" />+### `--bundle-cache`<AvailableFrom v="2.0.0" />[Enable or disable Webpack caching](/docs/config#setcachingenabled). This flag is enabled by default, use `--bundle-cache=false` to disable caching.@@ -193,10 +201,6 @@ Lets you set a custom user agent that the headless Chrome browser assumes.<Options cli id="offthreadvideo-cache-size-in-bytes" />-### `--color-space`<AvailableFrom v="4.0.28"/>--<Options cli id="color-space" />-### `--enable-multiprocess-on-linux`<AvailableFrom v="4.0.42"/><Options cli id="enable-multiprocess-on-linux" />diff --git a/packages/docs/docs/config.mdx b/packages/docs/docs/config.mdxindex b77f0debc9..7f70177aa2 100644--- a/packages/docs/docs/config.mdx+++ b/packages/docs/docs/config.mdx@@ -650,6 +650,8 @@ The [command line flag](/docs/cli/render#--crf) `--crf` will take precedence ove## `setVideoBitrate()`<AvailableFrom v="3.2.32" /><Options id="video-bitrate" />+<br />+<br />```ts twoslash title="remotion.config.ts"import {Config} from '@remotion/cli/config';@@ -662,6 +664,8 @@ The [command line flag](/docs/cli/render#--video-bitrate) `--video-bitrate` will## `setEncodingBufferSize()`<AvailableFrom v="4.0.78" /><Options id="buffer-size" />+<br />+<br />```ts twoslash title="remotion.config.ts"import {Config} from '@remotion/cli/config';@@ -674,6 +678,8 @@ The [command line flag](/docs/cli/render#--buffer-size) `--buffer-size` will tak## `setEncodingMaxRate()`<AvailableFrom v="4.0.78" /><Options id="max-rate" />+<br />+<br />```ts twoslash title="remotion.config.ts"import {Config} from '@remotion/cli/config';@@ -686,6 +692,8 @@ The [command line flag](/docs/cli/render#--max-rate) `--max-rate` will take prec## `setAudioBitrate()`<AvailableFrom v="3.2.32" /><Options id="audio-bitrate" />+<br />+<br />```ts twoslash title="remotion.config.ts"import {Config} from '@remotion/cli/config';@@ -755,9 +763,11 @@ import {Config} from '@remotion/cli/config';Config.setBufferStateDelayInMilliseconds(0);```-## `setBinariesDirectory?`<AvailableFrom v="4.0.120" />+## `setBinariesDirectory()`<AvailableFrom v="4.0.120" /><Options id="binaries-directory" />+<br />+<br />```ts twoslash title="remotion.config.ts"import {Config} from '@remotion/cli/config';@@ -765,9 +775,11 @@ import {Config} from '@remotion/cli/config';Config.setBinariesDirectory('/path/to/custom/directory');```-## `setPreferLosslessAudio?`<AvailableFrom v="4.0.123" />+## `setPreferLosslessAudio()`<AvailableFrom v="4.0.123" /><Options id="prefer-lossless" />+<br />+<br />```ts twoslash title="remotion.config.ts"import {Config} from '@remotion/cli/config';@@ -775,7 +787,19 @@ import {Config} from '@remotion/cli/config';Config.setPreferLosslessAudio(true);```-## overrideFfmpegCommand()<AvailableFrom v="3.2.22" />+## `setHardwareAcceleration()`<AvailableFrom v="4.0.228" />++<Options id="hardware-acceleration" />+<br />+<br />++```ts twoslash title="remotion.config.ts"+import {Config} from '@remotion/cli/config';+// ---cut---+Config.setHardwareAcceleration('if-possible');+```++## `overrideFfmpegCommand()`<AvailableFrom v="3.2.22" />Modifies the FFmpeg command that Remotion uses under the hood. It works reducer-style, meaning that you pass a function that takes a command as an argument and returns a new command.diff --git a/packages/renderer/src/options/hardware-acceleration.tsx b/packages/renderer/src/options/hardware-acceleration.tsxindex 841bae441b..d27cf293ab 100644--- a/packages/renderer/src/options/hardware-acceleration.tsx+++ b/packages/renderer/src/options/hardware-acceleration.tsx@@ -20,13 +20,16 @@ export const getHardwareAcceleration = () => {export const hardwareAccelerationOption = {name: 'Hardware Acceleration',cliFlag,- description: () => (- <>- Encode using a hardware-accelerated encoder if available. If set to- "force" and no hardware-accelerated encoder is available, then the render- will fail.- </>- ),+ description: () =>+ `+ One of+ ${new Intl.ListFormat('en', {type: 'disjunction'}).format(+ hardwareAccelerationOptions.map((a) => JSON.stringify(a)),+ )}+ . Default "disable". Encode using a hardware-accelerated encoder if+ available. If set to "force" and no hardware-accelerated encoder is+ available, then the render will fail.+ `,ssrName: 'hardwareAcceleration',docLink: 'https://www.remotion.dev/docs/encoding',type: 'disable' as HardwareAccelerationOption,