motlab: video as code, fixed by notes on the frame
Someone rendered a 42-second vertical promo in about 82 seconds on Ubuntu with no GPU
- Who
- Made by StaryOne, for people who want product ads, explainers and reels from a coding agent with no AI video model.
- When
- The repository opened on November 16, 2026, and v1.0.0 came out on November 29.
- Where
- Windows, macOS and Linux. Claude Code by default, plus Codex, Cursor, OpenCode and Antigravity. Renders in Chrome on your machine.
What was hard
Ask an agent for a promo video and you had to watch the result, then explain the fix in words. "Bring the logo in a little later in the second scene" means one frame to you and another to the agent, and each round meant a new render watched from the top. With an AI video model, your logo and app screens also come out slightly different every time.
What it does about it
In motlab a scene is a canvas page with one function, renderAt(t), that draws the frame at time t. The agent writes every scene as code from your logo, screenshots and music, and the viewer plays those same pages. To change something you click the frame or drag a box over it and type a note; the agent reads the notes from selection.json and works through them by number. The preview and the final render draw with the same function, so what you reviewed is what you get.
What people made with it
A 42.1-second vertical promo (1080x1920, 6 scenes) for IRIS, a self-hosted webmail project, made on Ubuntu 24.04 with no GPU by a Muse agent following the motlab skill as written.
Total wall time for the render command: ~82 s
How it runs inside
- 1
You → Claude Code + motlab skill
A folder of references and one lineThe skill asks what the video is for, its length and orientation, then measures every image, clip and track.skills/motlab/SKILL.md - 2
Claude Code + motlab skill → scenes/*.html, project.json
Scene pages and project.jsonA scene is one HTML page with a canvas and renderAt(t); project.json lists the scenes and the audio.src/project.js - 3
Claude Code + motlab skill → The motlab viewer
motlab edit my-videoThe viewer plays the real scene pages with their audio on port 4173 and prints its address.src/viewer.js - 4
You → The motlab viewer
A click, a box or a pencil stroke, with a noteNotes are numbered into selection.json, with a picture of each box in the selection/ folder.src/editor.js - 5
The motlab viewer → Claude Code + motlab skill
The notes in selection.json, by numberThe agent marks the scenes it is fixing with motlab working, and the viewer reloads a scene when it is saved.src/live.js - 6
The motlab viewer → headless Chrome + WebCodecs
Export, or motlab renderHeadless Chrome opens each scene and encodes its frames with VideoEncoder inside the page.src/page/runtime.js - 7
headless Chrome + WebCodecs → The MP4 in out/
ffmpeg -c copy joins the parts, adds audioffmpeg does not encode again: it joins the parts, sets the colour tags and adds the sound.src/render.js
What goes in, what comes out
Is it for you
Good for
- You have a logo, screenshots and music but no patience for a video editor
- You would rather point at a frame than describe a fix in words
- You want a 9:16 reel and a 16:9 ad from the same material, side by side as versions
- Product videos where the logo and the app screen must not drift by a pixel
Not for
- No AI image or video model, so it does not invent pictures. If a reference is small or blurry it asks for a better one.
- The agent checks stills only; it cannot watch playback or hear the sound. That part is yours, in the viewer.
- It renders without a GPU, but that took 2.8 to 4.5 times as long on the README's test laptop.
- Node 24 or newer, Chrome and ffmpeg have to be installed first.
Reviewed by Devalley’s editor before publishing. How the column is made