Communitygithub.com

snapcndev/snapcn

在 Remotion 中製作解說影片:一個 30–90 秒、附帶旁白和內嵌字幕的產品、功能、想法或流程解說影片。腳本 → 旁白 → 單詞時間戳 → 每個節拍一個 snapcn 場景 → 字幕 → 渲染。

snapcn 是什麼?

此技能可讓 AI 代理(如 Claude Code)直接在 Remotion 中建立專業的旁白解說影片,影片長度約為 30 至 90 秒。核心工作流程是:先撰寫腳本,然後透過語音合成或錄製旁白,接著取得逐字的時間戳,再使用 snapcn 的預製 React 元件(如 punch-lines、status-cycle、count-grid、laptop-frame 等)為腳本中的每個「節拍」製作一個獨立的視覺場景,最後內嵌字幕並渲染輸出。此技能主要用於 Claude Code(或其他可執行 CLI 的代理),且需搭配 Remotion 專案環境。它的優勢在於避免了手動逐幀製作動畫投影片的繁瑣過程,而是透過 snapcn 提供的現成場景元件(透過 shadcn CLI 安裝)來快速組裝,讓每個節點都有對應的動態視覺效果。此外,它還支援 Pro 版本,提供如 `orbit-flow` 或 `metric-morph` 等進階節拍,以及可用於自動規劃場景的 MCP 工具。重點是:所有文字都必須來自腳本,不得保留預設的範例文字;字幕必須內嵌在影片中,因為多數觀看者會在靜音狀態下觀看。

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

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

基於 snapcn 的 Remotion 解說影片

一個有旁白的 Remotion 解說影片:旁白驅動時間,字幕內嵌於影片中,螢幕上的每個節拍都是一個 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 場景影格數
鉤子(Hook)問題,以觀眾的語言描述punch-lines, type-morph144 / 94
運作方式(How it works)2–3 個步驟或狀態status-cycle, word-flip, card-rail198 / 180 / 108
展示(Show it)產品正在執行中的畫面laptop-frame, phone-frame, screen-recording240 / 240 / 139
證明(Proof)一個真實的數字count-grid47
結尾(Close)產品名稱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: "結算", startMs: 0, endMs: 400 },
  { text: "帳本", startMs: 400, endMs: 550 },
  { text: "需要", startMs: 550, endMs: 1000 },
  { text: "一週", startMs: 1000, endMs: 1350 },
  { text: "的", startMs: 1350, endMs: 1450 },
  { text: "時間。", 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="結算帳本 / 需要一週。 | Acme / 一夜之間完成。" />
      </Series.Sequence>
      <Series.Sequence durationInFrames={198}>
        <StatusCycle
          prefix="每張發票都會"
          statuses={["被匯入", "被比對", "被對帳"]}
          chips={["Stripe", "QuickBooks", "Xero"]}
        />
      </Series.Sequence>
      <Series.Sequence durationInFrames={60}>
        <CountGrid from="5" to="500" noun="個團隊" 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。Pro 元件在 components.json 發送你的金鑰(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.

相關技能