Skip to main content

Chromium flags

You can configure the Chromium or Google Chrome browser that Remotion launches for rendering.

Default flags can change

Remotion’s default Chrome flags, including enabled and disabled features, can change between patch versions. There is no guarantee that these defaults remain unchanged. Overrides apply to the defaults of the installed Remotion version.

Custom flagsv4.0.543​

Pass chromiumOptions.flags to add, replace, or remove individual flags:

render.ts
const browser = await openBrowser('chrome', { chromiumOptions: { gl: 'angle', flags: { 'disable-gpu-rasterization': true, 'disable-gpu-compositing': true, 'force-color-profile': 'display-p3', 'disable-background-networking': false, }, }, });

flags?​

Adds, replaces, or removes Chrome flags. Keys omit the leading --. true adds a bare flag, a string sets its value, and false removes it. Overrides take precedence over other Chromium options. The user-data-dir and remote-debugging-* flags are reserved. Defaults to {}. Remotion’s default Chrome flags and enabled or disabled features may change between patch versions. There is no guarantee that these defaults remain unchanged.

The default is {}. Flag names must be lowercase and omit the leading --. A string replaces the complete value of a flag, including comma-separated lists. Use features or blinkFeatures to override individual entries in feature lists. Values are passed as individual process arguments; do not add shell quotes around them.

features?​

Overrides individual Chrome features. true enables a feature and removes it from the disabled list; false disables it and removes it from the enabled list. Unspecified features retain their defaults. Applied after raw flag overrides. Defaults to {}. Remotion’s default Chrome flags and enabled or disabled features may change between patch versions. There is no guarantee that these defaults remain unchanged.

The default is {}. Keys are feature names without parameters. To specify field trials or feature parameters, set the complete enable-features or disable-features string through flags.

blinkFeatures?​

Overrides individual Blink features. true enables a feature and removes it from the disabled list; false disables it and removes it from the enabled list. Unspecified features retain their defaults. Applied after raw flag overrides. Defaults to {}. Remotion’s default Chrome flags and enabled or disabled features may change between patch versions. There is no guarantee that these defaults remain unchanged.

The default is {}. This works like features, but modifies enable-blink-features and disable-blink-features.

render.ts
const browser = await openBrowser('chrome', { chromiumOptions: { features: {Translate: false}, blinkFeatures: {AudioVideoTracks: true}, }, });

Via CLI flags​

Pass JSON objects. Each CLI option replaces the corresponding config value.

Terminal
bunx remotion render src/index.ts MyComposition out/video.mp4 \ --chromium-flags='{"disable-gpu-rasterization":true,"disable-gpu-compositing":true}' \ --chromium-features='{"Translate":false}' \ --chromium-blink-features='{"AudioVideoTracks":true}'

Via config file​

Use Config.setChromiumFlags(), Config.setChromiumFeatures(), and Config.setChromiumBlinkFeatures(). These settings also apply to server renders started from the Studio. After changing the config, the new values apply to newly started render jobs.

remotion.config.ts
Config.setChromiumFlags({ 'disable-gpu-rasterization': true, 'disable-gpu-compositing': true, }); Config.setChromiumFeatures({Translate: false}); Config.setChromiumBlinkFeatures({AudioVideoTracks: true});

For common settings, the dedicated options below are also available.

--disable-web-security​

This will most notably disable CORS among other security features.

note

Remotion will automatically append the --user-data-dir flag.

Via Node.JS APIs​

Pass chromiumOptions.disableWebSecurity in rendering APIs, including getCompositions(), renderMediaOnVercel() and renderStillOnVercel().

Via CLI flag​

Pass --disable-web-security.

Via config file​

Use setChromiumDisableWebSecurity().


Config.setChromiumDisableWebSecurity(true);
note

Prior to v3.3.39, the option was called Config.Puppeteer.setChromiumDisableWebSecurity().

--ignore-certificate-errors​

Results in invalid SSL certificates, such as self-signed ones, being ignored.

Via Node.JS APIs​

Pass chromiumOptions.ignoreCertificateErrors in rendering APIs, including getCompositions(), renderMediaOnVercel() and renderStillOnVercel().

Via CLI flag​

Pass --ignore-certificate-errors.

Via config file​

Use setChromiumIgnoreCertificateErrors().


Config.setChromiumIgnoreCertificateErrors(true);
note

Prior to v3.3.39, the option was called Config.Puppeteer.setChromiumIgnoreCertificateErrors().

--disable-headless​

If disabled, the render will open an actual Chrome window where you can see the render happen. This requires Chrome for Testing or a custom Chrome or Chromium executable. Chrome Headless Shell always runs headlessly. The default is headless mode.

Whether a window opens depends on the browser executable:

Browser executableOpens a window
Default Chrome Headless ShellNo. Chrome Headless Shell has no headed mode.
Chrome for TestingYes.
Custom desktop Chrome or ChromiumYes.
Custom Chrome Headless ShellNo.

On Linux, headed mode requires a running display server. It is not available on Remotion Lambda, Cloud Run or Vercel.

Via Node.JS APIs​

Pass chromiumOptions.headless: false in rendering APIs, including getCompositions().

Also pass chromeMode: 'chrome-for-testing', or provide a compatible desktop browser using browserExecutable.

Via CLI flag​

Pass --disable-headless together with --chrome-mode=chrome-for-testing:

Render with a visible Chrome window
npx remotion render ... --chrome-mode=chrome-for-testing --disable-headless

Alternatively, combine it with --browser-executable to use a custom desktop browser.

Via config file​

Use setChromiumHeadlessMode() and select Chrome for Testing:

remotion.config.ts
Config.setChromeMode('chrome-for-testing'); Config.setChromiumHeadlessMode(false);
note

Prior to v3.3.39, the option was called Config.Puppeteer.setChromiumHeadlessMode().

--gl​

Changelog
  • From Remotion v2.6.7 until v3.0.7, the default for Remotion Lambda was swiftshader, but from v3.0.8 the default is swangle (Swiftshader on Angle) since Chrome 101 added support for it.
  • From Remotion v2.4.3 until v2.6.6, the default was angle, however it turns out to have a small memory leak that could crash long Remotion renders.

Select the OpenGL renderer backend for Chromium.
Accepted values:

  • "angle"
  • "egl"
  • "swiftshader"
  • "swangle"
  • "vulkan" (from Remotion v4.0.41)
  • "angle-egl" (from Remotion v4.0.51)

The default is null, letting Chrome decide, except on Lambda and Cloud Run where the default is "swangle"

Via Node.JS APIs​

Pass chromiumOptions.gl in rendering APIs, including getCompositions(), renderMediaOnVercel() and renderStillOnVercel().

Via CLI flag​

Pass --gl=swiftshader.

Via config file​


Config.setChromiumOpenGlRenderer('swiftshader');
note

Prior to v3.3.39, the option was called Config.Puppeteer.setChromiumOpenGlRenderer().

--user-agentv3.3.83​

Via Node.JS APIs​

Pass chromiumOptions.userAgent in rendering APIs, including getCompositions(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel().

Via CLI flag​

Pass --user-agent.

Via config file​


Config.setChromiumUserAgent('Mozilla/5.0 (Remotion)');

--dark-modev4.0.381​

Whether Chromium should pretend to be in dark mode by emulating the media feature prefers-color-scheme: dark. Default is false.

Via Node.JS APIs​

Pass chromiumOptions.darkMode in rendering APIs, including getCompositions(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel().

Via CLI flag​

Pass --dark-mode.

Via config file​


Config.setChromiumDarkMode(true);

Need more flags?​

Open a GitHub issue to request it.