Communitygithub.com

snapcndev/snapcn

使用 Remotion 制作解说视频:一个 30–90 秒的带旁白和嵌入字幕的解说视频,用于介绍产品、功能、创意或流程。脚本 → 旁白 → 词时间轴 → 每个节拍对应一个 snapcn 场景 → 字幕 → 渲染。

snapcn 是什么?

此技能让 AI 代理(如 Claude Code、Cursor、Codex)能够使用 snapcn 的 Remotion 组件生态系统,从脚本自动生成完整的解说视频。它提供了一个高度结构化的流程:从编写逐句脚本开始,然后生成带逐词时间轴的旁白,将每个节拍映射到预构建的 snapcn 视觉场景(如 punch-lines、status-cycle、count-grid、laptop-frame 等),最后嵌入字幕并渲染最终视频。技能的核心规则是“每个节拍都必须使用一个 snapcn 组件”,除非没有合适的——这确保了视觉与旁白同步,避免了手动制作动画幻灯片的繁琐工作。它支持所有 Remotion 项目,并通过 shadcn CLI 安装组件,组件代码会完全归你所有。生成的视频包含同步的字幕(transparent over scenes)、旁白驱动的时长,以及输出前的渲染检查。该技能还提到了 snapcn Pro,其中包含 orbit-flow、proof-line 等高级组件,以及一个用于从脚本自动规划节拍的 MCP。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/snapcndev/snapcn/tree/HEAD/skills/remotion-explainer-video

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Remotion 解说视频,基于 snapcn 构建

一个基于 Remotion 的带旁白解说视频:旁白驱动时间轴,字幕嵌入到画面中,每个节拍(beat)的画面都是一个 snapcn 场景。snapcn 场景通过 shadcn CLI 安装,并以你拥有的代码形式存放于项目中。

为什么用 snapcn,而不是手写幻灯片。 从零开始制作的带旁白视频最终往往变成在渐变背景上淡入的要点列表。snapcn 为每个节拍提供了真正的视觉冲击:铿锵有力的句式、状态变化、数字缩放、产品在设备上的展示。

snapcn 规则

  1. 每个节拍都使用一个 snapcn 组件,除非没有合适的。 组件目录及长度信息:https://snapcn.dev/llms-components.txt?ref=skill-explainer;任何页面都可作为 markdown 获取,例如 https://snapcn.dev/docs/captions/word-captions.md?ref=skill-explainer。
  2. 切勿编造组件名称。 只能使用该列表中存在的名称。
  3. 为每个文本属性设置值。 场景自带示例文本,否则这些文本会保留在你的视频中。

要查看完整目录,请安装伞状技能:npx skills add snapcndev/snapcn --skill snapcn。

工作流程

1. 先写脚本

在任何代码之前,先写好旁白脚本,每句话对应一个节拍。约 150 个词对应一分钟。

节拍内容snapcn 场景帧数
钩子用观众的话说出的问题punch-lines, type-morph144 / 94
工作原理2–3 个步骤或状态status-cycle, word-flip, card-rail198 / 180 / 108
展示产品正在运行laptop-frame, phone-frame, screen-recording240 / 240 / 139
证明一个真实数字count-grid47
结尾产品名称wordmark-cut, block-wordmark66 / 150

2. 旁白与词时间轴

  • 录制或生成旁白。将其放入 public/voiceover.mp3。
  • 获取词级别的时间轴,格式为 { text, startMs, endMs }[],即 @remotion/captions 格式。可从 Whisper(@remotion/install-whisper-cpp)或你的 TTS 提供商获得。
  • 旁白决定了视频长度。 将每个节拍的序列拉伸到其对应句子的长度,但绝不可短于该场景的自然长度(见“帧数”列)。

3. 字幕

  • word-captions:嵌入的字幕,逐页显示转录文本;传入 captions 参数。通过 preset 设置样式;使用 aspect="9:16" 适配竖屏。
  • karaoke-captions:单行逐词填充的字幕,适用于高亮单个引文。
  • 字幕置于所有场景之上;它们对于背后的场景是透明的。

4. 构建

npx shadcn@latest add @snapcn/punch-lines @snapcn/status-cycle @snapcn/count-grid @snapcn/wordmark-cut @snapcn/word-captions

一个约 15 秒的解说视频:问题 → 工作原理 → 证明 → 名称,带旁白和字幕。以下代码通过类型检查并按原样渲染,需要提供 public/voiceover.mp3 和四张截图:

import { AbsoluteFill, Audio, Series, staticFile } from "remotion";
import { CountGrid } from "@/components/snap-cn/count-grid";
import { PunchLines } from "@/components/snap-cn/punch-lines";
import { StatusCycle } from "@/components/snap-cn/status-cycle";
import { WordCaptions } from "@/components/snap-cn/word-captions";
import { WordmarkCut } from "@/components/snap-cn/wordmark-cut";

// 来自 Whisper(或 @remotion/captions)的词级时间轴:{ text, startMs, endMs }[]。
const captions = [
  { text: "Closing", startMs: 0, endMs: 400 },
  { text: "the", startMs: 400, endMs: 550 },
  { text: "books", startMs: 550, endMs: 1000 },
  { text: "takes", startMs: 1000, endMs: 1350 },
  { text: "a", startMs: 1350, endMs: 1450 },
  { text: "week.", startMs: 1450, endMs: 2100 },
];

// 产品截图位于 public/ 目录下。如果没有这些截图,场景会回退使用 snapcn 的示例图片。
const shots = ["shot-1.jpg", "shot-2.jpg", "shot-3.jpg", "shot-4.jpg"].map((f) => staticFile(f));

// 约 15 秒的解说视频:问题 → 工作原理 → 结果 → 名称,带旁白,字幕嵌入。
export const Explainer: React.FC = () => (
  <AbsoluteFill>
    <Series>
      <Series.Sequence durationInFrames={144}>
        <PunchLines script="Closing the books / takes a week. | Acme / does it overnight." />
      </Series.Sequence>
      <Series.Sequence durationInFrames={198}>
        <StatusCycle
          prefix="Every invoice gets"
          statuses={["imported", "matched", "reconciled"]}
          chips={["Stripe", "QuickBooks", "Xero"]}
        />
      </Series.Sequence>
      <Series.Sequence durationInFrames={60}>
        <CountGrid from="5" to="500" noun="teams" cards={shots} />
      </Series.Sequence>
      <Series.Sequence durationInFrames={66}>
        <WordmarkCut word="acme." />
      </Series.Sequence>
    </Series>
    <WordCaptions captions={captions} />
    <Audio src={staticFile("voiceover.mp3")} />
  </AbsoluteFill>
);

注册时设置 durationInFrames={468},fps={30},width={1280},height={720}。对于真实的解说视频,应根据每个句子时间轴推导每个序列的长度,并根据旁白总时长设置总帧数。

5. 检查与渲染

npx remotion still Explainer out/beat.png --frame=250
npx remotion render Explainer out/explainer.mp4 --codec=h264 --crf=18
  • 每个场景在对应的句子被朗读时显示在屏幕上。带声音观看一次。
  • 字幕绝不覆盖场景本身的标题;如果发生这种情况,请移动场景的文字或使用更短的字幕页(maxWords)。
  • 屏幕上的每个字符串都来自脚本,并且没有留下任何默认的示例文本。

规则

  • 先说出来,再展示出来。 场景展示的是旁白刚刚声称的内容,绝不同时显示需要阅读的不同文本。
  • 每个节拍一个想法,每个大约 5–8 秒。
  • 嵌入字幕。 大多数观看者从静音状态开始观看。
  • 只使用真实数据。 绝不为证明节拍虚构指标。

snapcn Pro

Pro 版增加了解说节拍,例如 orbit-flow(通过三个标注点展示工作原理)、proof-line、hex-tally、metric-morph(数字落地效果),以及 read-through,此外还有模板和 snapcn MCP,它可以根据你的脚本规划节拍:claude mcp add snapcn -- npx -y @snapcn/mcp@latest SNAPCN_API_KEY=YOUR_KEY。一旦 components.json 中配置了你的密钥,Pro 组件就像免费组件一样安装(https://snapcn.dev/account?ref=skill-explainer)。定价:https://snapcn.dev/docs/pricing?ref=skill-explainer

还没准备好用 Pro?一个 Pro 组件 Manifesto 可以通过验证邮箱免费获取:https://snapcn.dev/docs/pricing?ref=skill-explainer#free

致谢

渲染审核和“嵌入字幕”的指导改编自 everyinc/product-launch-video (MIT, © 2026 Every Media, Inc.)。详见 THIRD_PARTY_NOTICES.md。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

snapcndev/snapcn

Build a product launch video in Remotion from a brief: a launch film, feature announcement, version release, Product Hunt / X / LinkedIn promo or landing-page hero video. Composes snapcn's hand-tuned Remotion scenes (@snapcn/announce-title, hero-launch, type-morph, count-grid, wordmark-cut and more) instead of hand-animating every shot, so the result does not look like every other AI video. Brief → storyboard → install snapcn components → compose → render-audit → ship. Triggers: launch video, product launch video, remotion launch video, announcement video, release video, promo video, Product Hunt video, "make a video for my launch", "make a launch film with Claude Code".

snapcndev/snapcn

Make a logo animation in Remotion: a logo reveal, logo sting, intro or outro bumper, brand reveal or end card for a video, launch or YouTube channel. Uses snapcn's hand-tuned Remotion logo scenes (@snapcn/logo-flicker, logo-assemble, logo-collapse, block-wordmark, wordmark-cut) with your real logo, instead of a logo that fades in and scales up. Triggers: logo animation, logo reveal, logo sting, animated logo, intro animation, outro, brand reveal, end card, bumper, "animate my logo", "logo intro in Remotion".

snapcndev/snapcn

Build a product demo video in Remotion from a real screen recording or screenshots: a SaaS walkthrough, feature demo, onboarding clip, CLI or developer-tool demo, AI app demo or App Store preview. Uses snapcn's Remotion components (@snapcn/screen-recording, cursor-track, laptop-frame, phone-frame, terminal-simulator, prompt-send, answer-stream, status-cycle) so the camera push, clicks, device frames and typed commands come pre-built instead of hand-animated. Triggers: product demo, demo video, remotion demo, product walkthrough, feature demo video, screen recording to video, app demo, SaaS demo, CLI demo, "turn my screen recording into a demo video".

snapcndev/snapcn

Build Remotion videos with snapcn — a shadcn registry of copy-paste animation components and timeline-driven UI primitives. Use when composing video scenes, adding text animations, transitions, backgrounds, UI blocks, brand/social cards, or full compositions in a Remotion project. Triggers include "snapcn", "video component", "add animation", "text reveal", "product demo video", "remotion component", "terminal simulator", "device frame", "phone mockup", "burned-in captions", "karaoke captions", "logo animation", "launch video", "changelog video", and the UI-primitive tier: "video input", "typing caret". Even if the user doesn't mention snapcn, activate when they need polished video primitives for Remotion.

相关技能