LeClap · On-device
The video engine for AI agents
One template. Many videos.
Use the same JSON template with different coding agents. Your AI agent uses tokens to write it. Rerender a video or swap inputs to make variations, with zero tokens per render.
MCP or CLI. Keep every composition editable.
Render a sample template. No upload or camera needed.
Your agent writes the template once. LeClap renders a video for every input: same inputs, same file.
Change the inputs, never the template.
A template declares its inputs: your clip, your words, your colours. Every set of inputs gives its own video; the same set gives the same file again, byte for byte, per platform.
- An intro card with your show's name, in your colour.
- Sections cross-fade on their own. One line sets it.
- Your clip goes in. No editing timeline.
- Your name lands on the name bar.
- Your role and show, on the second bar.
- One colour styles the bar and both cards.
- Your logo, on every video.
- Subtitles follow the voice, and the music ducks under it. No editing.
- An outro card closes on your name.
- Film someone else. Same template, same brand, same finish.
- Change one value. Every video follows.
- Same inputs, same file, byte for byte. No model in the loop.
Rendered twice: the same file, byte for byte.
{ "global": { "transition": { "type": "fade", "duration": 0.4 }, "music": { "name": "lofi-study.mp3" }, "audio": { "musicVolume": 1, "musicFade": 0.4, "ducking": true }, "watermark": { "url": "pictures/open-clinic-mark.png", "position": "top-right", "scale": 0.155, "opacity": 1, "margin": 36 }, "fields": { "clip": { "type": "media" }, "name": { "type": "text", "maxLength": 28 }, "role": { "type": "text", "maxLength": 24 }, "show": { "type": "text", "maxLength": 24 }, "line": { "type": "text", "maxLength": 64 }, "accent": { "type": "color" } } }, "sections": [{ "type": "color_background", "options": { "duration": 1.6, "musicVolume": 1 }, "inputs": [{ "type": "image", "url": "pictures/open-clinic-mark.png" }], "titleCard": { "headline": { "en": "{{ show }}" },Health MinuteHealth MinuteHealth Minute "accent": "{{ accent }}"#FF8AAE#FF8AAE#FFF685 } }, { "type": "video", "options": { "videoUrl": "{{ clip }}",doctor-office-clinic.mp4podcast-host-clinic.mp4podcast-host-clinic.mp4 "musicVolume": 0.25 }, "lowerThird": { "position": "top", "title": { "en": "{{ name }}" },Mai TranSam RiveraSam Rivera "subtitle": { "en": "{{ role }}, {{ show }}" },Doctor, Health MinuteHost, Health MinuteHost, Health Minute "accent": "{{ accent }}"#FF8AAE#FF8AAE#FFF685 }, "subtitles": { "cues": [{ "at": 0.4, "end": 3.2, "text": "{{ line }}"Hi, I'm Mai Tran. Welcome to Open Clinic.Hey, Sam Rivera here. This is Open Clinic.Hey, Sam Rivera here. This is Open Clinic. }], "style": "boxed", "karaoke": "word", "activeColor": "{{ accent }}"#FF8AAE#FF8AAE#FFF685 } }, { "type": "color_background", "options": { "duration": 1.8, "musicVolume": 1 }, "inputs": [{ "type": "image", "url": "pictures/open-clinic-mark.png" }], "titleCard": { "headline": { "en": "{{ name }}" },Mai TranSam RiveraSam Rivera "subtitle": { "en": "{{ show }}" }Health MinuteHealth MinuteHealth Minute } }]}What people build with it
Eight jobs the showcase already renders. One of them probably looks like your week.

Pull request evidence in CI
An agent writes the template, LeClap renders the review clip. This repo does it on its own pull requests.
See pull request evidence
Product launches and promos
A screenshot, a headline and a camera tilt. Swap the screenshot, keep the launch.



Reels in three formats
One template: a 16:9 film, a 9:16 cut and a square post. Recomposed, not cropped.

Real-estate listings
Address, price and rooms are typed fields. One template lists every property.

Conference openers and lower thirds
Date, venue, speaker and talk title, laid out in HTML and CSS, rendered by FFmpeg.

Word-timed captions
Speech-to-text timings in; a karaoke highlight or loud capitals out.

Recaps and stat cards from data
The numbers are typed fields.
leclap render --setfills them, one render per row.
Shot and rendered on a phone
Film a clip, add effects and music, render it on the device. Nothing is uploaded.
- See the showcase
From an empty folder to a render, with your agent
Two commands set the project up. Then ask your agent client for a video: it reads the schema, writes the template, fixes what the validator flags, and LeClap renders it.
- pnpm dlx @leclap/cli init hello
- ✓ Created hello
- cd hello && pnpm install
- + @leclap/cli 0.7.0
- ◆ leclap connected · .mcp.json · 15 tools
- Make a 6-second vertical launch teaser, with the logo at the end.
- Reading the template schema.
- get_template_schema: schema and authoring guide
- Drafting template.json: 3 scenes, portrait.
- validate_template: "Oswald" is not a bundled font → use "oswald"
- Fixing the font id.
- validate_template: valid · 2 motion findings: headline_hold_short
- Holding each headline longer.
- validate_template: valid · 3 sections, portrait
- compose_video: build/1796258694754-ffca7f/output.mp4 · 6s · 749 KB · QC verified
- Done: a 6-second vertical teaser, logo on the last scene.
Runs where you do
Node, the browser through WebAssembly and the phone, with no render server in between.
Node.js
Render from a script or CI with the engine library, on system FFmpeg or ffmpeg-static.
Browser
FFmpeg compiled to WebAssembly renders in the tab. Nothing is uploaded.
On-device
An LGPL build of FFmpeg is linked into the iOS and Android app. Footage stays on the phone.
Shoot and render, right on the phone.
The same templates run on the phone: FFmpeg is compiled into the app, so your footage never leaves your hands.
01
Pick a template
Browse ready-made looks and choose the one that fits your story.
02
Shoot your clip
Film straight from the app, with a countdown and a framing guide.
03
Render it on the phone
FFmpeg composes the finished video on the device. No server, no upload.
04
Your video, finished
Titles, grade and lower third baked in, ready to post, and still on your phone.
One template. Every screen.
62 seconds, every shot rendered or recorded for real: the template, the engine, the browser and the phone.
The trailer · 1:02Questions, answered
What is LeClap?
LeClap is an open-source JSON template engine. One file describes a video’s sections, effects, music and transitions, and LeClap compiles it into a finished video with FFmpeg.
Is the render deterministic?
Yes, per platform. The same template, assets, configuration and runtime give the same video, and leclap verify --rerender checks it against the render manifest. Platforms use different encoders (libx264 on Node and in the browser, libopenh264 on Android, h264_videotoolbox on iOS), so pixels can differ between them.
Does AI generate the video?
No. There is no generative model in the render path. An agent can write the template over MCP; LeClap renders it locally with FFmpeg.
Does rendering cost tokens?
Your AI agent uses tokens when you ask it to write or edit a template. Once you have the template, LeClap renders it locally with FFmpeg. Use the same inputs to rerender the video or change the inputs to make variations, all without tokens.
How do I connect an agent?
Add @leclap/mcp to your MCP client, then have the agent call get_capabilities and get_template_schema before it validates and composes a template.
Does it need a server?
No. LeClap renders on Node, in the browser with WebAssembly and on-device with an LGPL build of FFmpeg. Nothing is uploaded to render.
How do I try it?
Run pnpm dlx @leclap/cli init hello, then pnpm install and pnpm render inside the new folder (npm works too). It writes build/output.mp4 from the template.json next to it.
Same JSON, same video. No code.





