Skip to main content

Chromium flags

We allow you to set the following flags in Chromium and Google Chrome since Remotion 2.6.5:

--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

In getCompositions(), renderStill(), renderMedia(), renderFrames(), getCompositionsOnLambda(), renderStillOnLambda(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel(), you can pass chromiumOptions.disableWebSecurity.

Via CLI flag

Pass --disable-web-security in one of the following commands: remotion render, remotion compositions, remotion still, remotion lambda render, remotion lambda still, remotion lambda compositions.

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

In getCompositions(), renderStill(), renderMedia(), renderFrames(), getCompositionsOnLambda(), renderStillOnLambda(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel(), you can pass chromiumOptions.ignoreCertificateErrors.

Via CLI flag

Pass --ignore-certificate-errors in one of the following commands: remotion render, remotion compositions, remotion still, remotion lambda render, remotion lambda still, remotion lambda compositions.

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

In getCompositions(), renderStill(), renderMedia() and renderFrames(), pass chromiumOptions.headless: false.

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

The flag is supported by remotion compositions, remotion render and remotion still. 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 where the default is "swangle"

Via Node.JS APIs

In getCompositions(), renderStill(), renderMedia(), renderFrames(), getCompositionsOnLambda(), renderStillOnLambda(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel(), you can pass chromiumOptions.gl.

Via CLI flag

Pass --gl=swiftshader in one of the following commands: remotion render, remotion compositions, remotion still, remotion lambda render, remotion lambda still, remotion lambda compositions.

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

In getCompositions(), renderStill(), renderMedia(), renderFrames(), getCompositionsOnLambda(), renderStillOnLambda(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel(), you can pass chromiumOptions.userAgent.

Via CLI flag

Pass --user-agent in one of the following commands: remotion render, remotion compositions, remotion still, remotion lambda render, remotion lambda still, remotion lambda compositions.

--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

In getCompositions(), renderStill(), renderMedia(), renderFrames(), getCompositionsOnLambda(), renderStillOnLambda(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel(), you can pass chromiumOptions.darkMode.

Via CLI flag

Pass --dark-mode in one of the following commands: remotion render, remotion compositions, remotion still, remotion lambda render, remotion lambda still, remotion lambda compositions.

Need more flags?

Open a GitHub issue to request it.