Skip to content
Back to skills

vsum

ASecurity

视频/音频 → 可逐秒引用的逐字稿 + 带出处的摘要。用户给出本地视频/音频文件,或抖音/B站/YouTube 链接,要求转写、总结、提炼要点、核对专有名词时使用。

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 22, 2026
toolspythonbash

Works with

  • cli

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned November 23, 2026

npx -y skills add mudwing-chen/vsum --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of vsum?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for vsum
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mudwing-chen-vsum/badge)](https://www.skillsdirectory.com/skills/mudwing-chen-vsum)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: vsum
description: 视频/音频 → 可逐秒引用的逐字稿 + 带出处的摘要。用户给出本地视频/音频文件,或抖音/B站/YouTube 链接,要求转写、总结、提炼要点、核对专有名词时使用。
license: MIT
---

# vsum

一条命令把视频变成能引用的文字稿:每段一行带 `[mm:ss]`,摘要每条都能回查到原文。

## 0. 先看环境

```bash
vsum doctor        # python / ffmpeg / faster-whisper / 设备 / 浏览器,缺什么直接说
```

vsum 不锁 av 版本(它自己用 ffmpeg 抽 wav、按数组喂模型),装不上再看 [references/troubleshoot.md](references/troubleshoot.md)。

## 1. 主路径

```bash
vsum <文件或链接> -o out/
```

| 输入 | 说明 |
|---|---|
| 本地文件 | mp4 / mkv / mov / m4a / wav / mp3 都行,ffmpeg 能解的都能转 |
| 抖音 / B站 / YouTube 链接 | 需要 `pip install '.[browser,yt]'`;抖音先 `vsum login douyin` 扫码一次 |

产物在 `out/`:`transcript.md`、`summary.md`、`result.json`、`segments.json`、`transcript.srt/.vtt/.txt/.plain.txt`、`manifest.json`、`export.source.json`。

常用参数:`--model tiny|base|small|medium|large-v3`(默认 small,或传本地模型目录;没显卡别用 medium,13:47 的视频要 30 分钟以上)、`--lang zh`、`--summary extractive|llm|none`、
`--clean`、`--force`、`--json`(stdout 只一行结果)、`--quiet`、`--browser auto|chrome|edge|safari`、`--headless`、`--profile`。

转写慢:先用 `vsum bench --audio <样例>` 量本机 RTF,再决定模型;长音频放后台跑,别在前台等。

## 2. 读稿顺序

1. `summary.md` — 当草稿看。回查只保证每条有出处,不保证摘得对。
2. `transcript.md` — 结论以它为准。每段一行,`[mm:ss]` 是引用锚点;带 `⚠` 的段是低置信(全片 `avg_logprob` 最低 10%,按排名取)。
3. `result.json` — `counts`、`summary.dropped`(回查被删的条数)、`warnings`。

要**定位原文**别翻文件,直接搜:

```bash
vsum find out/ "关键词" --context 1     # 命中项带 [mm:ss] 和上下文
vsum clip out/ 03:41 -o clip.mp4        # 把那一秒前后剪出来听
```

`segments.json` 里有每段的 `temperature`:非 0 说明这段走了温度回退,文本比前一段更不可靠。

引用只写 `[mm:ss]`,不要写「第 N 段」——异常 cue 被修正后,段号与字幕条目号会错开(映射记在 `manifest.warnings.invalid_cues`)。

## 3. 专有名词

转写对插件名、包名、人名几乎必错,换大模型也不解决(实测 small 与 medium 错法一致)。
**画面上出现的拼写是权威的**,所以先抽帧 OCR 再改:

```bash
pip install 'vsum[ocr]'              # 一次性
vsum ocr out/                        # 抽低置信帧 + OCR,出 ocr.md / ocr.json
vsum ocr out/ --every 30             # 扫标题卡/信息卡
vsum fix out/                        # 预演
vsum fix out/ --apply                # 只写 high 置信
vsum fix out/ --apply --apply-medium # 连人工确认过的 medium 一起写
vsum export --segments out/segments.fixed.json -o out2/
```

`ocr.md` 有两节:**候选修正**(画面上的拼写 vs 转写,带相似度和时间)和**逐帧对照**
(含逐字差异,比如「加奖」→「嘉奖」、「巴塞罗大」→「巴塞罗那」)。
字幕与语音常差一句,所以对照是按「时间窗里最像的那段」配的,不是「包含这一秒的那段」。

`medium` 默认只报不改;置信度是人工标签不是概率;细节见 [references/terms.md](references/terms.md)。

## 4. 总结(重写摘要时)

`vsum` 已默认产出抽取式摘要。要重写就覆盖 `summary.md`,并**保留每条要点的 `[mm:ss]`**:

1. 一句话摘要
2. 故事线 / 论证结构
3. 最动人的细节 / 关键数据
4. 主题
5. 转写不确定处(标「未能核实」,不要硬编)

用户只要要点时省略第 3 节。要机器生成走 `--summary llm --llm-url <OpenAI 兼容 base> --llm-model <名字>`,失败会自动退回抽取式。

## 5. 批量与只抓取

```bash
vsum batch urls.txt -o out/batch      # 一行一条;也收 index.json({"items":[{"href":...}]})
vsum fetch "<链接>" -o out/x          # 只下载视频,不转写
```

`batch` 串行、目录名 `<平台>-<id>`、已有 `ok` 的 `result.json` 就跳过、失败不中断(退出码 5)。连续失败两次就停手,抖音风控越试越久。

## 6. 失败对照

| 症状 | 处置 |
|---|---|
| `vsum doctor` 报 ffmpeg 缺失 | 装 ffmpeg 并放进 PATH;抽音频要用 |
| 链接连续失败 / 风控 | 先 `vsum login douyin` 重登;还不行就请用户给本地文件 |
| 模型下载失败(HF 连不上) | `set HF_ENDPOINT=https://hf-mirror.com`,或用 `--model <本地模型目录>` |
| 显存不足 | 降 `--model` 或设 `WHISPER_COMPUTE=int8` |
| 字幕条目少于段数 | 正常:空文本 / 负时间 / 零时长被修正,`invalid_cues` 有逐条记录 |

更多: [references/troubleshoot.md](references/troubleshoot.md)(依赖与故障)、[references/platform.md](references/platform.md)(浏览器、登录、风控、批量)。

## 文件地图

| 路径 | 内容 |
|---|---|
| `vsum/` | Python 包:CLI、抓取、转写、导出、摘要、术语、评测 |
| `tests/` | 回归测试,零第三方依赖 |
| `references/platform.md` | 浏览器与平台抓取、风控、批量 |
| `references/terms.md` | 抽帧核查、词表、`vsum fix` |
| `references/troubleshoot.md` | 依赖、故障对照、macOS 注意 |

Files in this skill

  • SKILL.md4.6 KB
  • pyproject.toml1 KB
  • references/platform.md4.6 KB
  • references/terms.md4.1 KB
  • references/troubleshoot.md3.8 KB
  • tests/_tmpdir.py565 B
  • tests/test_batch.py4.3 KB
  • tests/test_browser.py3.5 KB
  • tests/test_cli.py4.9 KB
  • tests/test_eval.py1.4 KB
  • tests/test_exports.py5.7 KB
  • tests/test_fetch.py3.9 KB
  • tests/test_hardware.py3.1 KB
  • tests/test_holdout.py4.3 KB
  • tests/test_loop.py6 KB
  • tests/test_p2.py5.8 KB
  • tests/test_summary.py5.2 KB
  • tests/test_terms.py14.1 KB
  • tests/test_transcribe.py2.3 KB
  • vsum/__init__.py665 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.