Skip to content
Back to search

clipframe

Make videos with code or let Claude make them. MIT-licensed Remotion alternative: MCP server + Agent Skill for AI, HTML/Tailwind scenes, animation blocks, video & audio, browser MP4 export, CLI.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/ferdousmikdad--clipframe/badge.svg)](/listings/ferdousmikdad--clipframe)

HTML

<a href="/listings/ferdousmikdad--clipframe"><img src="/api/listings/ferdousmikdad--clipframe/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npm i clipframe

Node 20 or newer. Rendering needs Google Chrome or Edge installed. If you have neither, run `npx playwright install chromium` and Clipframe uses that instead.

> Clipframe has not been published to npm yet. Until it is, clone this repo and run `npm install && npm run build && npm link`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 246 lines
  1. # Clipframe
  2. **Make videos from JSON.** Clipframe is a free, MIT-licensed alternative to Remotion for data-driven and AI-made videos: product promos, launch films, social reels, explainers. It includes a canvas renderer, real **HTML, CSS and Tailwind** scenes, 20 prebuilt animation blocks, video and audio, a player, MP4 export in the browser and a command-line renderer.
  3. ```bash
  4. npx clipframe init my-video
  5. npx clipframe render my-video/project.json # → my-video/taskflow-promo.mp4
  6. ```
  7. ![A promo rendered by Clipframe](docs/images/taskflow.gif)
  8. - **Free for everyone.** It uses the MIT license, including commercial use at any company size. There are no seat licenses or render fees.
  9. - **Made for AI assistants.** An MCP server and an Agent Skill let Claude, Cursor or Codex make, check and render videos for you. [Set it up in one line](#make-videos-with-claude-cursor-or-any-ai).
  10. - **JSON in, MP4 out.** A video is a list of scenes, each a block plus its props. People can write it by hand, apps can generate it, and an AI can write it in a few hundred tokens instead of thousands of lines of animation code.
  11. - **Preview matches export.** The player and the exporter call the same `renderFrame`, so the file shows exactly what you saw.
  12. - **Renders anywhere Chrome runs.** It exports in the browser with WebCodecs (no server), or from the command line with headless Chrome.
  13. - **HTML, CSS and Tailwind in the video.** Use flexbox, grid, gradients, 3D transforms, web fonts and `@keyframes` animations, captured frame by frame on the video's clock. You can also write blocks whose HTML comes from code (React works too). See [HTML in video](docs/html.md).
  14. - **Video, music, voice-over and sound effects,** with the music ducking under speech and clip sound.
  15. - **Extensible.** A custom block is one small JavaScript file: a schema plus either a canvas draw function or an HTML function.
  16. ## Make videos with Claude, Cursor or any AI
  17. Ask for a video in plain words, for example "make a 20-second 9:16 launch video for my app with these screenshots", and your AI assistant builds it with Clipframe. It writes the JSON, checks it, **looks at rendered frames** to fix layout, then renders the MP4 on your computer. Because the AI writes short JSON instead of animation code, a video costs a few thousand tokens, not a codebase.
  18. **Claude Code**
  19. ```bash
  20. claude mcp add clipframe -- npx -y github:ferdousmikdad/clipframe mcp
  21. ```
  22. **Claude Desktop, Cursor, Windsurf, VS Code, or any MCP app.** Add this to the app's MCP config (Claude Desktop: Settings → Developer → Edit Config):
  23. ```json
  24. { "mcpServers": { "clipframe": { "command": "npx", "args": ["-y", "github:ferdousmikdad/clipframe", "mcp"] } } }
  25. ```
  26. **Agent Skill** (Claude Code, Codex and other agents that load skills):
  27. ```bash
  28. npx skills add ferdousmikdad/clipframe
  29. ```
  30. Real example: [examples/brewly-by-claude](examples/brewly-by-claude) is a 9:16 reel Claude made from one prompt through the MCP server, unedited. It checked its own frames and fixed what looked wrong.
  31. The MCP server's tools are `clipframe_guide`, `list_blocks`, `describe_block`, `validate_project`, `render_still` (returns the frame as an image the AI can see), `render_video` and `save_project`. The first run downloads and builds Clipframe, which takes about a minute. Rendering needs Google Chrome or `npx playwright install chromium`.
  32. AI-readable docs: [llms.txt](https://ferdousmikdad.github.io/clipframe/llms.txt) · [llms-full.txt](https://ferdousmikdad.github.io/clipframe/llms-full.txt) · [AGENTS.md](AGENTS.md)
  33. ## Is it a Remotion replacement?
  34. It does the same job (code-defined video, a preview player, rendering to MP4) and covers Remotion's everyday features, but it is **not a drop-in replacement**. Remotion projects need porting. Here is where each one stands:
  35. | | Remotion | Clipframe |
  36. |---|---|---|
  37. | You write | React components (HTML / CSS) | JSON scenes using blocks, HTML/CSS/Tailwind, or code that returns HTML or draws on a canvas |
  38. | License | Free for individuals and small teams; companies need a paid license | MIT, free for everyone |
  39. | HTML, CSS and Tailwind in the video | ✅ | ✅ ([no scripts inside the HTML](docs/html.md#limits); logic goes in code blocks) |
  40. | CSS `@keyframes` on the video clock | ✅ | ✅ |
  41. | React components | ✅ (native, with hooks) | ✅ via `renderToStaticMarkup` (animate from `t`, no hooks state) |
  42. | Animation helpers (`interpolate`, `spring`, easing) | ✅ | ✅ (similar API, in seconds) |
  43. | Player component | ✅ | ✅ (plain JS or React) |
  44. | Render in the user's browser | Limited | ✅ (WebCodecs) |
  45. | Render from the command line | ✅ | ✅ (headless Chrome) |
  46. | Cloud / Lambda rendering | ✅ | ❌ (run the CLI on your own server) |
  47. | Video clips, music, voice-over, sound effects, music ducking | ✅ | ✅ |
  48. | Prebuilt promo blocks (UI mockups, cursor clicks, pricing, stats…) | Templates (some paid) | ✅ 20 built-in |
  49. | Cost of having an AI make a video | High (it writes code) | Low (it writes JSON) |
  50. Choose Remotion if you need cloud rendering, live interactive components (`<video>`, `<iframe>`, client-side scripts) inside frames, or its plugin ecosystem. Choose Clipframe if you want HTML/CSS or structured videos made by people, apps or AI, with no license questions.
  51. ## A project
  52. ```json
  53. {
  54. "version": 1,
  55. "meta": { "name": "launch", "format": "16:9", "fps": 30, "resolution": "1080p" },
  56. "theme": { "primary": "#7C3AED", "secondary": "#22D3EE", "background": "#0B0B12", "text": "#FFFFFF", "font": "Inter", "radius": 16 },
  57. "assets": [{ "id": "shot", "type": "image", "file": "assets/dashboard.png" }],
  58. "scenes": [
  59. { "id": "s1", "block": "title-reveal", "duration": 3, "props": { "title": "Meet TaskFlow", "subtitle": "Plan less. Ship more." } },
  60. { "id": "s2", "block": "ui-mockup", "duration": 4, "props": { "asset": "shot", "frame": "browser" }, "transition": { "type": "slide", "duration": 0.5 } },
  61. { "id": "s3", "block": "logo-outro", "duration": 3, "props": { "text": "TaskFlow", "cta": "taskflow.app" } }
  62. ],
  63. "overlays": [{ "id": "o1", "block": "lower-third", "start": 3.5, "end": 6.5, "props": { "title": "Sam Rivera", "subtitle": "Product lead" } }]
  64. }
  65. ```
  66. - **Formats:** 16:9, 9:16, 1:1, 4:5 and 4:3, at 720p or 1080p and 30 or 60 fps.
  67. - **Transitions:** fade, slide, zoom and wipe.
  68. - **Theme:** brand colours, font and corner radius, applied to every block.
  69. - **Fonts included:** Inter, Poppins, Hind Siliguri and Noto Sans Bengali. Latin and Bangla text both render correctly.
  70. The full format is in [docs/project-format.md](docs/project-format.md), and every block with its props is in [docs/blocks.md](docs/blocks.md). Running `clipframe schema` prints the JSON Schema.
  71. ![Frames from the TaskFlow example](docs/images/taskflow-frames.png)
  72. ## Blocks
  73. | Group | Blocks |
  74. |---|---|
  75. | HTML | `html` (scene), `html-overlay` (over the scenes): any HTML + CSS + Tailwind. See [docs/html.md](docs/html.md) |
  76. | Media | `video`, `picture` |
  77. | Text | `title-reveal`, `kinetic-text` |
  78. | UI | `ui-mockup` (browser / phone / laptop), `cursor-click`, `zoom-pan`, `feature-callout`, `feature-grid` |
  79. | Data | `stats-counter`, `before-after`, `pricing-card` |
  80. | Brand | `testimonial`, `logo-outro` |
  81. | Background | `background` |
  82. | Overlays | `lower-third`, `captions`, `watermark` |
  83. ## HTML scenes
  84. ```json
  85. { "id": "s1", "block": "html", "duration": 4, "props": {
  86. "tailwind": true,
  87. "html": "<div class=\"h-full grid place-items-center\"><h1 class=\"rise text-[140px] font-extrabold\">Hello <span class=\"text-violet-400\">HTML</span></h1></div>",
  88. "css": ".rise{animation:rise .8s both}@keyframes rise{from{opacity:0;transform:translateY(60px)}}"
  89. } }
  90. ```
  91. ![HTML, CSS and Tailwind rendered by Clipframe](docs/images/html.gif)
  92. Lay out at 1080p size. `@keyframes` play on the video clock, `var(--t)` and `var(--p)` give the time and progress, `src="asset:ID"` uses project images, and web fonts load from a stylesheet URL. Full guide: [docs/html.md](docs/html.md). Example: [examples/html-css](examples/html-css).
  93. ## Install
  94. ```bash
  95. npm i clipframe
  96. ```
  97. Node 20 or newer. Rendering needs Google Chrome or Edge installed. If you have neither, run `npx playwright install chromium` and Clipframe uses that instead.
  98. > Clipframe has not been published to npm yet. Until it is, clone this repo and run `npm install && npm run build && npm link`.
  99. ## Command line
  100. ```bash
  101. clipframe render project.json -o out.mp4 # MP4, H.264 + AAC
  102. clipframe render project.json --resolution 720p --fps 60
  103. clipframe render project.json --from 3 --to 8 # only part of it
  104. clipframe still project.json -t 2.5 -o frame.png # one frame (PNG, JPEG or WebP)
  105. clipframe validate project.json # check it before rendering
  106. clipframe blocks # list blocks
  107. clipframe blocks title-reveal # one block's props
  108. clipframe schema # project JSON Schema
  109. clipframe mcp # MCP server for AI apps (stdio)
  110. clipframe render project.json --blocks my-block.js # with your own blocks
  111. ```
  112. Asset files are read relative to the folder `project.json` is in.
  113. ## In the browser
  114. ```ts
  115. import { assetsFrom } from "clipframe";
  116. import { createPlayer } from "clipframe/player";
  117. import { renderToMp4 } from "clipframe/export";
  118. const player = createPlayer(document.getElementById("player")!, {
  119. project,
  120. resolveAsset: assetsFrom("/my-video/"), // where project files live
  121. fontsUrl: "/fonts", // copy node_modules/clipframe/fonts here
  122. });
  123. const blob = await renderToMp4(project, {
  124. resolveAsset: assetsFrom("/my-video/"),
  125. onProgress: (p) => console.log(p.frame, "/", p.total),
  126. });
  127. ```
  128. React:
  129. ```tsx
  130. import { ClipframePlayer } from "clipframe/react";
  131. <ClipframePlayer project={project} resolveAsset={assetsFrom("/my-video/")} loop />;
  132. ```
  133. Browser export needs WebCodecs (Chrome or Edge 94+). Safari and Firefox can play videos but not export them yet.
  134. ## Your own blocks
  135. ```js
  136. // countdown.js
  137. export default ({ z, defineBlock, font, spring, drawBackdrop }) =>
  138. defineBlock({
  139. id: "countdown",
  140. name: "Countdown",
  141. summary: "Numbers count down to a launch message",
  142. category: "text",
  143. defaultDuration: 4,
  144. schema: z.object({ from: z.number().int().default(3) }),
  145. render(r) {
  146. const { ctx, props, theme, t, width, height, unit } = r;
  147. drawBackdrop(r);
  148. const n = Math.max(0, props.from - Math.floor(t));
  149. const s = spring(t % 1);
  150. ctx.fillStyle = theme.text;
  151. ctx.font = font(800, 360 * unit * s, theme.font);
  152. ctx.textAlign = "center";
  153. ctx.textBaseline = "middle";
  154. ctx.fillText(String(n), width / 2, height / 2);
  155. },
  156. });
  157. ```
  158. Or return HTML instead of drawing: `defineHtmlBlock({ ..., html: (props, f) => \`<div>${f.t}</div>\` })` ([docs/html.md](docs/html.md#in-code-definehtmlblock-remotion-style)).
  159. `render` is called once per frame with the time `t` in seconds. It has to be pure, so the same `t` always draws the same pixels. That is why preview and export match. See [docs/custom-blocks.md](docs/custom-blocks.md) and [examples/custom-block](examples/custom-block).
  160. ## Made for AI
  161. - `compactBlockList(registry)` describes every block in one line each. Hand that to a model as its menu.
  162. - `applyOps(project, ops)` applies small edits such as `add_scene`, `update_scene` and `set_theme` atomically, and validates the result.
  163. - `validateProject` returns short, fixable errors like `s3.props.title: required`, which a model can correct on its next turn.
  164. - `summary(project)` gives a compact text view of a project.
  165. Clipframe is the rendering engine of [Clipai](https://github.com/ferdousmikdad/Clipai), a local AI video editor that adds a timeline, captions and footage editing on top of it.
  166. ## Website and playground
  167. Live at **https://ferdousmikdad.github.io/clipframe/**: the hero video renders in your browser, so you can edit its headline, colour and format and export it as an MP4. The [playground](https://ferdousmikdad.github.io/clipframe/playground.html) lets you edit any example's JSON. Run both locally:
  168. ```bash
  169. npm install
  170. npm run demo
  171. ```
  172. ![Playground](docs/images/playground.png)
  173. ## Develop
  174. ```bash
  175. npm install
  176. npm run build # library + CLI render page
  177. npm test # unit tests
  178. npm run typecheck
  179. npm run docs # regenerate docs/blocks.md
  180. ```
  181. Layout: `src/schema` (project format, timing, ops), `src/engine` (renderer, easing, motion, drawing helpers), `src/blocks`, `src/html` (HTML → frame), `src/player`, `src/react`, `src/export` (WebCodecs + MP4), `src/cli`.
  182. `CLIPFRAME_DEBUG=1 clipframe still …` saves the SVG of each HTML frame next to the output, for inspecting.
  183. ## License
  184. MIT © Ferdous Mikdad. The bundled fonts use the SIL Open Font License, the icons are Lucide (ISC), and the dependencies keep their own licenses. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.