Communitygithub.com

motion-captions

为 Instagram Reels、TikTok 和 YouTube Shorts 制作动画字幕,提供 6 种流行风格:Bold Pop、Karaoke、Editorial Mix、Serif Mix、Box Line 和 Minimal。

motion-captions 是什么?

这是一个基于 Remotion 的动画字幕技能,专为短视频平台(Instagram Reels、TikTok、YouTube Shorts)设计,提供 6 种精心设计的字幕风格。每种风格都有明确的视觉特征和适用场景:Bold Pop(粗体大写、关键词高亮、单词弹跳)适合销售和钩子;Karaoke(动态关键词高亮)适合快语速内容以提升留存;Editorial Mix(小词 + 巨大衬线引用)适合故事讲述;Serif Mix(衬线斜体切换)适合高端情感内容;Box Line(圆角板 + 高亮词)可读性最高,适合教育类视频;Minimal(小写淡入)适合美学 Vlog。 技能的核心优势在于精确的字幕时间控制:使用 Whisper 的逐词时间戳(英文),或通过 ffmpeg 的静音检测为低资源语言(如乌兹别克语)估算单词位置。通过 `wordsFromPhrase` 和 `paginatePhrases` 函数智能分页,确保每页不超过 24 个字符和 4 个单词,且不拆分句子。还提供了安全区(y 285–1248, x 80–910)布局规则、关键字颜色对比度要求(≥4.5:1)以及何时不添加字幕的指南。最后附有质量标准:检查人物面部/产品是否被遮挡、字幕与语音同步误差≤0.15 秒、手机静音观看时能否仅凭字幕理解完整故事。

兼容平台✓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。 每个视频只选择一种字幕样式,并在整个视频中保持统一。

选择样式

样式外观最佳使用场景用途
BoldPop大写粗体无衬线,6 像素深色描边 + 投影,关键词用强调色,每个单词弹跳(弹簧动画 d11 s260,缩放 0.7→1)人物讲话、画面复杂充满活力的提示、销售、钩子
Karaoke全页小字;当前播放的单词 104 像素强调色,过去词白色,未来词 55% 透明度任何视频快语速、提升留存
Editorial小号无衬线词内联 + 关键词作为巨大的斜体衬线引用单独一行暗色 / 照片讲故事、陈述观点
SerifMix平静的 Grotesk 字体;关键词切换为斜体衬线;单词从 25% 透明度淡入暗色 / 电影感高端、情感化
BoxLine白色圆角板,当前词和关键词在强调色板上浅色背景产品、教育(最易读)
Minimal小写中等字重,单行,柔和淡入美学镜头Vlog、平静内容

时间控制(决定字幕成败的关键)

  1. 语音识别逐词时间戳:使用 Whisper 的 word_timestamps=True(或 @remotion/openai-whisper / @remotion/install-whisper-cpp)。检查时间戳——最大漂移 ±0.15 秒。
  2. 低资源语言(ASR 单词不可靠,例如乌兹别克语):使用 ffmpeg -af silencedetect=noise=-34dB:d=0.15 测量短语起止时间,然后 wordsFromPhrase("带 *关键词* 的文本", start, end) 按字符长度分配单词。用 *词* 标记关键词。
  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 ✓)。

质量检查清单

  • 整个视频的联系表:没有字幕遮挡面部/产品,没有页面闪烁,关键词颜色一致。
  • 检查语速最快的 3 个句子:字幕与语音偏差 ≤ 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".

相关技能