Communitygithub.com

動態字幕-6種風格(Remotion)

為 Instagram Reels、TikTok 和 YouTube Shorts 產生動畫字幕,提供 6 種流行風格:Bold Pop、Karaoke、Editorial Mix、Serif Mix、Box Line 和 Minimal。

動態字幕-6種風格(Remotion) 是什麼?

此技能為 Remotion 專案提供 6 種動畫字幕風格,專為 Instagram Reels、TikTok 與 YouTube Shorts 這類短影音平台設計。開發者可透過設定簡單的樣式參數(如 BoldPop、Karaoke、Editorial、SerifMix、BoxLine、Minimal),快速為影片套用專業級動態字幕。 核心功能包含:使用 Whisper 的 `word_timestamps=True` 取得精確文字時間戳(最大誤差 ±0.15 秒);對於低資源語言(如烏茲別克語),提供 `wordsFromPhrase` 與 `ffmpeg` 的靜音偵測來估算字詞時機;透過 `paginatePhrases` 與 `paginate` 函式自動分頁,確保每頁字數不超過 24 字元、4 個詞彙。 它還強制遵循版面安全區(y 285–1248, x 80–910)、關鍵字著色對比度 ≥ 4.5:1、以及「何時不該加字幕」的規則(如當螢幕標題已包含口語內容時跳過字幕)。支援所有平台,具備完整的品質檢查清單。建議每個影片只選擇一種字幕風格並保持貫穿全片。

相容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/bahodirbuxorov/claude-motion-skills/tree/HEAD/skills/motion-captions

在你喜歡的 AI 中提問

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

說明文件

字幕 — 6 種動畫字幕風格(Remotion)

程式碼:starter/src/captions/Captions.tsx(元件 + wordsFromPhrase、paginatePhrases、paginate)與 CaptionsDemo.tsx,位於 claude-motion-skills。 每個影片請只選擇一種字幕風格,並在整支 Reels 中保持一致。

選擇風格

樣式外觀最適合用途
BoldPop全大寫粗體無襯線字,6px 深色描邊 + 投影,關鍵字用強調色,每個字彈跳(彈簧 d11 s260,縮放 0.7→1)講話頭、畫面雜亂的影片快節奏提示、銷售、鉤子
Karaoke整頁小字;正在說的字 104px 強調色,過去的字白色,未來的字 55%任何類型快速說話、留住觀眾
Editorial行內小無襯線字 + 關鍵字以大型襯線斜體獨立成行暗色 / 照片講故事、重要陳述
SerifMix平靜的 Grotesk 字體;關鍵字切換為襯線斜體;字從 25% 淡入暗色 / 電影感高級、情感
BoxLine白色圓角底板,活動字與關鍵字在強調色底板上淺色背景產品、教學(最易讀)
Minimal小寫、中等粗細、一行、柔和淡入美感畫面Vlog、平靜內容

時機(決定字幕成敗的關鍵)

  1. 來自 ASR 的字詞時間戳:使用 Whisper 並設定 word_timestamps=True(或 @remotion/openai-whisper / @remotion/install-whisper-cpp)。務必檢查 — 最大漂移 ±0.15 秒。
  2. 低資源語言(ASR 字詞不可靠,例如烏茲別克語):用 ffmpeg -af silencedetect=noise=-34dB:d=0.15 測量片語起訖時間,然後用 wordsFromPhrase("text with *keyword*", start, end) 依字元長度分散字詞。用 *word* 標記關鍵字。
  3. 分頁: 優先使用 paginatePhrases(phrases, 24, 4) — 頁面絕不混合兩個句子,且每頁適合一排底板(≤ 24 個字元含空格,≤ 4 個詞)。paginate(words, n)(固定詞數)僅用於快速測試。每頁至少停留 ≥ 0.6 秒;切勿將數字與其單位分開。
    • 單獨的破折號/標點符號記號(—、…)會由 wordsFromPhrase 黏附到前一個詞,因此絕不會單獨高亮。
  4. 字幕必須完全對應人聲所說的內容(如果 TTS 跳過某個詞,也請從字幕中移除該詞)。

版面規則

  • 安全區:文字應位於 y 285–1248, x 80–910(1080×1920)。預設字幕帶在 y 1020–1240;當下方三分之一區域有產品時,請上移。
  • 每頁只有一個關鍵字使用強調色(關鍵字絕不使用紅色文字 — 對比度太低);對比度需 ≥ 4.5:1,必要時可加描邊、底板或陰影。
  • 何時不該加字幕: 如果畫面上的大標題已經說出人聲的內容(如動態文字風格 Aura 或 News Flash),則該場景跳過字幕 — 絕不要讓同一句話出現三次(標題 + 字幕 + 人聲)。
  • 字型必須包含您語言的字形(烏茲別克語 ʻ ʼ:Inter、Inter Tight、Playfair Display ✓)。

品質檢查清單

  • 整支影片的聯絡表:沒有字幕遮住人臉/產品、沒有頁面閃爍、關鍵字顏色一致。
  • 逐格檢查最快的三個句子:字幕 ↔ 人聲偏移 ≤ 0.15 秒。
  • 在手機上靜音播放一次:觀眾能否僅靠字幕跟上整個故事?

Individual skills in this repo

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

motion-aura-type

Remotion motion style "Aura Type" (soft gradient aura + minimal kinetic typography): white ground, 2–3 huge blurred colour blobs drifting slowly, words resolving one by one from blur to sharp, one serif-italic word in colour. For hooks, quotes, relatable one-liners, statements. Triggers: "aura gradient", "blur text animation", "kinetic typography", "quote reel", "minimal text reel".

motion-bento

Remotion motion style "Bento" (bento-grid feature board) for Instagram Reels and carousels: light ground, rounded tiles of different sizes in a tight grid, one fact per tile (big number, icon, 3D object, short label), one hero tile in brand colour; tiles pop in on a stagger, numbers count up. For product features, "what''s inside", dashboards, results. Triggers: "bento grid", "feature grid animation", "app features reel", "dashboard reel".

motion-data-bars

Remotion motion style "Data Bars" (editorial finance infographic) for Instagram Reels and carousels: cream ground, numbers as the hero, tall bars growing on springs, monotone percentage counters, one highlighted "answer" bar, grotesk headline with one serif-italic word, "sample numbers" tag. For data stories, breakdowns, comparisons, salary/tax/finance explainers. Triggers: "infographic reel", "bar chart animation", "data visualization video", "finance reel".

motion-glass-object

Remotion motion style "Glass & Object" for Instagram Reels, TikTok and YouTube Shorts: one glossy/puffy 3D object hero (Google Flow / Nano Banana), light studio ground, frosted glass cards, floating pill tags, lime highlight box, spreadsheet-cell selection signature, spring animations. Use for product, fintech and SaaS reels, explainers and hooks. Triggers: "glass object", "3D object reel", "fintech reel", "glassmorphism motion", "puffy 3D".

motion-newsflash

Remotion motion style "News Flash" (newspaper headline + hand-drawn annotations) for Instagram Reels: newsprint ground, masthead rule, huge condensed headline, yellow brush highlight that paints in, red marker circle and arrow that draw on, faint text columns, source on screen. For tax news, law changes, deadlines, announcements. Triggers: "newspaper style", "news reel", "breaking news animation", "deadline reminder", "hand drawn annotation".

motion-swiss-grid

Remotion motion style "Swiss Grid" (International Typographic Style revival): paper ground, visible column grid that draws in, big circle + square primitives in brand colours, one giant grotesk word, narrow mono text columns, numbers as graphic elements. For series covers, rules, checklists, step-by-step reels. Triggers: "swiss design", "grid poster", "bauhaus motion", "minimal poster animation", "series cover".

相關技能