leoyishou/personal-ai-company/video-chapter-nav
Claude Code and agent skill by leoyishou/personal-ai-company
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
为视频自动添加动态章节导航条。使用 ASR 转录音频,LLM 分析内容生成章节,生成 .ass 字幕并烧录到视频中。支持火山引擎 ASR 和 Whisper。
Install
npx vskill@latest install leoyishou/personal-ai-company/video-chapter-navSKILL.md
The same SKILL.md was published earlier as leoyishou/personal-ai-company/video-chapter-nav.
视频章节导航条生成器
自动为视频添加动态章节导航条,让观众一目了然当前进度。
一键生成
工作流程
- 音频提取: FFmpeg 提取 16kHz 单声道 WAV
- 语音转文字: 火山引擎 ASR 或 Whisper (自动选择)
- 章节分析: OpenRouter (Gemini) 分析内容,生成章节标题和时间点
- 字幕生成: 生成带动态高亮的 .ass 特效字幕
- 视频合成: FFmpeg 将字幕烧录到视频
核心参数
| 参数 | 说明 | 默认 | |
|---|---|---|---|
video | 输入视频路径 | 必填 | |
-o, --output | 输出视频路径 | 自动生成 | |
-n, --chapters | 章节数量 | 4 | |
--asr | ASR 引擎 (auto/whisper/volcengine) | auto | |
--position | 导航条位置 (bottom/top) | bottom | |
--dry-run | 试运行,不执行 | - |
环境配置
必需
可选 - 火山引擎 ASR
如果配置了火山引擎,优先使用(更快更准):
获取方式:火山引擎控制台 → 创建应用 → 获取 APP ID 和 Access Token
未配置火山引擎
自动使用 Whisper (需要安装 openai-whisper):
导航条效果
导航条显示在视频底部(或顶部),格式如:
随着视频播放,高亮会自动切换到当前章节。
使用示例
在 Claude Code 中
命令行
输出
默认输出文件名为 {原文件名}_with_chapters.mp4,与原视频同目录。
依赖
- FFmpeg: 音频提取、视频合成 (
brew install ffmpeg) - Python 3.10+
- requests: HTTP 请求
- openai-whisper (可选): 本地语音识别
安装依赖:
故障排查
| 问题 | 解决方案 | |
|---|---|---|
| FFmpeg 未找到 | brew install ffmpeg | |
| ASR 失败 | 检查网络;使用 --asr whisper | |
| LLM 失败 | 检查 OPENROUTER_API_KEY | |
| 字幕不显示 | 检查视频编码是否兼容 | |
| 中文乱码 | 确保系统有 PingFang 字体 |
技术说明
ASS 字幕格式
使用 ASS (Advanced SubStation Alpha) 格式实现动态高亮:
- 定义 Active/Inactive 两种样式
- 每个时间段生成一行字幕事件
- 使用
{\rStyle}语法切换样式
为什么不用 PNG 图片叠加?
.ass 字幕方案的优势:
- 渲染速度快(FFmpeg 原生支持)
- 不需要生成中间文件
- 文件体积小
- 更容易调整样式
相关文件
- 主脚本:
~/.claude/skills/video-chapter-nav/scripts/chapter_nav.py - 依赖:
~/.claude/skills/video-chapter-nav/scripts/requirements.txt
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
- SKILL.md in the repositoryCheckingclaude-global/skills/_archived/video-chapter-nav/SKILL.md
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
[](https://verified-skill.com/skills/leoyishou/personal-ai-company/video-chapter-nav)