packages/docs/docs/chromium-flags.mdx
We allow you to set the following flags in Chromium and Google Chrome since Remotion 2.6.5:
--disable-web-securityThis will most notably disable CORS among other security features.
:::note
Remotion will automatically append the --user-data-dir flag.
:::
In getCompositions(), renderStill(), renderMedia(), renderFrames(), getCompositionsOnLambda(), renderStillOnLambda(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel(), you can pass chromiumOptions.disableWebSecurity.
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.
Use setChromiumDisableWebSecurity().
import {Config} from '@remotion/cli/config';
// ---cut---
Config.setChromiumDisableWebSecurity(true);
:::note
Prior to v3.3.39, the option was called Config.Puppeteer.setChromiumDisableWebSecurity().
:::
--ignore-certificate-errorsResults in invalid SSL certificates, such as self-signed ones, being ignored.
In getCompositions(), renderStill(), renderMedia(), renderFrames(), getCompositionsOnLambda(), renderStillOnLambda(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel(), you can pass chromiumOptions.ignoreCertificateErrors.
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.
Use setChromiumIgnoreCertificateErrors().
import {Config} from '@remotion/cli/config';
// ---cut---
Config.setChromiumIgnoreCertificateErrors(true);
:::note
Prior to v3.3.39, the option was called Config.Puppeteer.setChromiumIgnoreCertificateErrors().
:::
--disable-headlessWhether a window opens depends on the browser executable:
| Browser executable | Opens a window |
|---|---|
| Default Chrome Headless Shell | No. Chrome Headless Shell has no headed mode. |
| Chrome for Testing | Yes. |
| Custom desktop Chrome or Chromium | Yes. |
| Custom Chrome Headless Shell | No. |
On Linux, headed mode requires a running display server. It is not available on Remotion Lambda, Cloud Run or Vercel.
In getCompositions(), renderStill(), renderMedia() and renderFrames(), pass chromiumOptions.headless: false.
Also pass chromeMode: 'chrome-for-testing', or provide a compatible desktop browser using browserExecutable.
Pass --disable-headless together with --chrome-mode=chrome-for-testing:
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.
Use setChromiumHeadlessMode() and select Chrome for Testing:
import {Config} from '@remotion/cli/config';
// ---cut---
Config.setChromeMode('chrome-for-testing');
Config.setChromiumHeadlessMode(false);
:::note
Prior to v3.3.39, the option was called Config.Puppeteer.setChromiumHeadlessMode().
:::
--glIn getCompositions(), renderStill(), renderMedia(), renderFrames(), getCompositionsOnLambda(), renderStillOnLambda(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel(), you can pass chromiumOptions.gl.
Pass --gl=swiftshader in one of the following commands: remotion render, remotion compositions, remotion still, remotion lambda render, remotion lambda still, remotion lambda compositions.
import {Config} from '@remotion/cli/config';
// ---cut---
Config.setChromiumOpenGlRenderer('swiftshader');
:::note
Prior to v3.3.39, the option was called Config.Puppeteer.setChromiumOpenGlRenderer().
:::
--user-agent<AvailableFrom v="3.3.83"/>In getCompositions(), renderStill(), renderMedia(), renderFrames(), getCompositionsOnLambda(), renderStillOnLambda(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel(), you can pass chromiumOptions.userAgent.
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-mode<AvailableFrom v="4.0.381"/>In getCompositions(), renderStill(), renderMedia(), renderFrames(), getCompositionsOnLambda(), renderStillOnLambda(), renderMediaOnLambda(), renderMediaOnVercel() and renderStillOnVercel(), you can pass chromiumOptions.darkMode.
Pass --dark-mode in one of the following commands: remotion render, remotion compositions, remotion still, remotion lambda render, remotion lambda still, remotion lambda compositions.
Open a GitHub issue to request it.