vidnote
Fetches Bilibili video metadata and subtitles, supports links, BV/av IDs, and multi-part videos, and can locally transcribe videos without captions to generate timestamped Markdown notes.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
$ vidnote fetch BV1xx411c7mD --whisper
✓ 已生成 2026-11-04_标题_BV1xx411c7mD.md (本地转写,412 条)打开就是这个样子:
---
title: 一个测试视频
platform: bilibili
bvid: BV1xx411c7mD
url: https://www.bilibili.com/video/BV1xx411c7mD
owner: 某UP
duration: 1:02:03
published: 2024-05-01
fetched: 2026-11-04
language: zh
subtitle: available
tags:
- bilibili
- vidnote
---
## 字幕
**00:00** 大家好,今天想聊一个很多人问过的问题。
**12:34** 这里是重点,我把它拆成三步。✨ 它能做什么
一条命令归档:链接、BV 号、av 号都支持识别,自动抓标题、UP 主、时长、发布时间、简介、标签。
分P 不迷路:多P 视频会记录当前在第几集,时间戳链接自动添加
&p=。字幕优先,转写兜底:视频有字幕就直接用;没有就在本机跑 Whisper,音频不出你的电脑。
时间戳可点:
[12:34](…?t=754),在 Obsidian、Logseq、浏览器里都能跳转。YAML frontmatter:字段固定,能被 Dataview 之类的工具直接查询、筛选、聚合。
Related MCP server: vid-agent-mcp
🚀 快速开始
pip install vidnote# 链接、BV 号、av 号都行
vidnote fetch "https://www.bilibili.com/video/BV1xx411c7mD"
# 第 2 个分P
vidnote fetch "https://www.bilibili.com/video/BV1xx411c7mD/?p=2"
# 只打印,不写文件
vidnote fetch BV1xx411c7mD --stdout
# 存到笔记库,并标记来源
vidnote fetch BV1xx411c7mD --dir ~/Notes/videos --source my-blog没装包也可以直接跑:
uvx vidnote fetch BV1xx411c7mD退出码
码 | 含义 |
| 成功 |
| 输入无法解析、接口报错、网络失败 |
| 缺少可选依赖(如转写所需的 whisper) |
| 目标文件已存在,且没有加 |
脚本里判断退出码即可,不需要解析输出。
🔊 没有字幕怎么办
B 站对字幕接口做了登录限制,未登录时大多数视频拿不到字幕。所以真正的主力是本地转写:
pip install 'vidnote[whisper]'
vidnote fetch BV1xx411c7mD --whisper流程:yt-dlp 取音频 → faster-whisper 在本机转写 → 生成带时间戳的笔记。音频不会上传到任何服务器。
首次运行会下载模型:
模型 | 大小 | 速度 | 建议 |
| 75 MB | 最快 | 只用来验证流程,中文质量差 |
| 145 MB | 快 | 英文内容 |
| 485 MB | 中等 | 中文内容,速度与准确率的平衡点 |
| 1.5 GB | 慢 | 对准确率要求高 |
vidnote fetch BV1xx411c7mD --whisper --model medium转写结果按 视频 + 分P + 模型 缓存在本地(Windows 在 %LOCALAPPDATA%\vidnote,其他系统在 ~/.cache/vidnote),同一个视频第二次跑秒出。加 --no-cache 可跳过。
🤖 给 agent 用
装上 MCP 依赖后,把 vidnote 注册成一个 MCP server:
pip install 'vidnote[mcp]'
vidnote serveClaude Code / Codex / Cursor 的配置:
{
"mcpServers": {
"vidnote": {
"command": "vidnote",
"args": ["serve"]
}
}
}agent 会多出一个工具 fetch_note:
参数 | 说明 |
| 链接、BV 号或 av 号 |
| 分P 序号,默认 1 |
| 是否包含简介,默认 |
| 没有字幕时是否本地转写,默认 |
🧭 设计原则
三条承诺,都能在代码里验证:只读公开接口,不模拟登录、不批量抓取;不编造内容,没有字幕就说没有,不会用模型编一段假的;不覆盖你的文件,笔记里可能有你手写的东西,除非你显式 --force。
❓ 常见问题
这个工具只读取公开的视频信息和匿名可访问的接口,不登录、不发布、不改动你的账号。但请控制请求频率,不要拿它做批量爬取。用 shell 循环处理很多视频时,加上 --delay 3,让两次请求之间等 3 秒。
不需要。转写在本地用 faster-whisper 跑,不联网、不调用任何云端模型。
换小模型(--model base 或 tiny)。长视频(1 小时以上)用 small 在普通笔记本上大约需要 10–20 分钟。
说明这个视频没有可用字幕,而你也没加 --whisper。工具会明确写出"没有可用字幕"。
暂不支持,见路线图,后续会更新
faster-whisper 依赖的 PyAV 在 14 之后改了接口,和部分版本不兼容。项目的 [whisper] 依赖已经锁定了可用版本,正常 pip install 不会踩到。
🗺 路线图
B 站单P/多P 抓取、字幕、时间戳
无字幕视频的本地转写
CLI + MCP
按简介里的时间点自动生成章节
批量:一个收藏夹 / 一个 UP 主的所有视频
抖音、小红书
导出为 SRT / VTT
🛠 开发
git clone https://github.com/paper-k1te/vidnote.git
cd vidnote
pip install -e '.[dev]'
pytest # 22 个测试
ruff check . # 代码检查CI 覆盖 Ubuntu 与 Windows,Python 3.10 / 3.12 / 3.13。
📄 许可证
MIT。可自由使用、修改、商用,保留版权声明即可。
English
vidnote turns a Bilibili video into a timestamped Markdown note: title, uploader, multi-part awareness, description, and a transcript — all in one portable file with clickable timestamps.
vidnote fetch "https://www.bilibili.com/video/BV1xx411c7mD" --whisperUses Bilibili's public web API; no login, no scraping workarounds.
If a video has no captions (most don't without a session), transcribe locally with
faster-whisper— audio never leaves your machine.Output is plain Markdown with YAML frontmatter, ready for Obsidian or any tool.
Ships a CLI and an MCP server (
vidnote serve) for coding agents.
MIT licensed.
This server cannot be deployed
Maintenance
Related MCP Connectors
Bilibili videos for AI agents: search, creators, trending, stats, tags and danmaku comments.
Summarize public video URLs into Markdown notes and read their transcripts.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
Transcripts, summaries, chapters and timestamped answers for video links, for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Bilibili (B站) platform through API and web scraping. Supports video search, article search, video info retrieval, comment fetching, danmaku extraction, and article content access.4-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to transcribe Bilibili videos, search by intent, and analyze local video files, returning structured summaries with key points and verdicts.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables probing, ingesting, transcribing, and searching Bilibili videos with timestamped evidence and frame extraction, without reading browser cookies.2 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables agents to turn Bilibili course videos into structured VitePress study notes by extracting subtitles, generating organized notes with key points and active recall, and saving them locally. It also supports video search and metadata retrieval through MCP tools.MIT