Skip to main content

--gl flag

When rendering a video in Remotion, different GL renderer backends can be selected.

The following renderer backends are supported in Remotion:

  • null - default, lets Chrome decide
  • angle
  • egl
  • swiftshader
  • vulkan (from Remotion v4.0.41)
  • angle-egl (from Remotion v4.0.52)
  • swangle - default on Lambda
1
If you use WebGL/Three.js:
  • On a desktop, angle is recommended
  • On a cloud instance with a GPU, angle-egl is recommended
  • On Lambda, use swangle (default on Lambda)
  • On a machine with no GPU, swangle is recommended. Rendering might be slow.
2
If you don't use WebGL/Three.js, the default renderer (null on local, swangle on Lambda) are the best choice.

Using the GPU

In cases where a GPU could be beneficial for rendering, it can often make sense to use the angle renderer (angle-egl on Linux). An in-depth explanation when and how to use it is given in this article.

⚠️ Memory leaks are a known problem with angle. We recommend to split up long renders into multiple parts when rendering large videos, since sometimes renders can fail due to memory leaks.

Currently, GitHub Actions will fail when using angle, since Actions runners don't have a GPU.

Selecting the renderer backend

The renderer backend can be set in different ways:

Via Node.JS APIs

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

Via Config file

tsx
Config.setChromiumOpenGlRenderer("angle");
tsx
Config.setChromiumOpenGlRenderer("angle");
note

The config file only applies to CLI commands.

note

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

Via CLI flag

Pass --gl=[angle,swangle,...] in one of the following commands: remotion render, remotion compositions, remotion still, remotion lambda render, remotion lambda still, remotion lambda compositions.

See also