Skip to content

🎥 Make videos programmatically with React

update config and documentation

Alex Fernandez5400dbd34f69
diff --git a/packages/cli/src/config/index.ts b/packages/cli/src/config/index.ts
index 80cbeb9814..6ce3cc1ef0 100644
--- a/packages/cli/src/config/index.ts
+++ b/packages/cli/src/config/index.ts
@@ -100,6 +100,48 @@ import {
import {getWidth, overrideWidth} from './width';
export const Config: ConfigType = {
+ setMaxTimelineTracks,
+ setKeyboardShortcutsEnabled,
+ setNumberOfSharedAudioTags,
+ setWebpackPollingInMilliseconds,
+ setShouldOpenBrowser,
+ overrideWebpackConfig,
+ setCachingEnabled: setWebpackCaching,
+ setPort,
+ setPublicDir,
+ setEntryPoint,
+ setLevel: setLogLevel,
+ setBrowserExecutable,
+ setTimeoutInMilliseconds: setPuppeteerTimeout,
+ setChromiumDisableWebSecurity,
+ setChromiumIgnoreCertificateErrors,
+ setChromiumHeadlessMode,
+ setChromiumOpenGlRenderer,
+ setDotEnvLocation,
+ setConcurrency,
+ setQuality,
+ setImageFormat,
+ setFrameRange,
+ setFfmpegExecutable,
+ setFfprobeExecutable,
+ setScale,
+ setEveryNthFrame,
+ setNumberOfGifLoops,
+ setMuted,
+ setEnforceAudioTrack,
+ setOutputLocation,
+ setOverwriteOutput,
+ setPixelFormat,
+ setOutputFormat,
+ setCodec,
+ setCrf,
+ setImageSequence,
+ setProResProfile,
+ setAudioBitrate,
+ setVideoBitrate,
+ overrideHeight,
+ overrideWidth,
+ overrideFfmpegCommand: setFfmpegOverrideFunction,
Preview: {
setMaxTimelineTracks,
setKeyboardShortcutsEnabled,
@@ -154,7 +196,6 @@ export const Config: ConfigType = {
overrideWidth,
overrideFfmpegCommand: setFfmpegOverrideFunction,
},
- setChromiumOpenGlRenderer,
} as ConfigType;
export type {Concurrency, WebpackConfiguration, WebpackOverrideFn};
diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts
index 2b7617dd5b..e2a242f70a 100644
--- a/packages/core/src/config.ts
+++ b/packages/core/src/config.ts
@@ -27,7 +27,293 @@ type CodecOrUndefined =
| undefined;
type Crf = number | undefined;
-export type ConfigType = {
+type FlatConfig = {
+ /**
+ * Preview
+ */
+ /**
+ * Change the maximum amount of tracks that are shown in the timeline.
+ * @param maxTracks The maximum amount of timeline tracks that you would like to show.
+ * @default 15
+ */
+ readonly setMaxTimelineTracks: (maxTracks: number) => void;
+ /**
+ * Enable Keyboard shortcuts in the Remotion Preview.
+ * @param enabled Boolean whether to enable the keyboard shortcuts
+ * @default true
+ */
+ readonly setKeyboardShortcutsEnabled: (enableShortcuts: boolean) => void;
+ /**
+ * Set number of shared audio tags. https://www.remotion.dev/docs/player/autoplay#use-the-numberofsharedaudiotags-property
+ * @param numberOfAudioTags
+ * @default 0
+ */
+ readonly setNumberOfSharedAudioTags: (numberOfAudioTags: number) => void;
+ /**
+ * Enable Webpack polling instead of file system listeners for hot reloading in the preview.
+ * This is useful if you are using a remote directory or a virtual machine.
+ * @param interval
+ * @default null
+ */
+ readonly setWebpackPollingInMilliseconds: (interval: number | null) => void;
+ /**
+ * Whether Remotion should open a browser when starting the Preview.
+ * @param should
+ * @default true
+ */
+ readonly setShouldOpenBrowser: (should: boolean) => void;
+
+ /**
+ * Bundling
+ */
+
+ /**
+ * Specify the entry point so you don't have to specify it in the
+ * CLI command
+ */
+ readonly setEntryPoint: (src: string) => void;
+ /**
+ * Pass in a function which takes the current Webpack config
+ * and return a modified Webpack configuration.
+ * Docs: http://remotion.dev/docs/webpack
+ */
+ readonly overrideWebpackConfig: (fn: WebpackOverrideFn) => void;
+ /**
+ * Whether Webpack bundles should be cached to make
+ * subsequent renders faster. Default: true
+ */
+ readonly setCachingEnabled: (flag: boolean) => void;
+ /**
+ * Define on which port Remotion should start it's HTTP servers during preview and rendering.
+ * By default, Remotion will try to find a free port.
+ * If you specify a port, but it's not available, Remotion will throw an error.
+ */
+ readonly setPort: (port: number | undefined) => void;
+ /**
+ * Define the location of the public/ directory.
+ * By default it is a folder named "public" inside the current working directory.
+ * You can set an absolute path or a relative path that will be resolved from the closest package.json location.
+ */
+ readonly setPublicDir: (publicDir: string | null) => void;
+
+ /**
+ * Log
+ */
+
+ /**
+ * Set the log level.
+ * Acceptable values: 'error' | 'warning' | 'info' | 'verbose'
+ * Default value: 'info'
+ *
+ * Set this to 'verbose' to get browser logs and other IO.
+ */
+ readonly setLevel: (
+ newLogLevel: 'verbose' | 'info' | 'warn' | 'error'
+ ) => void;
+
+ /**
+ * Puppeter
+ */
+ /**
+ * Specify executable path for the browser to use.
+ * Default: null, which will make Remotion find or download a version of said browser.
+ */
+ readonly setBrowserExecutable: (
+ newBrowserExecutablePath: BrowserExecutable
+ ) => void;
+ /**
+ * Set how many milliseconds a frame may take to render before it times out.
+ * Default: `30000`
+ */
+ readonly setTimeoutInMilliseconds: (newPuppeteerTimeout: number) => void;
+ /**
+ * Setting deciding whether to disable CORS and other Chrome security features.
+ * Default: false
+ */
+ readonly setChromiumDisableWebSecurity: (should: boolean) => void;
+ /**
+ * Setting whether to ignore any invalid SSL certificates, such as self-signed ones.
+ * Default: false
+ */
+ readonly setChromiumIgnoreCertificateErrors: (should: boolean) => void;
+ /**
+ * If false, will open an actual browser during rendering to observe progress.
+ * Default: true
+ */
+ readonly setChromiumHeadlessMode: (should: boolean) => void;
+ /**
+ * Set the OpenGL rendering backend for Chrome. Possible values: 'egl', 'angle', 'swiftshader' and 'swangle'.
+ * Default: 'swangle' in Lambda, null elsewhere.
+ */
+ readonly setChromiumOpenGlRenderer: (
+ renderer: 'swangle' | 'angle' | 'egl' | 'swiftshader'
+ ) => void;
+
+ /**
+ * Rendering
+ */
+ /**
+ * Set a custom location for a .env file.
+ * Default: `.env`
+ */
+ readonly setDotEnvLocation: (file: string) => void;
+ /**
+ * Sets how many Puppeteer instances will work on rendering your video in parallel.
+ * Default: `null`, meaning half of the threads available on your CPU.
+ */
+ readonly setConcurrency: (newConcurrency: Concurrency) => void;
+ /**
+ * Set the JPEG quality for the frames.
+ * Must be between 0 and 100.
+ * Must be between 0 and 100.
+ * Default: 80
+ */
+ readonly setQuality: (q: number | undefined) => void;
+ /** Decide in which image format to render. Can be either 'jpeg' or 'png'.
+ * PNG is slower, but supports transparency.
+ */
+ readonly setImageFormat: (format: 'png' | 'jpeg' | 'none') => void;
+ /**
+ * Render only a subset of a video.
+ * Pass in a tuple [20, 30] to only render frames 20-30 into a video.
+ * Pass in a single number `20` to only render a single frame as an image.
+ * The frame count starts at 0.
+ */
+ readonly setFrameRange: (newFrameRange: FrameRange | null) => void;
+ /**
+ * Specify local ffmpeg executable.
+ * Default: null, which will use ffmpeg available in PATH.
+ */
+ readonly setFfmpegExecutable: (ffmpegPath: FfmpegExecutable) => void;
+ /**
+ * Specify local ffprobe executable.
+ * Default: null, which will use ffprobe available in PATH.
+ */
+ readonly setFfprobeExecutable: (ffprobePath: FfmpegExecutable) => void;
+ /**
+ * Scales the output dimensions by a factor.
+ * Default: 1.
+ */
+ readonly setScale: (newScale: number) => void;
+ /**
+ * Specify which frames should be picked for rendering a GIF
+ * Default: 1, which means every frame
+ * https://remotion.dev/docs/render-as-gif
+ */
+ readonly setEveryNthFrame: (frame: number) => void;
+ /**
+ * Specify the number of Loop a GIF should have.
+ * Default: null (means GIF will loop infinite)
+ */
+ readonly setNumberOfGifLoops: (newLoop: Loop) => void;
+ /**
+ * Disable audio output.
+ * Default: false
+ */
+ readonly setMuted: (muted: boolean) => void;
+ /**
+ * Don't render an audio track if it would be silent.
+ * Default: true
+ */
+ readonly setEnforceAudioTrack: (enforceAudioTrack: boolean) => void;
+
+ /**
+ * Output
+ */
+
+ /**
+ * Set the output file location string. Default: `out/{composition}.{codec}`
+ */
+ readonly setOutputLocation: (newOutputLocation: string) => void;
+ /**
+ * If the video file already exists, should Remotion overwrite
+ * the output? Default: true
+ */
+ readonly setOverwriteOutput: (newOverwrite: boolean) => void;
+ /**
+ * 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.
+ */
+ readonly setPixelFormat: (
+ format:
+ | 'yuv420p'
+ | 'yuva420p'
+ | 'yuv422p'
+ | 'yuv444p'
+ | 'yuv420p10le'
+ | 'yuv422p10le'
+ | 'yuv444p10le'
+ | 'yuva444p10le'
+ ) => void;
+ /**
+ * @deprecated Use setCodec() and setImageSequence() instead.
+ * Specify what kind of output you, either `mp4` or `png-sequence`.
+ */
+ readonly setOutputFormat: (newLegacyFormat: 'mp4' | 'png-sequence') => void;
+ /**
+ * Specify the codec for stitching the frames into a video.
+ * Can be `h264` (default), `h265`, `vp8` or `vp9`
+ */
+ readonly setCodec: (newCodec: CodecOrUndefined) => void;
+ /**
+ * 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.
+ */
+ readonly setCrf: (newCrf: Crf) => void;
+ /**
+ * Set to true if don't want a video but an image sequence as the output.
+ */
+ readonly setImageSequence: (newImageSequence: boolean) => void;
+ /**
+ * Overrides the height of a composition
+ */
+ readonly overrideHeight: (newHeight: number) => void;
+ /**
+ * Overrides the width of a composition
+ */
+ readonly overrideWidth: (newWidth: number) => void;
+ /**
+ * Set the ProRes profile.
+ * This method is only valid if the codec has been set to 'prores'.
+ * Possible values: 4444-xq, 4444, hq, standard, light, proxy. Default: 'hq'
+ * See https://avpres.net/FFmpeg/im_ProRes.html for meaning of possible values.
+ */
+ readonly setProResProfile: (
+ profile:
+ | '4444-xq'
+ | '4444'
+ | 'hq'
+ | 'standard'
+ | 'light'
+ | 'proxy'
+ | undefined
+ ) => void;
+ /**
+ * Override the arguments that Remotion passes to FFMPEG.
+ * Consult https://remotion.dev/docs/renderer/render-media#ffmpegoverride before using this feature.
+ */
+ readonly overrideFfmpegCommand: (
+ command: (info: {
+ type: 'pre-stitcher' | 'stitcher';
+ args: string[];
+ }) => string[]
+ ) => void;
+
+ /**
+ * 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.
+ * Mutually exclusive with setCrf().
+ */
+ readonly setVideoBitrate: (bitrate: string | null) => void;
+};
+
+type ObjectConfig = {
readonly Preview: {
/**
* Change the maximum amount of tracks that are shown in the timeline.
@@ -297,14 +583,10 @@ export type ConfigType = {
*/
readonly setVideoBitrate: (bitrate: string | null) => void;
};
- /**
- * Set the OpenGL rendering backend for Chrome. Possible values: 'egl', 'angle', 'swiftshader' and 'swangle'.
- * Default: 'swangle' in Lambda, null elsewhere.
- */
- readonly setChromiumOpenGlRenderer: (
- renderer: 'swangle' | 'angle' | 'egl' | 'swiftshader'
- ) => void;
};
+
+export type ConfigType = ObjectConfig & FlatConfig;
+
export type {Concurrency, WebpackConfiguration, WebpackOverrideFn};
const conf = {} as unknown as ConfigType;
diff --git a/packages/docs/blog/2021-02-15-remotion-1-3.md b/packages/docs/blog/2021-02-15-remotion-1-3.md
index 61087893c8..8812bba24b 100644
--- a/packages/docs/blog/2021-02-15-remotion-1-3.md
+++ b/packages/docs/blog/2021-02-15-remotion-1-3.md
@@ -47,8 +47,8 @@ Many options which you could pass in via CLI flags, you can now also add by addi
import os from "os";
import { Config } from "remotion";
-Config.Rendering.setConcurrency(os.cpus().length);
-Config.Output.setOverwriteOutput(true);
+Config.setConcurrency(os.cpus().length);
+Config.setOverwriteOutput(true);
```
You can see all the [options on this page](https://www.remotion.dev/docs/config). The goal of making a config file in Typescript is to provide autocomplete, to easily highlight deprecated options and making it easier to show how to migrate in case the options change in the future.
diff --git a/packages/docs/blog/2021-07-09-remotion-2-2.md b/packages/docs/blog/2021-07-09-remotion-2-2.md
index ee82c68b0b..f91aaa5101 100644
--- a/packages/docs/blog/2021-07-09-remotion-2-2.md
+++ b/packages/docs/blog/2021-07-09-remotion-2-2.md
@@ -157,7 +157,7 @@ Finally, the [homepage of Remotion](https://remotion.dev) got a makeover! We hop
- Added documentation on how to use TailwindCSS [`69b079e`](https://github.com/remotion-dev/remotion/commit/69b079e)
- Fixed documentation about how to use SASS/SCSS [`e92c917`](https://github.com/remotion-dev/remotion/commit/e92c917)
- If you are using a plain JS entry file, you can also use a remotion.config.js config file [#475](https://github.com/remotion-dev/remotion/pull/475)
-- You can customize how many timeline tracks should be shown at most using `Config.Preview.setMaxTimelineTracks()` [#439](https://github.com/remotion-dev/remotion/pull/439)
+- You can customize how many timeline tracks should be shown at most using `Config.setMaxTimelineTracks()` [#439](https://github.com/remotion-dev/remotion/pull/439)
- Fixed a bug where environment variables would not be immediately accessible [#432](https://github.com/remotion-dev/remotion/pull/432)
- Input props flag can now also be passed for preview [#430](https://github.com/remotion-dev/remotion/pull/430)
- Better input validation of the most common functions
diff --git a/packages/docs/docs/3-0-migration.md b/packages/docs/docs/3-0-migration.md
index c2a6a4c83a..e3397374fb 100644
--- a/packages/docs/docs/3-0-migration.md
+++ b/packages/docs/docs/3-0-migration.md
@@ -208,7 +208,7 @@ To align the name with `renderStill()`, `renderFrames()` and `renderMedia()`, `b
### `overrideWebpackConfig()`: Config file option is removed
-The import `overrideWebpackConfig` was deprecated and now removed. Use `Config.Bundling.overrideWebpackConfig()` instead.
+The import `overrideWebpackConfig` was deprecated and now removed. Use `Config.overrideWebpackConfig()` instead.
**Upgrade path**: Change import in `remotion.config.ts`and use `overrideWebpackConfig()`.
@@ -219,5 +219,5 @@ The import `overrideWebpackConfig` was deprecated and now removed. Use `Config.B
```tsx title="Now"
import { Config } from "remotion";
-Config.Bundling.overrideWebpackConfig();
+Config.overrideWebpackConfig();
```
diff --git a/packages/docs/docs/chromium-flags.md b/packages/docs/docs/chromium-flags.md
index db7399241a..a9959259d6 100644
--- a/packages/docs/docs/chromium-flags.md
+++ b/packages/docs/docs/chromium-flags.md
@@ -34,7 +34,7 @@ import { Config } from "remotion";
// ---cut---
-Config.Puppeteer.setChromiumDisableWebSecurity(true);
+Config.setChromiumDisableWebSecurity(true);
```
## `--ignore-certificate-errors`
@@ -58,7 +58,7 @@ import { Config } from "remotion";
// ---cut---
-Config.Puppeteer.setChromiumIgnoreCertificateErrors(true);
+Config.setChromiumIgnoreCertificateErrors(true);
```
## `--disable-headless`
@@ -82,7 +82,7 @@ import { Config } from "remotion";
// ---cut---
-Config.Puppeteer.setChromiumHeadlessMode(false);
+Config.setChromiumHeadlessMode(false);
```
## `--gl`
@@ -116,7 +116,7 @@ import { Config } from "remotion";
// ---cut---
-Config.Puppeteer.setChromiumOpenGlRenderer("swiftshader");
+Config.setChromiumOpenGlRenderer("swiftshader");
```
Alternatively, you can set the configuration directly from the `Config` object.
diff --git a/packages/docs/docs/cli/compositions.md b/packages/docs/docs/cli/compositions.md
index b562eb1f88..33e75ae2c5 100644
--- a/packages/docs/docs/cli/compositions.md
+++ b/packages/docs/docs/cli/compositions.md
@@ -15,7 +15,7 @@ npx remotion compositions <entry-file>
If `entry-file` is not passed, Remotion will try to detect the entry file with the following priority order:
-1. Get the path from the Config (Can be set using `Config.Preview.setEntryPoint("<entry-point>")`).
+1. Get the path from the Config (Can be set using `Config.setEntryPoint("<entry-point>")`).
2. Look for some common paths i.e. `src/index.ts`, `src/index.tsx`, `src/index.js`, `remotion/index.js`.
3. Fail as entry point could not be determined.
diff --git a/packages/docs/docs/cli/preview.md b/packages/docs/docs/cli/preview.md
index b0e5006171..26e5dba4c3 100644
--- a/packages/docs/docs/cli/preview.md
+++ b/packages/docs/docs/cli/preview.md
@@ -13,7 +13,7 @@ npx remotion preview <entry-file>
If `entry-file` is not passed, Remotion will try to detect the entry file with the following priority order:
-1. Get the path from the Config (Can be set using `Config.Preview.setEntryPoint("<entry-point>")`).
+1. Get the path from the Config (Can be set using `Config.setEntryPoint("<entry-point>")`).
2. Look for some common paths i.e. `src/index.ts`, `src/index.tsx`, `src/index.js`, `remotion/index.js`.
3. Fail as entry point could not be determined.
diff --git a/packages/docs/docs/cli/render.md b/packages/docs/docs/cli/render.md
index 34a5e9ec27..c9c0319ced 100644
--- a/packages/docs/docs/cli/render.md
+++ b/packages/docs/docs/cli/render.md
@@ -15,7 +15,7 @@ npx remotion render <entry-file> [<composition-id>] [<output-location>]
If `entry-file` is not passed, Remotion will try to detect the entry file with the following priority order:
-1. Get the path from the Config (Can be set using `Config.Preview.setEntryPoint("<entry-point>")`).
+1. Get the path from the Config (Can be set using `Config.setEntryPoint("<entry-point>")`).
2. Look for some common paths i.e. `src/index.ts`, `src/index.tsx` `src/index.js`, `remotion/index.ts`, `app/remotion/index.ts`.
3. Fail as entry point could not be determined.
diff --git a/packages/docs/docs/config.md b/packages/docs/docs/config.md
index a4a4e9c3bd..c9efaa4202 100644
--- a/packages/docs/docs/config.md
+++ b/packages/docs/docs/config.md
@@ -18,9 +18,9 @@ You can control several behaviors of Remotion here.
```ts twoslash
import { Config } from "remotion";
-Config.Rendering.setConcurrency(8);
-Config.Output.setPixelFormat("yuv444p");
-Config.Output.setCodec("h265");
+Config.setConcurrency(8);
+Config.setPixelFormat("yuv444p");
+Config.setCodec("h265");
```
## Bundling
@@ -34,7 +34,7 @@ Allows you to insert your custom Webpack config. [See the page about custom Webp
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Bundling.overrideWebpackConfig((currentConfiguration) => {
+Config.overrideWebpackConfig((currentConfiguration) => {
// Return a new Webpack configuration
return {
...currentConfiguration,
@@ -52,7 +52,7 @@ Enable or disable webpack caching. Default is `true` which will make the Webpack
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Bundling.setCachingEnabled(false);
+Config.setCachingEnabled(false);
```
The [command line flag](/docs/cli/render#--bundle-cache) `--bundle-cache` will take precedence over this option.
@@ -71,7 +71,7 @@ During rendering, a HTTP server is also started in the background to serve the W
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Bundling.setPort(3003);
+Config.setPort(3003);
```
The [command line flag](/docs/cli/render#--port) `--port` will take precedence over this option.
@@ -87,7 +87,7 @@ You can either set an absolute path, or a relative path that will be resolved fr
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Bundling.setPublicDir("./publico");
+Config.setPublicDir("./publico");
```
The [command line flag](/docs/cli/render#--public-dir) `--public-dir` will take precedence over this option.
@@ -101,7 +101,7 @@ Sets the Remotion [entry point](/docs/terminology#entry-point), you don't have t
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Bundling.setEntryPoint("./src/index.ts");
+Config.setEntryPoint("./src/index.ts");
```
If you pass an entry point as a CLI argument, it will take precedence.
@@ -123,7 +123,7 @@ Acceptable values:
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Log.setLevel("verbose");
+Config.setLevel("verbose");
```
The [command line flag](/docs/cli/render#--log) `--log` will take precedence over this option.
@@ -139,7 +139,7 @@ Set how many tracks are being displayed in the timeline at most. This does not a
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Preview.setMaxTimelineTracks(20);
+Config.setMaxTimelineTracks(20);
```
### setKeyboardShortcutsEnabled()
@@ -151,7 +151,7 @@ Whether the Preview should react to keyboard shortcuts. Default `true`.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Preview.setKeyboardShortcutsEnabled(false);
+Config.setKeyboardShortcutsEnabled(false);
```
The [command line flag](/docs/cli/preview#--disable-keyboard-shortcuts) `--disable-keyboard-shortcuts` will take precedence over this option.
@@ -166,7 +166,7 @@ This is useful if you are inside a virtual machine or have a remote file system.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Preview.setWebpackPollingInMilliseconds(1000);
+Config.setWebpackPollingInMilliseconds(1000);
```
The [command line flag](/docs/cli/preview#--webpack-poll) `--webpack-poll` will take precedence over this option.
@@ -181,7 +181,7 @@ How many shared audio tags should be mounted. Shared audio tags can help prevent
import { Config } from "remotion";
// ---cut---
-Config.Preview.setNumberOfSharedAudioTags(5);
+Config.setNumberOfSharedAudioTags(5);
```
### setShouldOpenBrowser()
@@ -194,7 +194,7 @@ Whether Remotion should open a browser when starting the Preview. Default `true`
import { Config } from "remotion";
// ---cut---
-Config.Preview.setShouldOpenBrowser(false);
+Config.setShouldOpenBrowser(false);
```
## Puppeteer
@@ -208,7 +208,7 @@ Set a custom Chrome or Chromium executable path. By default Remotion will try to
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Puppeteer.setBrowserExecutable("/usr/bin/google-chrome-stable");
+Config.setBrowserExecutable("/usr/bin/google-chrome-stable");
```
The [command line flag](/docs/cli/render#--browser-executable) `--browser-executable` will take precedence over this option.
@@ -222,7 +222,7 @@ Define how long a single frame may take to resolve all [`delayRender()`](/docs/d
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Puppeteer.setTimeoutInMilliseconds(60000);
+Config.setTimeoutInMilliseconds(60000);
```
The [command line flag](/docs/cli/render#--timeout) `--timeout` will take precedence over this option.
@@ -238,7 +238,7 @@ import { Config } from "remotion";
// ---cut---
-Config.Puppeteer.setChromiumDisableWebSecurity(true);
+Config.setChromiumDisableWebSecurity(true);
```
The [command line flag](/docs/cli/render#--disable-web-security) `--disable-web-security` will take precedence over this option.
@@ -254,7 +254,7 @@ import { Config } from "remotion";
// ---cut---
-Config.Puppeteer.setChromiumIgnoreCertificateErrors(true);
+Config.setChromiumIgnoreCertificateErrors(true);
```
The [command line flag](/docs/cli/render#--ignore-certificate-errors) `--ignore-certificate-errors` will take precedence over this option.
@@ -270,7 +270,7 @@ import { Config } from "remotion";
// ---cut---
-Config.Puppeteer.setChromiumHeadlessMode(false);
+Config.setChromiumHeadlessMode(false);
```
The [command line flag](/docs/cli/render#--disable-headless) `--disable-headless` will take precedence over this option.
@@ -285,7 +285,7 @@ Default: `null`, meaning **half of the threads** available on your CPU.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setConcurrency(8);
+Config.setConcurrency(8);
```
The [command line flag](/docs/cli/render#--concurrency) `--concurrency` will take precedence over this option.
@@ -307,7 +307,7 @@ Determines which in which image format to render the frames. Either:
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setImageFormat("png");
+Config.setImageFormat("png");
```
The [command line flag](/docs/cli/render#--image-format) `--image-format` will take precedence over this option.
@@ -321,7 +321,7 @@ _Available from Version 2.6.7._
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setScale(2);
+Config.setScale(2);
```
The [command line flag](/docs/cli/render#--scale) `--scale` will take precedence over this option.
@@ -335,7 +335,7 @@ Disables audio output. Default `false`.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setMuted(true);
+Config.setMuted(true);
```
The [command line flag](/docs/cli/render#--muted) `--muted` will take precedence over this option.
@@ -349,7 +349,7 @@ Render a silent audio track if there would be none otherwise. Default `false`.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setEnforceAudioTrack(true);
+Config.setEnforceAudioTrack(true);
```
The [command line flag](/docs/cli/render#--enforce-audio-track) `--enforce-audio-track` will take precedence over this option.
@@ -363,7 +363,7 @@ Pass a number to render a still frame or a tuple to render a subset of a video.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setFrameRange(90); // To render only the 91st frame
+Config.setFrameRange(90); // To render only the 91st frame
```
or
@@ -371,7 +371,7 @@ or
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setFrameRange([0, 20]); // Render a video only containing the first 21 frames
+Config.setFrameRange([0, 20]); // Render a video only containing the first 21 frames
```
The [command line flag](/docs/cli/render#--frames) `--frames` will take precedence over this option.
@@ -383,7 +383,7 @@ The JPEG quality of each frame. Must be a number between 0 and 100. Will not wor
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setQuality(90);
+Config.setQuality(90);
```
The [command line flag](/docs/cli/render#--quality) `--quality` will take precedence over this option.
@@ -395,7 +395,7 @@ Set a custom location for a [`.env`](https://www.npmjs.com/package/dotenv) file.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setDotEnvLocation(".my-env");
+Config.setDotEnvLocation(".my-env");
```
The [command line flag](/docs/cli/render#--env-file) `--env-file` will take precedence over this option.
@@ -407,7 +407,7 @@ Allows you to use a custom FFMPEG binary. Must be an absolute path. By default,
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setFfmpegExecutable("/path/to/custom/ffmpeg");
+Config.setFfmpegExecutable("/path/to/custom/ffmpeg");
```
The [command line flag](/docs/cli/render#--ffmpeg-executable) `--ffmpeg-executable` will take precedence over this option.
@@ -419,7 +419,7 @@ Allows you to use a custom `ffprobe` binary. Must be an absolute path. By defaul
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setFfprobeExecutable("/path/to/custom/ffprobe");
+Config.setFfprobeExecutable("/path/to/custom/ffprobe");
```
The [command line flag](/docs/cli/render#--ffprobe-executable) `--ffprobe-executable` will take precedence over this option.
@@ -433,7 +433,7 @@ For example, if the `fps` is 30, and `everyNthFrame` is 2, the FPS of the GIF is
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setEveryNthFrame(2);
+Config.setEveryNthFrame(2);
```
The [command line flag](/docs/cli/render#--every-nth-frame) `--every-nth-frame` will take precedence over this option.
@@ -445,7 +445,7 @@ This option may only be set when rendering GIFs. [If it is set, it will limit th
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Rendering.setNumberOfGifLoops(2);
+Config.setNumberOfGifLoops(2);
```
The [command line flag](/docs/cli/render#--number-of-gif-loops) `--number-of-gif-loops` will take precedence over this option.
@@ -461,7 +461,7 @@ Set the output location of the video or still, relative to the current working d
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Output.setOutputLocation("out/video.mp4");
+Config.setOutputLocation("out/video.mp4");
```
If you pass another argument to the render command, it will take precedence: `npx remotion render src/index.ts HelloWorld out/video.mp4`.
@@ -473,7 +473,7 @@ Set this to `false` to prevent overwriting Remotion outputs when they already ex
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Output.setOverwriteOutput(false);
+Config.setOverwriteOutput(false);
```
:::info
@@ -488,7 +488,7 @@ Default value: `yuv420p`
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Output.setPixelFormat("yuv420p");
+Config.setPixelFormat("yuv420p");
```
The [command line flag](/docs/cli/render#--pixel-format) `--pixel-format` will take precedence over this option.
@@ -512,7 +512,7 @@ Choose one of the supported codecs: `h264` _(default)_, `h265`, `vp8`, `vp9`.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Output.setCodec("h265");
+Config.setCodec("h265");
```
The [command line flag](/docs/cli/render#--codec) `--codec` will take precedence over this option.
@@ -531,7 +531,7 @@ Default: `hq`
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Output.setProResProfile("4444");
+Config.setProResProfile("4444");
```
The [command line flag](/docs/cli/render#--prores-profile) `--prores-profile` will take precedence over this option.
@@ -547,7 +547,7 @@ Set to true if you want to output an image sequence instead of a video.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Output.setImageSequence(true);
+Config.setImageSequence(true);
```
The [command line flag](/docs/cli/render#--sequence) `--sequence` will take precedence over this option.
@@ -561,7 +561,7 @@ Overrides the height of the rendered video.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Output.overrideHeight(600);
+Config.overrideHeight(600);
```
The [command line flag](/docs/cli/render#--height) `--height` will take precedence over this option.
@@ -576,7 +576,7 @@ Overrides the width of the rendered video.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Output.overrideWidth(900);
+Config.overrideWidth(900);
```
The [command line flag](/docs/cli/render#--width) `--width` will take precedence over this option
@@ -590,7 +590,7 @@ Either `'mp4'` or `'png-sequence'`.
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Output.setOutputFormat("mp4");
+Config.setOutputFormat("mp4");
```
The [command line flags](/docs/cli) `--sequence` and `--codec` will take precedence over this option.
@@ -619,7 +619,7 @@ Choose the highest CRF value that still provides an acceptable quality. If the o
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Output.setCrf(16);
+Config.setCrf(16);
```
The [command line flag](/docs/cli/render#--crf) `--crf` will take precedence over this option.
@@ -633,7 +633,7 @@ Modifies the FFMPEG command that Remotion uses under the hood. It works reducer-
```tsx twoslash
import { Config } from "remotion";
// ---cut---
-Config.Output.overrideFfmpegCommand(({ args }) => {
+Config.overrideFfmpegCommand(({ args }) => {
return [...args, "-vf", "eq=brightness=0:saturation=1"];
});
```
diff --git a/packages/docs/docs/encoding.md b/packages/docs/docs/encoding.md
index b3c4ecc57e..5b15dbd3ff 100644
--- a/packages/docs/docs/encoding.md
+++ b/packages/docs/docs/encoding.md
@@ -60,7 +60,7 @@ Remotion supports 5 video codecs: `h264` (_default_), `h265`, `vp8`, `vp9` and `
Click on a browser compatibility link to see exactly which browsers are supported on caniuse.com.
:::
-You can set a config using [`Config.Output.setCodec()` in the config file](/docs/config#setcodec) or the [`--codec`](/docs/cli) CLI flag.
+You can set a config using [`Config.setCodec()` in the config file](/docs/config#setcodec) or the [`--codec`](/docs/cli) CLI flag.
## Controlling quality using the CRF setting
@@ -150,7 +150,7 @@ VP9
</tr>
</table>
-You can [set a CRF in the config file using the `Config.Output.setCrf()`](/docs/config#setcrf) function or use the [`--crf`](/docs/cli#flags) command line flag.
+You can [set a CRF in the config file using the `Config.setCrf()`](/docs/config#setcrf) function or use the [`--crf`](/docs/cli#flags) command line flag.
## Controlling quality using ProRes profile
diff --git a/packages/docs/docs/legacy-babel-loader.md b/packages/docs/docs/legacy-babel-loader.md
index 1996854ca2..843abe0910 100644
--- a/packages/docs/docs/legacy-babel-loader.md
+++ b/packages/docs/docs/legacy-babel-loader.md
@@ -55,7 +55,7 @@ import { Config } from "remotion";
// ---cut---
import { replaceLoadersWithBabel } from "@remotion/babel-loader";
-Config.Bundling.overrideWebpackConfig((currentConfiguration) => {
+Config.overrideWebpackConfig((currentConfiguration) => {
return replaceLoadersWithBabel(currentConfiguration);
});
```
diff --git a/packages/docs/docs/miscellaneous/ts-aliases.md b/packages/docs/docs/miscellaneous/ts-aliases.md
index fe7a6f5c9a..571934af4e 100644
--- a/packages/docs/docs/miscellaneous/ts-aliases.md
+++ b/packages/docs/docs/miscellaneous/ts-aliases.md
@@ -38,7 +38,7 @@ you can add the aliases to Webpack, however you need to add each of them manuall
import path from "path";
import { Config } from "remotion";
-Config.Bundling.overrideWebpackConfig((config) => {
+Config.overrideWebpackConfig((config) => {
return {
...config,
resolve: {
diff --git a/packages/docs/docs/overlay.md b/packages/docs/docs/overlay.md
index 1dff58f6a9..5ab7303160 100644
--- a/packages/docs/docs/overlay.md
+++ b/packages/docs/docs/overlay.md
@@ -15,10 +15,10 @@ If you want to export a Remotion video to use it as an overlay or transition in
```tsx twoslash title="remotion.config.ts"
import { Config } from "remotion";
-Config.Rendering.setImageFormat("png");
-Config.Output.setPixelFormat("yuva444p10le");
-Config.Output.setCodec("prores");
-Config.Output.setProResProfile("4444");
+Config.setImageFormat("png");
+Config.setPixelFormat("yuva444p10le");
+Config.setCodec("prores");
+Config.setProResProfile("4444");
```
and trigger the render with
diff --git a/packages/docs/docs/overwriting-webpack-config.md b/packages/docs/docs/overwriting-webpack-config.md
index d01f7cace1..8ef7a6fab7 100644
--- a/packages/docs/docs/overwriting-webpack-config.md
+++ b/packages/docs/docs/overwriting-webpack-config.md
@@ -19,7 +19,7 @@ In your `remotion.config.ts` file, you can call `Config.Bundler.overrideWebpackC
```ts twoslash title="remotion.config.ts"
import { Config } from "remotion";
-Config.Bundling.overrideWebpackConfig((currentConfiguration) => {
+Config.overrideWebpackConfig((currentConfiguration) => {
return {
...currentConfiguration,
module: {
@@ -61,7 +61,7 @@ export const webpackOverride: WebpackOverrideFn = (c) => c;
import { Config } from "remotion";
import { webpackOverride } from "./src/webpack-override";
-Config.Bundling.overrideWebpackConfig(webpackOverride);
+Config.overrideWebpackConfig(webpackOverride);
```
With `bundle`:
@@ -194,7 +194,7 @@ export const enableMdx: WebpackOverrideFn = (c) => c;
import { Config } from "remotion";
import { enableMdx } from "./src/enable-mdx";
-Config.Bundling.overrideWebpackConfig(enableMdx);
+Config.overrideWebpackConfig(enableMdx);
```
4. Add it to your [Node.JS API calls as well if necessary](#when-using-bundle-and-deploysite).
@@ -281,7 +281,7 @@ export const enableSass: WebpackOverrideFn = (c) => c;
import { Config } from "remotion";
import { enableSass } from "./src/enable-sass";
-Config.Bundling.overrideWebpackConfig(enableSass);
+Config.overrideWebpackConfig(enableSass);
```
4. Add it to your [Node.JS API calls as well if necessary](#when-using-bundle-and-deploysite).
@@ -359,7 +359,7 @@ export const enableGlsl: WebpackOverrideFn = (c) => c;
import { Config } from "remotion";
import { enableGlsl } from "./src/enable-glsl";
-Config.Bundling.overrideWebpackConfig(enableGlsl);
+Config.overrideWebpackConfig(enableGlsl);
```
3. Add the following to your [entry point](/docs/terminology#entry-point) (e.g. `src/index.ts`):
@@ -383,7 +383,7 @@ There are two WebAssembly modes: asynchronous and synchronous. We recommend test
```ts twoslash title="remotion.config.ts - synchronous"
import { Config } from "remotion";
-Config.Bundling.overrideWebpackConfig((conf) => {
+Config.overrideWebpackConfig((conf) => {
return {
...conf,
experiments: {
@@ -400,7 +400,7 @@ Since Webpack does not allow synchronous WebAssembly code in the main chunk, you
```ts twoslash title="remotion.config.ts - asynchronous"
import { Config } from "remotion";
-Config.Bundling.overrideWebpackConfig((conf) => {
+Config.overrideWebpackConfig((conf) => {
return {
...conf,
experiments: {
diff --git a/packages/docs/docs/scaling.md b/packages/docs/docs/scaling.md
index a805c4d79a..6ee92626cb 100644
--- a/packages/docs/docs/scaling.md
+++ b/packages/docs/docs/scaling.md
@@ -24,7 +24,7 @@ Remotion can support this higher resolution by setting the [`deviceScaleFactor`]
```ts twoslash
import { Config } from "remotion";
// ---cut---
- Config.Rendering.setScale(2);
+ Config.setScale(2);
```
## Allowed values
diff --git a/packages/docs/docs/skia/enable-skia.md b/packages/docs/docs/skia/enable-skia.md
index 980dcd7b6e..b7ea944136 100644
--- a/packages/docs/docs/skia/enable-skia.md
+++ b/packages/docs/docs/skia/enable-skia.md
@@ -10,7 +10,7 @@ A function that modifies the default Webpack configuration to make the necessary
import { Config } from "remotion";
import { enableSkia } from "@remotion/skia/enable";
-Config.Bundling.overrideWebpackConfig((currentConfiguration) => {
+Config.overrideWebpackConfig((currentConfiguration) => {
return enableSkia(currentConfiguration);
});
```
@@ -21,7 +21,7 @@ If you want to make other configuration changes, you can do so by doing them red
import { Config } from "remotion";
import { enableSkia } from "@remotion/skia/enable";
-Config.Bundling.overrideWebpackConfig((currentConfiguration) => {
+Config.overrideWebpackConfig((currentConfiguration) => {
const newConfig = enableSkia(currentConfiguration);
return {
diff --git a/packages/docs/docs/skia/skia.md b/packages/docs/docs/skia/skia.md
index ce27d2b738..128203eaf7 100644
--- a/packages/docs/docs/skia/skia.md
+++ b/packages/docs/docs/skia/skia.md
@@ -66,7 +66,7 @@ Make sure no package version number has a `^` character in front of it as it can
import { Config } from "remotion";
import { enableSkia } from "@remotion/skia/enable";
-Config.Bundling.overrideWebpackConfig((currentConfiguration) => {
+Config.overrideWebpackConfig((currentConfiguration) => {
return enableSkia(currentConfiguration);
});
```
diff --git a/packages/docs/docs/tailwind-2.md b/packages/docs/docs/tailwind-2.md
index d572bce1d9..e55b890c24 100644
--- a/packages/docs/docs/tailwind-2.md
+++ b/packages/docs/docs/tailwind-2.md
@@ -51,7 +51,7 @@ yarn add postcss-loader postcss postcss-preset-env tailwindcss@2 autoprefixer
```ts twoslash
import { Config } from "remotion";
// ---cut---
-Config.Bundling.overrideWebpackConfig((currentConfiguration) => {
+Config.overrideWebpackConfig((currentConfiguration) => {
return {
...currentConfiguration,
module: {
diff --git a/packages/docs/docs/tailwind.md b/packages/docs/docs/tailwind.md
index cef1018ad8..4319f791b4 100644
--- a/packages/docs/docs/tailwind.md
+++ b/packages/docs/docs/tailwind.md
@@ -140,7 +140,7 @@ export const enableTailwind: WebpackOverrideFn = (c) => c;
import { Config } from "remotion";
import { enableTailwind } from "./src/enable-tailwind";
-Config.Bundling.overrideWebpackConfig(enableTailwind);
+Config.overrideWebpackConfig(enableTailwind);
```
4. If you use the [`bundle()` or `deploySite()` Node.JS API, add the Webpack override to it as well](/docs/webpack#when-using-bundle-and-deploysite).
diff --git a/packages/docs/docs/terminology.md b/packages/docs/docs/terminology.md
index 03534ed6c5..92605ea1ae 100644
--- a/packages/docs/docs/terminology.md
+++ b/packages/docs/docs/terminology.md
@@ -53,7 +53,7 @@ The entry point is the file where the Remotion CLI and Node.JS APIs will look fo
- The entry point can be passed to the render command, for example: `npx remotion render src/index.ts`.
- The entry point should call [`registerRoot()`](/docs/register-root).
- If you render a video using [`npx remotion render`](/docs/cli/render), the entry point is printed in grey.
-- You can customize the entry point in the config file using [`Config.Bundling.setEntryPoint()`](/docs/config#setentrypoint).
+- You can customize the entry point in the config file using [`Config.setEntryPoint()`](/docs/config#setentrypoint).
In the [Remotion Player](#remotion-player), there is no concept of an entry point. You directly pass a React component and metadata to the [`<Player>`](/docs/player/player).
diff --git a/packages/docs/docs/three.md b/packages/docs/docs/three.md
index d1523528ee..5f4a07aca5 100644
--- a/packages/docs/docs/three.md
+++ b/packages/docs/docs/three.md
@@ -74,7 +74,7 @@ Three.JS does not render with the default OpenGL renderer - we recommend to set
```ts twoslash
import { Config } from "remotion";
-Config.Puppeteer.setChromiumOpenGlRenderer("angle");
+Config.setChromiumOpenGlRenderer("angle");
```
Alternatively, you can set the configuration directly from the `Config` object.
diff --git a/packages/docs/docs/timeout.md b/packages/docs/docs/timeout.md
index 0abfd204d5..f90d5a84ec 100644
--- a/packages/docs/docs/timeout.md
+++ b/packages/docs/docs/timeout.md
@@ -68,7 +68,7 @@ You can increase the default timeout from v2.6.3 on:
- Using the [`--timeout`](/docs/cli/render#--timeout) CLI flag
- Using the `timeoutInMilliseconds` option in [`renderStill()`](/docs/renderer/render-still#timeoutinmilliseconds), [`renderFrames()`](/docs/renderer/render-frames#timeoutinmilliseconds), [`getCompositions()`](/docs/renderer/get-compositions#timeoutinmilliseconds), [`renderMedia()`](/docs/renderer/render-media#timeoutinmilliseconds), [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda#timeoutinmilliseconds) and [`renderStillOnLambda()`](/docs/lambda/renderstillonlambda#timeoutinmilliseconds)
-- Using the [`Config.Puppeteer.setTimeoutInMilliseconds()`](/docs/config#settimeoutinmilliseconds) option in the config file
+- Using the [`Config.setTimeoutInMilliseconds()`](/docs/config#settimeoutinmilliseconds) option in the config file
## Adding a label to help debugging
diff --git a/packages/docs/docs/transparent-videos.md b/packages/docs/docs/transparent-videos.md
index b172d4c398..e00d38d4f8 100644
--- a/packages/docs/docs/transparent-videos.md
+++ b/packages/docs/docs/transparent-videos.md
@@ -39,9 +39,9 @@ If you want to set these options and persist them, add this to your `remotion.co
```tsx twoslash
import { Config } from "remotion";
-Config.Rendering.setImageFormat("png");
-Config.Output.setPixelFormat("yuva420p");
-Config.Output.setCodec("vp8");
+Config.setImageFormat("png");
+Config.setPixelFormat("yuva420p");
+Config.setCodec("vp8");
```
You can also set the settings on the command line:
@@ -60,10 +60,10 @@ Supported since v2.1.7, you can set the codec to `prores` and choose a ProRes pr
```tsx twoslash
import { Config } from "remotion";
-Config.Rendering.setImageFormat("png");
-Config.Output.setPixelFormat("yuva444p10le");
-Config.Output.setCodec("prores");
-Config.Output.setProResProfile("4444");
+Config.setImageFormat("png");
+Config.setPixelFormat("yuva444p10le");
+Config.setCodec("prores");
+Config.setProResProfile("4444");
```
You can also set the settings on the command line:
diff --git a/packages/docs/docs/video.md b/packages/docs/docs/video.md
index fedb5ad979..27d611e6db 100644
--- a/packages/docs/docs/video.md
+++ b/packages/docs/docs/video.md
@@ -203,7 +203,7 @@ Remotion will download the whole video during render in order to mix its audio.
Pay attention to the codec of the video that you are importing. During the render process, Chrome needs to support playing the video that you are embedding. If Remotion cannot find a preinstalled version of Chrome, it will download a Chromium executable which does not support the playback of H264 (common codec for MP4 videos). To work around this problem, you have multiple options:
-- Tell Remotion which path for Chrome to use by using the command line flag `--browser-executable` or [configure](/docs/config#setbrowserexecutable) `Config.Puppeteer.setBrowserExecutable()` in a config file.
+- Tell Remotion which path for Chrome to use by using the command line flag `--browser-executable` or [configure](/docs/config#setbrowserexecutable) `Config.setBrowserExecutable()` in a config file.
- Convert your videos to WebM before embedding them.
Prior to Remotion 1.5, Remotion will always use an internal Puppeteer binary and MP4 videos are therefore not supported.
diff --git a/packages/docs/remotion.config.ts b/packages/docs/remotion.config.ts
index f49bf48d98..17af9d629b 100644
--- a/packages/docs/remotion.config.ts
+++ b/packages/docs/remotion.config.ts
@@ -1,4 +1,4 @@
import path from "path";
import { Config } from "remotion";
-Config.Bundling.setPublicDir(path.join(process.cwd(), "static"));
+Config.setPublicDir(path.join(process.cwd(), "static"));