staryone/motlab
Video as code: canvas scenes rendered with WebCodecs in headless Chrome, a review viewer, and agent skills that build the video from your references.
What it solves
Motlab turns video creation into a code-writing task. Instead of editing a timeline by hand, every scene is a canvas page that draws a frame at a given time, so an AI agent can write the whole video from a brief and references. The built-in viewer makes it easy to give visual feedback, and the renderer is fast because it encodes frames directly in the browser.
How it works
A project is a project.json file that lists scene pages and audio. Each scene page is a plain HTML file with a canvas and a renderAt(t) function that draws the frame. The viewer (motlab edit) loads these real pages in iframes and plays them with audio, letting you click and drag to add notes, which are saved to selection.json. The agent reads the notes and revises the scenes. Rendering (motlab render) uses headless Chrome to draw each scene, with three scenes rendering at a time by default. Frames are encoded with WebCodecs inside the page, so they never leave the browser as images, and ffmpeg only joins the parts and adds audio. This makes it faster than screenshot-based engines.
Who it's for
Motlab is for creators who want to work with an AI agent to produce videos, or for anyone who prefers to write video scenes as code. It works with several coding agents (Claude Code, Codex, Cursor, etc.) via a skill, and can also be used entirely by hand. You need Node 24+, Chrome, and ffmpeg. It has been tested on Windows, with some Linux and macOS usage.
Highlights
- Agent skill writes all scenes from references and a brief.
- Viewer plays the real pages with audio, supports frame-by-frame stepping, zoomable timeline, and notes (box, point, pencil).
- Versions of a project sit side by side.
- Fast rendering: frames are encoded inside the page with WebCodecs, 2-4x faster than Remotion and HyperFrames in the benchmark.
- Export to MP4 at 720p, 1080p, 1440p, or 4K, with quality and file-size options.
- A second skill (motlab-assets) builds reusable asset kits (icons, illustrations, 2D characters, transitions, 3D objects) for a consistent look.
- Can run the viewer on your own server for review from a phone.
Related
- Project
- Project
- Project
- Project