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 serveopens browser UI and requires manual interaction- No documented CLI method for headless rendering
Rendererclass exists but lacks documentation for standalone usage
Expected Behavior
Ability to render animations to frames/video via CLI without any browser dependency:
npx motion-canvas render src/project.ts --output video.mp4Attempted Solution
// 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
- Is there a current way to render without browser?
- Is the
Rendererclass the correct approach? - What's the proper Project initialization for headless usage?
Source: motion-canvas/motion-canvas