← Back to Skills Marketplace
wangjiaocheng

Video Transcript Method

by 波动几何 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
36
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install video-transcript-method
Description
视频文字稿提取方法。核心能力:将任何在线视频的语音内容提取为结构化文字稿(带时间戳+元信息+要点总结)。覆盖从视频URL解析、音频提取、CC字幕检测、Whisper语音识别、元信息获取、语义分段到结构化文字稿输出的全流程。通用方法,不绑定任何特定视频平台。触发词:视频文字稿、视频转文字、字幕提取、语音转录、vid...
README (SKILL.md)

视频文字稿提取方法

核心理念

视频的核心信息通常在语音中。文字稿提取的本质是从视频载体中剥离语音信息并结构化——先判断语音是否承载核心信息,再选择最高效的提取路径(CC字幕优先,Whisper兜底),最后按语义逻辑分段整理为可阅读的结构化文档。

CC字幕是UP主精心校对的,准确率接近100%;Whisper语音识别准确率约85-95%。有CC字幕时绝对优先用字幕,无字幕时才走Whisper。

适用范围广泛。 任何有语音的在线视频(B站、YouTube、抖音、播客、会议录像)都可以用本方法提取文字稿。


提取三步法

第一步:视频源定位与字幕检测

  1. 解析视频URL:识别平台(B站/YouTube/抖音/其他)、提取视频ID
  2. 获取元信息:标题、作者、播放量、发布时间、时长
  3. 检测CC字幕:查询是否有可用字幕(yt-dlp --list-subs
    • 有中文字幕(zh-Hans/zh)→ 直接下载字幕,跳过Whisper
    • 无字幕(danmaku是弹幕,不算字幕)→ 进入第二步

第二步:音频提取与语音识别

  1. 下载音频轨yt-dlp -f "bestaudio" --extract-audio --audio-format mp3
    • 音频轨一般不受画质/会员限制
    • SSL证书问题:设置 ssl._create_default_https_context = ssl._create_unverified_context
  2. Whisper语音识别(仅在无CC字幕时执行):
模型 大小 中文效果 适用场景
tiny 39M 快速预览
base 74M 一般 短视频(\x3C5min)
small 244M 较好 一般视频
medium 1.5G 推荐(默认)
large 3G 最佳 长视频/专业需求

默认使用medium模型;FP16不支持时自动降级FP32。

第三步:语义分段与要点提炼

  1. 去噪:去除重复内容、语气词、无意义段落
  2. 语义分段:按内容逻辑分段(非固定时长),每段有独立主题
  3. 章节标注:为每段生成章节标题和时间范围
  4. 要点提炼:提取核心观点,整理为要点表格
  5. 金句提取:提取原文中的关键金句
  6. 格式化输出:生成.txt(微信兼容)或.md文件

验证清单

提取完成后逐项验证,五项全部通过才算完成:

# 验证项 说明
1 ⬜ 内容完整性 覆盖视频的全部语音内容,无遗漏段落
2 ⬜ 时间戳准确 时间戳与视频实际进度对应(误差≤3秒)
3 ⬜ 语义分段合理 按内容逻辑分段,非机械按时间切割
4 ⬜ 要点提炼准确 要点总结忠实反映视频核心观点,无曲解
5 ⬜ 格式规范 输出格式符合目标平台要求

领域要求清单

T0-01 视频源定位

  • 必选组件: 视频URL、平台识别(B站/YouTube/抖音/其他)、BV号/视频ID
  • 可选组件: 视频标题、UP主/作者、播放量、发布时间、时长
  • 组装顺序: URL解析→平台识别→视频ID提取→元信息获取→信息确认
  • 约束: URL格式必须合法;平台必须被yt-dlp支持
  • 格式: 结构化信息块(Markdown)

T0-02 CC字幕检测与提取

  • 必选组件: 字幕可用性判定(是/否)、字幕语言、字幕格式
  • 可选组件: 字幕文件内容
  • 组装顺序: 字幕列表查询→可用语言判定→中文字幕优先→字幕下载→格式转换
  • 约束: danmaku弹幕不算字幕;未登录时可能无法获取CC字幕
  • 格式: SRT/JSON字幕文件或直接文本

T0-03 音频提取

  • 必选组件: 音频文件(mp3格式)、音频时长、文件大小
  • 可选组件: 音频质量、采样率
  • 组装顺序: 音频轨选择→下载→格式转换→文件验证
  • 约束: 音频轨不受画质限制;SSL问题需绕过;下载失败时重试1次
  • 格式: mp3文件

T0-04 语音识别转录

  • 必选组件: 转录文本(带时间戳)、识别语言、模型选择
  • 可选组件: 识别置信度
  • 组装顺序: 模型选择→音频输入→转录执行→时间戳对齐→结果输出
  • 约束: 默认使用medium模型;长视频分段处理
  • 格式: 带时间戳的文本

T0-05 语义分段与整理

  • 必选组件: 分段后文字稿(按内容逻辑分段)、章节标题、每段时间范围
  • 可选组件: 关键词标注
  • 组装顺序: 原始转录→去噪→语义分段→章节标题标注→时间范围对齐
  • 约束: 分段基于语义而非固定时长;每段应有独立主题;时间范围必须连续覆盖
  • 格式: 结构化Markdown

T0-06 要点提炼与输出

  • 必选组件: 要点总结表格(方法/要点+核心思路+具体操作)、金句提取、输出文件
  • 可选组件: 延伸阅读建议
  • 组装顺序: 全文通读→核心观点提取→要点表格生成→金句提取→格式化输出→文件保存
  • 约束: 要点必须忠实原文,不可曲解;金句必须是原文原话
  • 格式: .txt(微信兼容)或 .md

领域范本

TF-01 文字稿提取范本

对应任务: T0-01 ~ T0-06

适用场景: 任何在线视频需要提取为结构化文字稿

提取范本:

## 文字稿提取记录

### Step 1:视频源定位(T0-01)

**视频URL**:________
**平台**:________(B站/YouTube/抖音/________)
**视频ID**:________

| 字段 | 值 |
|------|-----|
| 标题 | ________ |
| 作者 | ________ |
| 播放量 | ________ |
| 发布时间 | ________ |
| 时长 | ________ |

### Step 2:字幕检测(T0-02)

**CC字幕可用**:⬜是 / ⬜否
**字幕语言**:________
**提取路径**:⬜CC字幕直接提取 / ⬜Whisper语音识别

### Step 3:音频提取与识别(T0-03/T0-04)

**音频文件**:________
**识别模型**:________(tiny/base/small/medium/large)

### Step 4:语义分段(T0-05)

| 章节 | 时间范围 | 主题 | 核心内容 |
|------|---------|------|---------|
| ________ | [00:00-03:15] | ________ | ________ |
| ________ | [03:15-08:42] | ________ | ________ |
| ... | ... | ... | ... |

### Step 5:要点提炼(T0-06)

| 方法/要点 | 核心思路 | 具体操作 |
|-----------|---------|---------|
| ________ | ________ | ________ |
| ________ | ________ | ________ |

**金句**: "________"

**输出文件**:________(.txt/.md)

范本要点:

  • 有CC字幕绝对优先,无字幕才走Whisper
  • 语义分段按内容逻辑而非固定时长
  • 要点必须忠实原文,金句必须是原话
  • 验证五项必须全部通过
  • ________ 为待用户提供的内容,不可AI编造

工具链

音频下载(yt-dlp)

yt-dlp -f "bestaudio" --extract-audio --audio-format mp3 -o "\x3Coutput_dir>/audio.%(ext)s" "\x3C视频URL>"

CC字幕检测

yt-dlp --list-subs "\x3C视频URL>"

元信息获取

通过WebFetch获取视频标题、作者、播放量等元信息。

语音识别(Whisper)

使用scripts/transcribe.py执行Whisper语音识别。


使用规则

  1. 判断是否值得提取:检查视频语音是否承载核心信息
  2. 按三步执行:视频源定位→音频提取与识别→语义分段与提炼
  3. 产出交付:按领域要求清单逐项填充,或按TF-01范本结构替换实际内容
  4. 用户主权:AI产出的文字稿是起点,用户对分段、要点、金句有调整权

事实纪律

  1. 视频平台支持范围必须基于yt-dlp实际能力,不得夸大
  2. Whisper识别准确率标注为"参考范围",实际效果取决于音频质量
  3. 涉及版权的内容提取必须提醒用户注意版权合规
  4. 要点提炼必须基于实际转录内容,不可凭空编造
Usage Guidance
Install only if you are comfortable having the agent fetch user-provided video URLs, download audio or subtitles, and create transcript files locally. Use a deliberate output directory, consider copyright and privacy before processing third-party or sensitive videos, and avoid disabling SSL verification unless absolutely necessary.
Capability Assessment
Purpose & Capability
The stated purpose is to extract structured transcripts from online videos, and the artifacts consistently describe URL parsing, subtitle detection, audio download, Whisper transcription, segmentation, and local transcript output.
Instruction Scope
The skill clearly shows yt-dlp, WebFetch, Whisper, and local output steps, but it could more explicitly prompt users before fetching remote URLs or saving generated audio/transcript files.
Install Mechanism
The package contains SKILL.md and one helper Python script; metadata shows no declared package dependencies, no install hook, and clean static, dependency-registry, and VirusTotal telemetry.
Credentials
Network access and local file writes are expected for video transcription. The helper script disables SSL certificate verification globally, which is a security weakness users should avoid unless they understand the risk.
Persistence & Privilege
No background workers, privilege escalation, autostart behavior, credential/session access, or broad local indexing were found; the script writes only to the user-supplied output path when explicitly run.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install video-transcript-method
  3. After installation, invoke the skill by name or use /video-transcript-method
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
video-transcript-method v1.0.0 - Initial release offering a structured, platform-agnostic method to extract transcripts from any online video. - Supports extraction of audio, detection and download of CC subtitles, and fallback to Whisper speech recognition for automatic transcription. - Provides step-by-step workflow: video source parsing, metadata retrieval, subtitle check, audio download, speech-to-text, semantic segmentation, and output formatting with timestamps and chaptering. - Includes detailed verification and domain requirement checklists to ensure completeness, accuracy, and structured output. - Offers a standard template and best practices for handling both subtitle-based and speech-recognition-based transcript creation. - Focuses on user control and copyright compliance throughout the extraction process.
Metadata
Slug video-transcript-method
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Video Transcript Method?

视频文字稿提取方法。核心能力:将任何在线视频的语音内容提取为结构化文字稿(带时间戳+元信息+要点总结)。覆盖从视频URL解析、音频提取、CC字幕检测、Whisper语音识别、元信息获取、语义分段到结构化文字稿输出的全流程。通用方法,不绑定任何特定视频平台。触发词:视频文字稿、视频转文字、字幕提取、语音转录、vid... It is an AI Agent Skill for Claude Code / OpenClaw, with 36 downloads so far.

How do I install Video Transcript Method?

Run "/install video-transcript-method" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Video Transcript Method free?

Yes, Video Transcript Method is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Video Transcript Method support?

Video Transcript Method is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Video Transcript Method?

It is built and maintained by 波动几何 (@wangjiaocheng); the current version is v1.0.0.

💬 Comments