skkeoriw/ai-skills/dialogue-video

Claude Code and agent skill by skkeoriw/ai-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

把对话音频 + 转录 JSON 渲染成"教学视频风"动画 MP4(暗色基底、章节面包屑、场景模板、字幕条、右下小头像)。基于 Remotion,1080p,每分钟约 1–2 分钟渲染。当用户说"把这段音频做成视频"、"音频字幕转视频"、"audio to dialogue video"、"做成对话动画"、"做成 Karpathy 教学那种风格"时触发。输入必须包含一个音频文件(WAV/MP3)和一份带 segments 的 JSON(speaker_id / start / end / text_zh)。

Install

npx vskill@latest install skkeoriw/ai-skills/dialogue-video

SKILL.md

The same SKILL.md was published earlier as skkeoriw/ai-skills/dialogue-video.

Dialogue Video Skill

把一段对话音频 + 转录 JSON渲染成带场景动画的 1080p 视频。

风格参考:YouTube 教学视频(暗色背景、左上章节 chip、中央信息可视化、底部字幕条、右下角主讲人小圆头)。

输入要求

  1. 音频文件(WAV/MP3)—— 本地路径或公网 URL
  2. 转录 JSON,结构:

``json { "start_sec": 0, "end_sec": 120, "speakers": [{"id": "SPEAKER_A", "role": "host", "gender": "female"}], "segments": [ {"idx": 1, "start": 0, "end": 3.88, "speaker_id": "SPEAKER_A", "text_zh": "..."} ] } ``

  1. Storyboard JSON(场景脚本)—— 由你或 Claude 根据对话内容生成(见 prompts/storyboard-system.md)
  2. (可选)主讲人头像 jpg/png —— 必须用户主动提供,skill 不会自动从网络爬取

一键渲染

bash
bash ~/.claude/skills/dialogue-video/scripts/render.sh \
--audio "https://.../clip.wav" \
--json "https://.../clip.json" \
--storyboard ./storyboard.json \
--out ./out/video.mp4 \
--headshot ./speaker.jpg \
--aspect 16:9 \
--brand "AI · TALKS"

参数:

  • --audio、--json、--storyboard 必填(支持 URL 或本地路径)
  • --out 默认 ./out.mp4
  • --aspect 16:9 (默认 1920×1080) / 9:16 (1080×1920 抖音) / 1:1 (1080×1080)
  • --headshot 路径或 URL;不传则不显示右下角小头像
  • --brand 右上角小字(可省)
  • --workdir 工作目录(默认临时目录;指定固定目录可复用 node_modules 加快第二次)

Storyboard 生成

把 dialogue JSON 喂给 LLM(Claude API 或当前会话),结合 prompts/storyboard-system.md 的系统 prompt,让它输出 storyboard.json:

json
{
"meta": { "aspect": "16:9", "brand": "AI · TALKS", "headshot": null },
"scenes": [
{"start": 0, "end": 13.16, "chapter": "开场", "template": "title",
"props": {"title": "AI · 对话现场", "subtitle": "我们的第一位特邀嘉宾"}}
]
}

可用 templates:title / bullets / quote_highlight / speaker_card / question / chat / timeline / bigquote / code

每种模板的 props 字段定义见 template/src/lib.ts 的 Scene 类型,或 prompts/storyboard-system.md。

工作流程(推荐)

当用户给你对话音频 + JSON:

  1. 下载/读取 dialogue.json,把所有 segments 的 text_zh 摘出来给 LLM
  2. 用 `prompts/storyboard-system.md` 调一次 LLM(Claude/GPT),输出 storyboard.json
  3. 审一遍 storyboard:场景数 5–10、时间连续、文案不离谱
  4. 跑 render.sh,得到 MP4
  5. 若用户对内容不满:只改 storyboard.json,重新跑(已有 node_modules 时第二次约 2 分钟)

渲染原理

  • 引擎:Remotion 4.0
  • 字体:PingFang TC/SC + SF Pro Display 系统字体(无需外部加载)
  • 场景间硬切前后各 8 帧(约 0.27s)淡入淡出
  • 字幕(segment text_zh)按时间轴查表渲染;title/quote/bigquote/question 场景自动隐藏避免重复

已知限制 / 后续

  • 右下角小头像只支持一张(适合单人或主讲人)。若要左右两人头像同框,需扩展 Storyboarded.tsx。
  • 默认 30fps;如需 60fps 改 template/src/lib.ts 的 FPS。
  • 中文字体强依赖 macOS / 苹果系统字体,Linux 渲染需另配字体。
  • code 模板高亮极简(kw/str/cm 三类),不接 Prism。

优化清单(v1 → v1.1 已合入)

修复来源问题
✅ Storyboard 改为 JSON 数据,不再写 TS之前每改文案要重新编译
✅ DURATION_SEC 用 max(audio_len, last_segment.end)之前 JSON 窗口不准导致音频被截断
✅ 自动找本地 Chrome(Playwright/Chrome/Edge)之前从 remotion.dev 下 Chrome 卡死 9.5/81MB
✅ 主讲人头像必须用户提供,禁止自动爬取之前自作主张扒了 karpathy.ai
✅ Title/Quote 场景自动隐藏底部字幕之前字幕和大标题重复显示
✅ 场景间 8 帧淡入淡出之前硬切生硬
✅ 多比例(16:9 / 9:16 / 1:1)之前只能横屏
✅ CLI 化(render.sh)之前要手动改源码
✅ 新增 code 模板(Mac 风窗口)YouTube 参考视频里常用

文件结构

~/.claude/skills/dialogue-video/
├── SKILL.md
├── prompts/storyboard-system.md # LLM 生成 storyboard 的系统 prompt
├── scripts/
│ ├── render.sh # 主入口
│ └── find-chrome.sh # 自动定位本地 Chrome
└── template/ # Remotion 项目骨架(render.sh 自动拷贝到 workdir)
├── package.json
├── src/
│ ├── index.ts
│ ├── Root.tsx
│ ├── lib.ts # 数据加载 + Scene 类型定义
│ ├── Storyboarded.tsx
│ └── scenes/
│ ├── common.tsx # ChapterChip / HostHeadshot / BottomCaption / Brand
│ └── Templates.tsx # 9 种场景模板
└── assets/
└── storyboard.example.json

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/skkeoriw/ai-skills/dialogue-video/badge)](https://verified-skill.com/skills/skkeoriw/ai-skills/dialogue-video)

Something wrong with this skill or its page? Tell us.