Back to Remotion

Chromium flags

packages/docs/docs/chromium-flags.mdx

4.0.4778.2 KB
Original Source

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().

tsx
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-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().

tsx
import {Config} from '@remotion/cli/config';

// ---cut---

Config.setChromiumIgnoreCertificateErrors(true);

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

--disable-headless

<Options id="disable-headless" />

Via Node.JS APIs

In getCompositions(), renderStill(), renderMedia() and renderFrames(), you can pass chromiumOptions.headless. You cannot set this option in Lambda.

Via CLI flag

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

Via config file

Use setChromiumHeadlessMode().

tsx
import {Config} from '@remotion/cli/config';

// ---cut---

Config.setChromiumHeadlessMode(false);

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

--gl

<Options id="gl" />

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

tsx
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"/>

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-mode<AvailableFrom v="4.0.381"/>

<Options id="dark-mode" />

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.