Environment:0xsline OpenChatCut Chromium
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Rendering |
| Last Updated | 2026-10-22 14:00 GMT |
Overview
Headless Chromium browser required by Remotion's server-side video rendering pipeline for composition selection and frame rendering.
Description
Remotion's `renderMedia` and `renderStill` APIs use a headless Chromium browser to compile and render React-based timeline compositions into video frames. OpenChatCut's server-side render pipeline opens one browser instance, selects the composition, and renders all frames within that same browser context. The GL backend is platform-aware: `angle` on macOS/Windows (Metal/D3D), `angle-egl` on Linux (works without X11). The browser binary is resolved from `CC_BROWSER_EXECUTABLE` or Remotion's bundled Chromium.
Usage
Use this environment for server-side video export rendering and timeline still frame rendering (agent vision). It is the mandatory prerequisite for any implementation that calls Remotion's `renderMedia`, `renderStill`, or `selectComposition`.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | macOS, Windows, Linux | Linux needs no X11 with angle-egl |
| Hardware | GPU recommended | Software rendering via `CC_RENDER_GL=swangle` for headless |
| Disk | Temp space for frame cache | Proportional to render duration and resolution |
Dependencies
System Packages
- Chromium (bundled via `@remotion/renderer` 4.0.537, or `CC_BROWSER_EXECUTABLE` override)
Environment Variables
- `CC_BROWSER_EXECUTABLE` — Override Chromium binary path
- `CC_RENDER_GL` — Override GL backend (`angle`, `angle-egl`, `egl`, `vulkan`, `swangle`, `null`)
- `CC_REMOTION_BINARIES_DIR` — Override Remotion binaries directory
- `CC_REMOTION_HARDWARE_BINARIES_DIR` — Override HW render binaries directory
Quick Install
# Chromium is bundled with @remotion/renderer:
npm install @remotion/renderer
# For headless Linux without GPU:
export CC_RENDER_GL=swangle
# Override browser path if needed:
export CC_BROWSER_EXECUTABLE=/usr/bin/chromium
Code Evidence
GL backend resolution from `remotion/render.mjs:36-40`:
function resolveRenderGlBackend() {
const override = process.env.CC_RENDER_GL;
if (override && RENDER_GL_OVERRIDES.has(override)) return override;
return process.platform === 'linux' ? 'angle-egl' : 'angle';
}
Browser ownership pattern from `remotion/render.mjs:81-109`:
export async function withAbortableCompositionSelection({
signal, selectionOptions, run, openBrowserImpl = openBrowser, ...
}) {
signal?.throwIfAborted();
const browser = await openBrowserImpl('chrome', {
browserExecutable: browserExecutable(),
chromiumOptions: { gl: resolveRenderGlBackend() },
});
// ... composition selection + render within same browser ...
await closeBrowser();
}
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `Browser was not found` | Chromium not bundled or path wrong | Set `CC_BROWSER_EXECUTABLE` to a valid Chrome/Chromium path |
| Render fails on headless Linux | No GPU or display server available | Set `CC_RENDER_GL=swangle` for software rendering |
| `selectComposition` timeout | Large timeline or slow composition eval | Increase `resolveRenderTimeout()` value |
| GL context lost | GPU crash or driver issue | Use `CC_RENDER_GL=null` or `swangle` as fallback |
Compatibility Notes
- Linux: Defaults to `angle-egl` GL backend which works without X11. Use `swangle` for fully software rendering on GPU-less machines.
- macOS: Uses `angle` backend (Metal). VideoToolbox H.264 encoder is the preferred hardware encoder.
- Windows: Uses `angle` backend (D3D). NVENC, QSV, and AMF are hardware encoder candidates.
- Packaged desktop: Chromium and Remotion binaries are mirrored outside `app.asar` via `CC_REMOTION_BINARIES_DIR` because the compositor cannot spawn from inside an asar archive.