Skip to content

🎥 Make videos programmatically with React

video bitrate

Jonny Burger69838c0d5bde
diff --git a/packages/cli-autocomplete/src/source.ts b/packages/cli-autocomplete/src/source.ts
index b762790ef4..bd8c79e2bd 100644
--- a/packages/cli-autocomplete/src/source.ts
+++ b/packages/cli-autocomplete/src/source.ts
@@ -104,7 +104,7 @@ const localRenderAndStillOptions: Fig.Option[] = [
},
{
name: "--ffmpeg-executable",
- description: "Custom path for FFMPEG executable",
+ description: "Custom path for FFmpeg executable",
args: {
template: "filepaths",
},
@@ -318,7 +318,7 @@ const renderOptions: Fig.Option[] = [
},
{
name: "--crf",
- description: "FFMPEG CRF value, controls quality, see docs for info",
+ description: "FFmpeg CRF value, controls quality, see docs for info",
exclusiveOn: ["--video-bitrate"],
},
{
diff --git a/packages/cli/src/config/index.ts b/packages/cli/src/config/index.ts
index 79137a1910..886d8194e0 100644
--- a/packages/cli/src/config/index.ts
+++ b/packages/cli/src/config/index.ts
@@ -343,7 +343,7 @@ declare global {
*/
readonly setOverwriteOutput: (newOverwrite: boolean) => void;
/**
- * Sets the pixel format in FFMPEG.
+ * Sets the pixel format in FFmpeg.
* See https://trac.ffmpeg.org/wiki/Chroma%20Subsampling for an explanation.
* You can override this using the `--pixel-format` Cli flag.
*/
@@ -364,7 +364,7 @@ declare global {
*/
readonly setCodec: (newCodec: CodecOrUndefined) => void;
/**
- * Set the Constant Rate Factor to pass to FFMPEG.
+ * Set the Constant Rate Factor to pass to FFmpeg.
* Lower values mean better quality, but be aware that the ranges of
* possible values greatly differs between codecs.
*/
@@ -413,7 +413,7 @@ declare global {
| undefined,
) => void;
/**
- * Override the arguments that Remotion passes to FFMPEG.
+ * Override the arguments that Remotion passes to FFmpeg.
* Consult https://remotion.dev/docs/renderer/render-media#ffmpegoverride before using this feature.
*/
readonly overrideFfmpegCommand: (
@@ -424,12 +424,12 @@ declare global {
) => void;
/**
- * Set a target audio bitrate to be passed to FFMPEG.
+ * Set a target audio bitrate to be passed to FFmpeg.
*/
readonly setAudioBitrate: (bitrate: string | null) => void;
/**
- * Set a target video bitrate to be passed to FFMPEG.
+ * Set a target video bitrate to be passed to FFmpeg.
* Mutually exclusive with setCrf().
*/
readonly setVideoBitrate: (bitrate: string | null) => void;
diff --git a/packages/docs/docs/cli/render.md b/packages/docs/docs/cli/render.md
index 36c0f90fd4..0865cb70f8 100644
--- a/packages/docs/docs/cli/render.md
+++ b/packages/docs/docs/cli/render.md
@@ -92,11 +92,7 @@ Sets the output file path, as an alternative to the `output-location` positional
### `--video-bitrate`<AvailableFrom v="3.2.32" />
-Specify the target bitrate for the generated video.
-The syntax for FFMPEGs `-b:v` parameter should be used.
-FFMPEG may encode the video in a way that will not result in the exact video bitrate specified.
-This option cannot be set if `--crf` is set.
-Example values: `512K` for 512 kbps, `1M` for 1 Mbps.
+<Options id="video-bitrate" />
### `--buffer-size`<AvailableFrom v="4.0.78" />
diff --git a/packages/docs/docs/cloudrun/cli/render.md b/packages/docs/docs/cloudrun/cli/render.md
index d80b8cda61..af78e9e251 100644
--- a/packages/docs/docs/cloudrun/cli/render.md
+++ b/packages/docs/docs/cloudrun/cli/render.md
@@ -114,11 +114,7 @@ Specify the name of the service which should be used to perform the render. This
### `--video-bitrate`
-Specify the target bitrate for the generated video.
-The syntax for FFMPEGs `-b:v` parameter should be used.
-FFMPEG may encode the video in a way that will not result in the exact video bitrate specified.
-This option cannot be set if `--crf` is set.
-Example values: `512K` for 512 kbps, `1M` for 1 Mbps.
+<Options id="video-bitrate" />
### `--prores-profile`
diff --git a/packages/docs/docs/config.md b/packages/docs/docs/config.md
index ad9613793f..e0239f4065 100644
--- a/packages/docs/docs/config.md
+++ b/packages/docs/docs/config.md
@@ -661,11 +661,7 @@ The [command line flag](/docs/cli/render#--crf) `--crf` will take precedence ove
## `setVideoBitrate()`<AvailableFrom v="3.2.32" />
-Specify the target bitrate for the generated video.
-The syntax for FFMPEGs `-b:v` parameter should be used.
-FFmpeg may encode the video in a way that will not result in the exact video bitrate specified.
-This option cannot be set if `--crf` is set.
-Example values: `512K` for 512 kbps, `1M` for 1 Mbps.
+<Options id="video-bitrate" />
```ts twoslash title="remotion.config.ts"
import { Config } from "@remotion/cli/config";
diff --git a/packages/docs/docs/enametoolong.md b/packages/docs/docs/enametoolong.md
index 86f0618ce2..154ffe0060 100644
--- a/packages/docs/docs/enametoolong.md
+++ b/packages/docs/docs/enametoolong.md
@@ -9,9 +9,9 @@ crumb: "Troubleshooting"
Command failed with ENAMETOOLONG: ffmpeg ...
```
-This error occurs if Remotion is used on Windows and too many audio layers are in the video so that an FFMPEG command gets generated that is longer than the maximum allowed Windows command length (8192 characters).
+This error occurs if Remotion is used on Windows and too many audio layers are in the video so that an FFmpeg command gets generated that is longer than the maximum allowed Windows command length (8192 characters).
-Unfortunately, FFMPEG does not have any other alternative way to specify a massive amount of inputs, so Remotion can not fix this issue. Here are some recommendations instead:
+Unfortunately, FFmpeg does not have any other alternative way to specify a massive amount of inputs, so Remotion can not fix this issue. Here are some recommendations instead:
## Mute videos that have no sound
@@ -23,4 +23,4 @@ macOS and Linux have a much longer maximum command length. Render the same video
## Render the video partially
-Render only a portion of a video using the [`--frames`](/docs/cli/render#--frames) property, and add portions together using an [FFMPEG concat command](https://stackoverflow.com/a/11175851)
+Render only a portion of a video using the [`--frames`](/docs/cli/render#--frames) property, and add portions together using an [FFmpeg concat command](https://stackoverflow.com/a/11175851)
diff --git a/packages/docs/docs/encoding.md b/packages/docs/docs/encoding.md
index 2802aae435..16afb63f46 100644
--- a/packages/docs/docs/encoding.md
+++ b/packages/docs/docs/encoding.md
@@ -5,7 +5,7 @@ title: Encoding Guide
crumb: "Codecs and more"
---
-Backed by [FFMPEG](https://ffmpeg.org/), Remotion allows you to configure a variety of encoding settings. The goal of this page is to help you navigate through the settings and to help you choose the right one.
+Backed by [FFmpeg](https://ffmpeg.org/), Remotion allows you to configure a variety of encoding settings. The goal of this page is to help you navigate through the settings and to help you choose the right one.
## Choosing a codec
@@ -164,7 +164,7 @@ For ProRes, there is no CRF option, but there are profiles which you can set usi
Value
</th>
<th>
- FFMPEG setting
+ FFmpeg setting
</th>
<th>
Bitrate
@@ -257,7 +257,7 @@ Specifying a file extension when rendering media will determine the default code
## What other settings do you need?
-Which of the dozens of options that FFMPEG supports would you like to see exposed in Remotion? Let us know by opening an [issue on our issue tracker!](https://github.com/remotion-dev/remotion/issues)
+Which of the dozens of options that FFmpeg supports would you like to see exposed in Remotion? Let us know by opening an [issue on our issue tracker!](https://github.com/remotion-dev/remotion/issues)
## See also
diff --git a/packages/docs/docs/lambda/cli/render.md b/packages/docs/docs/lambda/cli/render.md
index 4d8c3121e2..1125c0f8ce 100644
--- a/packages/docs/docs/lambda/cli/render.md
+++ b/packages/docs/docs/lambda/cli/render.md
@@ -139,11 +139,7 @@ Renamed to `jpegQuality` in `v4.0.0`.
### `--video-bitrate`<AvailableFrom v="3.2.32" />
-Specify the target bitrate for the generated video.
-The syntax for FFMPEGs `-b:v` parameter should be used.
-FFMPEG may encode the video in a way that will not result in the exact video bitrate specified.
-This option cannot be set if `--crf` is set.
-Example values: `512K` for 512 kbps, `1M` for 1 Mbps.
+<Options id="video-bitrate" />
### `--prores-profile`
diff --git a/packages/docs/docs/offthreadvideo.md b/packages/docs/docs/offthreadvideo.md
index 1962c1313d..49958989fa 100644
--- a/packages/docs/docs/offthreadvideo.md
+++ b/packages/docs/docs/offthreadvideo.md
@@ -7,7 +7,7 @@ crumb: "API"
_Available from Remotion 3.0.11_
-This component imports and displays a video, similar to [`<Video/>`](/docs/video), but during rendering, extracts the exact frame from the video and displays it in a [`<Img>`](/docs/img) tag. This extraction process happens outside the browser using FFMPEG.
+This component imports and displays a video, similar to [`<Video/>`](/docs/video), but during rendering, extracts the exact frame from the video and displays it in a [`<Img>`](/docs/img) tag. This extraction process happens outside the browser using FFmpeg.
This component was designed to combat limitations of the default `<Video>` element. See: [`<Video>` vs `<OffthreadVideo>`](/docs/video-vs-offthreadvideo).
diff --git a/packages/docs/docs/video-vs-offthreadvideo.md b/packages/docs/docs/video-vs-offthreadvideo.md
index f4157af637..5cc6465876 100644
--- a/packages/docs/docs/video-vs-offthreadvideo.md
+++ b/packages/docs/docs/video-vs-offthreadvideo.md
@@ -30,7 +30,7 @@ Is based on the native HTML5 `<video>` element and therefore behaves similar to
A more sophisticated way of embedding a video, which:
- renders a `<video>` tag during preview
-- displays the exact frame in an [`<Img>`](/docs/img) tag during rendering, that frame gets extracted using FFMPEG outside the browser
+- displays the exact frame in an [`<Img>`](/docs/img) tag during rendering, that frame gets extracted using FFmpeg outside the browser
**Pros**
diff --git a/packages/renderer/src/options/audio-bitrate.tsx b/packages/renderer/src/options/audio-bitrate.tsx
index 734752c8b2..5a98a3bf04 100644
--- a/packages/renderer/src/options/audio-bitrate.tsx
+++ b/packages/renderer/src/options/audio-bitrate.tsx
@@ -9,11 +9,11 @@ export const audioBitrateOption = {
cliFlag,
description: () => (
<>
- Specify the target bitrate for the generated video. The syntax for FFMPEGs
- <code>-b:a</code> parameter should be used. FFMPEG may encode the video in
- a way that will not result in the exact audio bitrate specified. Example
- values: <code>512K</code> for 512 kbps, <code>1M</code> for 1 Mbps.
- Default: <code>320k</code>
+ Specify the target bitrate for the generated video. The syntax for FFmpeg
+ {"'"}s <code>-b:a</code> parameter should be used. FFmpeg may encode the
+ video in a way that will not result in the exact audio bitrate specified.
+ Example values: <code>512K</code> for 512 kbps, <code>1M</code> for 1
+ Mbps. Default: <code>320k</code>
</>
),
ssrName: 'audioBitrate',
diff --git a/packages/renderer/src/options/video-bitrate.tsx b/packages/renderer/src/options/video-bitrate.tsx
index 34a0a65d8a..090dc06f4c 100644
--- a/packages/renderer/src/options/video-bitrate.tsx
+++ b/packages/renderer/src/options/video-bitrate.tsx
@@ -5,10 +5,11 @@ export const videoBitrate = {
cliFlag: 'video-bitrate',
description: () => (
<>
- Specify the target bitrate for the generated video. The syntax for FFMPEGs
- <code>-b:v</code> parameter should be used. FFMPEG may encode the video in
- a way that will not result in the exact video bitrate specified. Example
- values: <code>512K</code> for 512 kbps, <code>1M</code> for 1 Mbps.
+ Specify the target bitrate for the generated video. The syntax for FFmpeg
+ {"'"}s<code>-b:v</code> parameter should be used. FFmpeg may encode the
+ video in a way that will not result in the exact video bitrate specified.
+ Example values: <code>512K</code> for 512 kbps, <code>1M</code> for 1
+ Mbps.
</>
),
ssrName: 'videoBitrate',
diff --git a/packages/renderer/src/test/avoid-ffmpeg-stackoverflow.test.ts b/packages/renderer/src/test/avoid-ffmpeg-stackoverflow.test.ts
index feb1ce586d..ca9babe29c 100644
--- a/packages/renderer/src/test/avoid-ffmpeg-stackoverflow.test.ts
+++ b/packages/renderer/src/test/avoid-ffmpeg-stackoverflow.test.ts
@@ -1,7 +1,7 @@
import {expect, test} from 'vitest';
import {roundVolumeToAvoidStackOverflow} from '../assets/round-volume-to-avoid-stack-overflow';
-test('Should avoid having more than 98 possible volumes to avoid FFMPEG exception', () => {
+test('Should avoid having more than 98 possible volumes to avoid FFmpeg exception', () => {
const thousandsOfValues = new Array(10000)
.fill(true)
.map((_, i) => i / 9999)
diff --git a/packages/renderer/src/test/ffmpeg-merge-filter.test.ts b/packages/renderer/src/test/ffmpeg-merge-filter.test.ts
index c73cab86ee..70f2e63012 100644
--- a/packages/renderer/src/test/ffmpeg-merge-filter.test.ts
+++ b/packages/renderer/src/test/ffmpeg-merge-filter.test.ts
@@ -1,7 +1,7 @@
import {expect, test} from 'vitest';
import {createFfmpegMergeFilter} from '../create-ffmpeg-merge-filter';
-test('FFMPEG merge filters', () => {
+test('FFmpeg merge filters', () => {
const filter = createFfmpegMergeFilter({
inputs: [
{
diff --git a/packages/renderer/src/test/parse-ffmpeg-progress.test.ts b/packages/renderer/src/test/parse-ffmpeg-progress.test.ts
index 5eeb0373dd..d5a0dac58b 100644
--- a/packages/renderer/src/test/parse-ffmpeg-progress.test.ts
+++ b/packages/renderer/src/test/parse-ffmpeg-progress.test.ts
@@ -1,7 +1,7 @@
import {expect, test} from 'vitest';
import {parseFfmpegProgress} from '../parse-ffmpeg-progress';
-test('Should be able to parse FFMPEG progress', () => {
+test('Should be able to parse Ffmpeg progress', () => {
const result = parseFfmpegProgress('anything', 30);
expect(result).toBe(undefined);
expect(