用 Claude Code 做视频

Claude Code 可以根据笔记和截图写出可编辑动效,再在本地渲染 MP4。可从免费 ClaudeMotion 示例开始,或用 HyperFrames / Remotion 自行搭建。

What Claude Code can do with video

用 Claude Code 做视频 指你的 Agent 根据笔记和截图写出 HTML/CSS/JS 动效,再由本地渲染器(HyperFrames 或 Remotion)在电脑上导出 MP4。这不是托管式 AI 视频模型,也不能解锁 Anthropic 官方 Team/Enterprise 上的 Claude Motion。

免费做第一条产品视频

ClaudeMotion (claudemotion.tv) 是适用于 Claude Code 和 Codex 的独立工具包。你可以用笔记和截图制作产品更新短片或解说,保留可编辑的 HTML 项目和 MP4。Agent 搭建动画,HyperFrames 在本地渲染。

在找 GitHub 上的 “Claude Code video toolkit”? 对比 digitalsamba 与 claudemotion.tv →

免费 Editorial 提供可复做的 15 秒示例,已核验 MP4 为 1280 × 720、30 fps。需要已登录的 Agent、Node.js 22+、FFmpeg 和 ffprobe。Editorial 消耗 0 平台积分,无需绑卡。模型用量由 Agent 提供方单独计费。

制作你的第一条 MP4

看看 ClaudeMotion 如何把 Starter 发布说明和真实界面截图做成可编辑视频。在 Codex 或 Claude Code 中复做同一个示例,使用 Editorial 消耗 0 平台积分。

输入 · Starter 发布素材
示例使用的 ClaudeMotion 套餐页截图
成片 · 15 秒 MP4
免费试做这个示例

从笔记到可编辑视频

  1. 从上方的免费示例开始。把完整任务复制到 Claude Code 或 Codex,按提示核对并批准设备码。
  2. 打开本地预览。示例把 Starter 发布说明变成三个场景:发布公告、风格库和免费 Editorial 流程。配套的界面截图会出现在成片中。
  3. 看完预览后,请 Agent 导出 MP4。CLI 会用 ffprobe 校验文件。保留可编辑项目,之后可换成自己的笔记和截图再渲染。

HyperFrames workflow

HyperFrames is an HTML/GSAP video composition framework by HeyGen. It's lightweight, MIT-licensed and uses a single paused GSAP timeline that the renderer steps through frame-by-frame.

设置

  1. Install Node.js 22+ and FFmpeg
  2. npx hyperframes init my-video
  3. Ask Claude Code to write an HTML composition with a paused GSAP timeline
  4. npx hyperframes render --quality delivery --output out.mp4

Key rules

  • One paused GSAP timeline registered on window.__timelines[id]
  • No Date.now() or unseeded Math.random()
  • Escape all user text before inserting into HTML
  • The renderer controls time — no requestAnimationFrame loops

适合用途

Simple explainers, data animations, product demos. Fast startup, minimal dependencies.

Remotion workflow

Remotion lets you build video scenes as React components. It has a rich ecosystem of packages for animations, transitions, audio and data-driven content.

设置

  1. Install Node.js 22+
  2. npx create-video@latest my-video
  3. Ask Claude Code to write React components for each scene
  4. npx remotion render src/index.ts MyComp out.mp4

Key rules

  • Use useCurrentFrame() and useVideoConfig() for timing
  • Deterministic rendering — no side effects in render
  • Audio must be declared with <Audio> components

适合用途

Complex compositions, data-driven dashboards, projects that need npm packages or heavy interactivity. More setup, more flexibility.

HyperFrames vs Remotion

AspectHyperFramesRemotion
LanguageHTML + CSS + GSAPReact + TypeScript
LicenseMITBSL (free for individuals)
Setup time~2 minutes~5 minutes
Animation approachGSAP timelineReact frame hooks
RenderingBuilt-in CLIChromium headless
npm ecosystemLimited (vanilla JS)Full React ecosystem
Cloud rendering暂不可用Remotion Lambda (paid)
Agent integrationWorks well — simple HTML outputWorks — React components need more context

Templates & starting points

Starting from scratch with Claude Code works, but you'll reinvent layout patterns, timing curves and responsive sizing every time. Options:

  • claudemotion.tv templates — 18 original HyperFrames-based styles with connected Skills that guide your agent. No manual coding required. See the styles →
  • HyperFrames community — check the HyperFrames GitHub for starter examples. The community is small but growing.
  • Remotion templates — the Remotion team maintains starter kits for common patterns (text animations, social posts, data visualizations).
  • Build your own — prompt Claude Code to create a base template, then iterate. Works best if you understand HTML animation fundamentals.

Rendering to MP4

Both frameworks render locally. Requirements:

  • FFmpeg + ffprobe — both must be installed and on your PATH
  • Node.js 22+
  • Rendering a 15-second video takes 10–60 seconds depending on complexity and hardware
  • Verify the result: ffprobe -v error -show_entries format=duration -of csv=p=0 out.mp4

When to use a toolkit instead

SituationRecommendation
用产品笔记和截图做出第一条可编辑视频ClaudeMotion — 可直接复做的 Editorial 示例
从空白项目开始学习 HTML 动画Manual Claude Code + HyperFrames
Repeated production (weekly videos)claudemotion.tv toolkit
Custom React app with videoRemotion
Team workflow with review + exportclaudemotion.tv Skills

Claude Code video FAQ

Can Claude Code generate video?

Claude Code can write the HTML/CSS/JS code for an animation. Combined with a renderer like HyperFrames or Remotion, this code becomes an MP4 video. Claude Code doesn't generate video frames directly — it writes the program that creates them.

What is HyperFrames?

HyperFrames is an open-source (MIT) HTML/GSAP video composition framework by HeyGen. You write an HTML file with a paused GSAP timeline, and the CLI renders it frame-by-frame to MP4 using FFmpeg.

Can I use Claude Code with Remotion?

Yes. Ask Claude Code to write Remotion components (React + useCurrentFrame). It handles the composition logic; you run `npx remotion render` to produce the MP4. Give Claude Code the Remotion docs for better results.

Do I need to install anything?

Yes: Node.js 22+, FFmpeg and ffprobe. For Remotion, Chromium is also needed (it installs automatically). For the claudemotion.tv toolkit, the installer handles framework setup.

What video formats can I export?

Both HyperFrames and Remotion output MP4 (H.264) by default. Remotion also supports WebM, GIF and image sequences. The claudemotion.tv toolkit targets MP4 at 1280 × 720, 30 fps.

Is Claude Code video generation the same as Claude Motion?

No. Claude Motion is Anthropic's built-in feature in the Claude web interface (Team & Enterprise only). Claude Code video generation is a separate workflow where you use Claude Code (the terminal agent) with an open-source video framework to build animations locally.

用 Claude Code 做视频:可编辑动画和 MP4 导出 | claudemotion.tv