Help needed: Headless rendering without browser for automated pipeline

Author: devs-hookedCreated Oct 14, 2025Updated Apr 14, 2026

Problem

I need to render Motion Canvas animations completely headlessly (without browser) for an automated video generation pipeline on servers without GUI access.

Current Behavior

  • npm run serve opens browser UI and requires manual interaction
  • No documented CLI method for headless rendering
  • Renderer class exists but lacks documentation for standalone usage

Expected Behavior

Ability to render animations to frames/video via CLI without any browser dependency:

bash
npx motion-canvas render src/project.ts --output video.mp4

Attempted Solution

typescript
// render.ts
import {Renderer, Project} from '@motion-canvas/core/lib/app';
import scene from './src/scenes/scene?scene';

async function render() {
  const project = new Project({
    name: 'video',
    scenes: [scene],
  });
  
  const renderer = new Renderer(project);
  await renderer.render({
    fps: 24,
    range: [0, 240],
  });
}

render();

Error: Project constructor doesn't accept scenes directly, missing proper initialization

Environment

  • Motion Canvas: 3.17.2
  • Node.js: 16+
  • OS: Windows 10
  • Package Manager: npm

Use Case

Automated video generation pipeline that processes hundreds of videos daily on headless servers.

Related Issues

  • #415 (headless rendering discussion)
  • #595 (PR for CLI support)

Questions

  1. Is there a current way to render without browser?
  2. Is the Renderer class the correct approach?
  3. What's the proper Project initialization for headless usage?

Source: motion-canvas/motion-canvas