[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115338":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":9,"pushedAt":31,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":15,"starSnapshotCount":15,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},115338,"motlab","staryone\u002Fmotlab","staryone","Video as code: canvas scenes rendered with WebCodecs in headless Chrome, a review viewer, and agent skills that build the video from your references.",null,"JavaScript",451,55,104,1,0,54,278,286,95.17,"MIT License",false,"main",[24,25,26,27,28,29,30],"agent-skills","canvas","claude-code","headless-chrome","motion-graphics","video","webcodecs","2026-11-23 11:56:57","2026-11-23 20:50:04","\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fdemo.avif\" width=\"100%\" alt=\"The motlab ad: a prompt asks the agent for a coffee shop promo, the agent builds the scenes, notes are marked on frames in the viewer, the fixes appear, and the video is exported at 4K\">\n\u003C\u002Fp>\n\n\u003Cdiv align=\"center\">\n\n# motlab\n\nA video engine where every scene is code, and an agent skill that writes the scenes for you.\n\n\u003Ccode>npm install -g @motlab\u002Fcli && npx @motlab\u002Fcli setup\u003C\u002Fcode>\n\n[Demo](#watch-the-demo) · [Install](#install) · [Quick start](#quick-start) · [Speed](#speed) · [How it works](#how-it-works) · [Docs](#documentation) · [FAQ](#faq) · [Roadmap](ROADMAP.md)\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fstaryone\u002Fmotlab\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fstaryone\u002Fmotlab\u002Factions\u002Fworkflows\u002Fci.yml)\n[![MIT license](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-f4c430?style=flat-square)](LICENSE)\n[![Node.js 24+](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNode.js-24%2B-339933?style=flat-square&logo=nodedotjs&logoColor=white)](package.json)\n\n\u003C\u002Fdiv>\n\n---\n\nEvery scene is a canvas page with one function, `renderAt(t)`, that draws the frame at time `t`. motlab plays the pages in a web viewer where you step through them frame by frame, and renders them to MP4 in headless Chrome. You hand your agent a folder of references (logos, screenshots, footage, fonts, music, voice) and a direction, and it builds every scene, opens the viewer and revises from your notes. No AI image or video model is involved.\n\nThe ad above (19 seconds, 7 scenes) was made with motlab and its skill, reviewed in the viewer and exported at 4K. The preview is silent; [watch it with sound](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F5e2ff219-697c-459f-a273-f36cb11db1d1).\n\n## What it does\n\n- Your agent writes each scene as a canvas page, from your references and a short brief.\n- The viewer plays the real pages with their audio, frame by frame, with a timeline you can zoom and step through.\n- You point at what to change: click a frame, drag a box over a part of it, or mark a time range, and type a note on it. The agent reads every note from `selection.json` and works through them by number.\n- Versions of a project sit side by side in the viewer, so a second cut does not overwrite the first.\n- Export renders 720p, 1080p, 1440p or 4K MP4, with the scenes' transitions, music and voice mixed in.\n- Frames are encoded with WebCodecs inside the page, so they never leave Chrome as images. On a GPU that made it 2 to 4 times as fast as Remotion and HyperFrames on the [benchmark scene](#speed).\n- A second skill, `motlab-assets`, builds reusable asset kits the same way: icons, illustrations, 2D characters with a rig, transitions, 3D objects and textures, rendered to transparent PNG plus SVG, or GLB, FBX and OBJ with PBR textures. Every video that uses the kit shares one look.\n\n## Watch the demo\n\nTwo minutes in English, made with motlab too: the install, the brief to the agent, the build, playing it in the viewer, notes on frames, versions, the revision and the export.\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F522d1db2-a0bd-43bd-84b7-9f071f224854\n\n## Install\n\nYou need Node 24 or newer, Google Chrome or Chromium, and ffmpeg with ffprobe on PATH. Python 3 is optional and only used by the skills' helper scripts. Blender is optional too, for the asset skill's main 3D path.\n\n```bash\nnpm install -g @motlab\u002Fcli\nnpx @motlab\u002Fcli setup\n```\n\nnpm installs the engine. Setup copies both skills to your agent's skill folder, checks the machine, and makes sure the `motlab` command works: where npm's folder is not on PATH (nvm for Windows), it adds the command to `~\u002F.local\u002Fbin`. After that it is `motlab` everywhere, and `motlab doctor` checks the machine again at any time.\n\nSetup installs the skills for Claude Code unless you name another agent:\n\n| Your agent | Setup command |\n|---|---|\n| Claude Code | `npx @motlab\u002Fcli setup` |\n| Codex, Cursor, OpenCode, GitHub Copilot, Gemini CLI, Amp, Windsurf, Muse Code | `npx @motlab\u002Fcli setup --skill agents` |\n| Antigravity (App and CLI) | `npx @motlab\u002Fcli setup --skill antigravity` |\n| Hermes Agent | `npx @motlab\u002Fcli setup --skill hermes` |\n| Several of them | `npx @motlab\u002Fcli setup --skill claude,agents,antigravity` |\n| Any other agent | `npx @motlab\u002Fcli setup --skill-dir \u003Cits skill folder>` |\n\nRunning it again for another agent adds the skills there too. `--dry-run` shows every step first, and `--link` links the skills instead of copying them. Start a new agent session afterwards so it loads them.\n\n\u003Cdetails>\u003Csummary>From a clone instead, to work on motlab\u003C\u002Fsummary>\n\n\u003Cbr>\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fstaryone\u002Fmotlab.git\ncd motlab\nnode install.js\n```\n\nThe installer runs `npm ci`, puts a `motlab` command in `~\u002F.local\u002Fbin` and copies the skills. It takes the same options, plus `--skill none` for no skills.\n\n\u003C\u002Fdetails>\n\nLater, `motlab update` tells you when a new version is out and how to get it (from a clone it pulls it from GitHub itself), and `motlab uninstall` removes the skills and motlab's own files again.\n\n[Install guide and per-OS notes](docs\u002Finstall.md) · [Instructions for an agent doing the install](docs\u002Finstall-for-agents.md)\n\n## Quick start\n\n1. Run `motlab edit example` in a folder that holds the sample project. In a clone that is the clone itself; after an npm install, copy `example\u002F` out of the engine folder that `motlab --help` prints. It starts the viewer in the background, opens the sample project and prints its address, `http:\u002F\u002F127.0.0.1:4173\u002Fp\u002Fexample\u002F`. Space plays, the arrow keys on the timeline step one frame, Ctrl+scroll zooms the timeline, and a drag on the preview marks a box.\n2. To make your own video, put your references in a folder and ask your agent, for example:\n\n   ```text\n   Make a 20 second portrait promo for my app with motlab. The references are in .\u002Fpromo-refs.\n   ```\n\n3. The agent plans the shots, writes the scenes and starts the viewer. Click the frame you mean, or drag a box over the part and type a note right on it. Notes can be left all over the video and handed over at once, so \"this one\" or \"all the notes\" is enough.\n4. When you are happy, press Export in the top right. The video goes to the project's `out\u002F` folder.\n\nThe viewer keeps running in the background for every project: `motlab stop` ends it, `motlab restart` starts it again, and `motlab start` starts it without opening a project. Its text is in English or Indonesian, following your browser, and the project menu switches it. You can also render from the command line:\n\n```bash\nmotlab render example --scale 1\n```\n\n## Speed\n\nThe same scene (a moving gradient, 160 animated cards with numbers, text) at 1080p, 300 frames, rendered by three tools on one laptop (Ryzen 7 5800H, RTX 3060 Laptop, Windows 11) with the same Chrome:\n\n| Tool | Render time | Frames per second | Compared with motlab |\n|---|---|---|---|\n| **motlab** | 9.5 s (`--encoder sw`), 12.6 s (default) | 31.5, 23.7 | |\n| HyperFrames 0.9.52, fastest setting (1 worker) | 27.2 s | 11.0 | 2.2 to 2.9 times as long |\n| Remotion 4.0.543, fastest setting (concurrency 1) | 30.7 s | 9.8 | 2.4 to 3.2 times as long |\n\nTime is the whole command, the median of three runs. At 4K the same scene took motlab 13.1 to 19.4 s and the fastest of the other two 48.9 s.\n\nRemotion and HyperFrames drew on the laptop's integrated Radeon. motlab on the same Radeon took 8.0 to 12.0 s at 1080p and 13.2 to 22.5 s at 4K. With Chrome drawing in software instead of on a GPU, motlab was still the fastest at 1080p (19.2 s against 28.3 s for HyperFrames), but at 4K HyperFrames was faster (43.4 s against 60.7 s).\n\nThis is one scene on one machine; macOS and Linux were not measured. The other settings, quality (SSIM) and file sizes are in [the benchmark](docs\u002Frendering.md#against-remotion-and-hyperframes), and [bench\u002F](bench\u002FREADME.md) runs it again.\n\n## How it works\n\n1. A project is a `project.json` that lists scene pages and audio files.\n2. A scene page is plain HTML with a `\u003Ccanvas id=\"c\">`, `window.renderAt(t)`, `window.TOTAL` and `window.ready`. Everything visible is a function of time, so the preview, the stills and the render draw the same frames.\n3. The viewer (`motlab start`, or `motlab edit` to open a project in it) shows the real pages in iframes with their audio through WebAudio, and saves your clicks and notes to `selection.json`.\n4. `motlab render` opens headless Chrome per scene and encodes the frames with `VideoEncoder` inside the page. ffmpeg only copies streams, joins the parts, sets the colour tags and adds the audio.\n\n```text\nproject.json + scene pages (canvas, renderAt(t)) + audio files\n  |\n  +-- motlab edit    viewer: the real pages in iframes, WebAudio audio, selection.json\n  +-- motlab render  headless Chrome per scene -> VideoEncoder in the page -> MP4 parts\n                     -> ffmpeg -c copy: join, colour tags, audio -> out\u002F\u003Cname>.mp4\n```\n\nFootage is decoded inside the page with Mediabunny, so a scene can cut and trim video files and draw over them. DOM-based engines take a screenshot of every frame and pipe the images to ffmpeg; encoding inside the page skips that, which is where the gap in [Speed](#speed) comes from. The encoder rules and the measured quirks are in [rendering](docs\u002Frendering.md).\n\n## Documentation\n\n| Need | Read |\n|---|---|\n| Install, update, per-OS notes | [Install](docs\u002Finstall.md), [Agent install](docs\u002Finstall-for-agents.md) |\n| Projects, scenes, audio and footage | [Projects](docs\u002Fprojects.md) |\n| The viewer, keys and `selection.json` | [Viewer](docs\u002Fviewer.md) |\n| Commands, options and the page contract | [Command line](docs\u002Fcli.md) |\n| How a render works, encoders, measurements, quirks | [Rendering](docs\u002Frendering.md) |\n| What the skill does and its references | [SKILL.md](skills\u002Fmotlab\u002FSKILL.md), [skill references](skills\u002Fmotlab\u002Freferences\u002F) |\n| Asset kits: tokens, 2D, 3D | [motlab-assets SKILL.md](skills\u002Fmotlab-assets\u002FSKILL.md), [its references](skills\u002Fmotlab-assets\u002Freferences\u002F) |\n| The viewer's visual design | [DESIGN.md](DESIGN.md) |\n| What is not built or not tested yet | [Roadmap](ROADMAP.md) |\n| Changes | [Changelog](CHANGELOG.md) |\n\n## FAQ\n\n\u003Cdetails>\u003Csummary>\u003Cstrong>Does motlab use AI image or video models?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n\u003Cbr>\n\n> No. Your agent writes every scene as code, and motlab draws it frame by frame in Chrome. The pictures come from your references and from what the code draws.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cstrong>Which agents does the skill work with?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n\u003Cbr>\n\n> `motlab setup` and the installer copy it for Claude Code by default. `--skill agents` covers Codex, Cursor, OpenCode, GitHub Copilot, Gemini CLI, Amp, Windsurf and Muse Code, `--skill antigravity` the Antigravity App and CLI, and `--skill hermes` Hermes Agent. `--skill-dir` takes any other agent's skill folder.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cstrong>Do I need a GPU?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n\u003Cbr>\n\n> It renders faster with one, and every render prints the GPU it got on its first line. On the test laptop, with Chrome drawing in software instead, renders took 2.8 to 4.5 times as long. A machine that has no GPU at all, such as a cloud server, has not been tested, and neither has a 3D scene without a GPU.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cstrong>Does it run on macOS and Linux?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n\u003Cbr>\n\n> A real video has now been made on Linux: a 42 s, 1080x1920 project on Ubuntu 24.04 with no GPU, rendered in about 82 s with the Chromium Playwright downloads (issue #8). CI runs the tests, the end-to-end renders among them, on an Ubuntu runner, but nothing has run on macOS (the Chrome paths and the Metal flag are in the code). Everything else was built and measured on one Windows laptop.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cstrong>Can I use it without an agent?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n\u003Cbr>\n\n> Yes. A scene is a plain HTML page you can write by hand, `motlab edit` opens the viewer, and `motlab render` exports from the command line. The page contract is in [the command line docs](docs\u002Fcli.md).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cstrong>Where do my notes go?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n\u003Cbr>\n\n> Into `selection.json` in the project folder, with a picture of each box or point in `selection\u002F`. The agent reads that file, so you do not have to describe the frame in chat.\n\n\u003C\u002Fdetails>\n\n## Status\n\nmotlab is young and has been built and measured on one Windows laptop with an RTX 3060. The skill has made two real videos from start to finish, a 2-minute demo of motlab in 10 scenes and a 19-second ad in 7, both rendered at 4K, and the viewer has been tried with a 45-scene project. Alpha output is not built. The Blender path has rendered a whole test sequence on Blender 5.2, played by a scene page into an MP4, and the asset skill has baked, exported and re-imported test assets, a Rigify rig among them. The [roadmap](ROADMAP.md) lists what is open.\n\n## Contributing\n\nRead [CONTRIBUTING.md](CONTRIBUTING.md) first. Agents working in this repository follow [AGENTS.md](AGENTS.md). Report security issues privately, as described in [SECURITY.md](SECURITY.md).\n\n```bash\nnpm test\n```\n\n## Star history\n\n\u003Ca href=\"https:\u002F\u002Fwww.star-history.com\u002F?repos=staryone%2Fmotlab&type=date&legend=top-left\">\n \u003Cpicture>\n   \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=staryone\u002Fmotlab&type=date&theme=dark&legend=top-left\" \u002F>\n   \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=staryone\u002Fmotlab&type=date&legend=top-left\" \u002F>\n   \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=staryone\u002Fmotlab&type=date&legend=top-left\" \u002F>\n \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n## License\n\n[MIT](LICENSE). The scene transitions come from gl-transitions (MIT); [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) has their licence and the libraries motlab installs or loads. Fonts, footage, music and other files you bring into a project keep their own licences.\n","motlab 是一个基于 WebCodecs 和无头 Chrome 的视频生成引擎，将视频场景建模为可编程 Canvas 页面，每个页面通过 renderAt(t) 函数按时间戳渲染帧。核心功能包括：AI 代理根据参考素材（Logo、音视频、字体等）和简短指令自动生成场景代码；内置帧级审查查看器，支持逐帧标注、区域选框批注与时间范围标记；多版本并行管理及 4K MP4 导出；全程在浏览器内完成帧编码，不依赖外部 AI 图像\u002F视频模型。适用于需要高可控性、可复现性与精细人工审核的短视频制作场景，如品牌宣传、产品演示、教学动画等。",2,"2026-11-24 04:50:43","CREATED_QUERY"]