← 返回 Skills 市场
54lynnn

Bilibili Transcript

作者 54Lynnn · GitHub ↗ · v2.2.0 · MIT-0
cross-platform ⚠ suspicious
1057
总下载
2
收藏
5
当前安装
22
版本数
在 OpenClaw 中安装
/install bilibili-transcript
功能描述
Transcribe Bilibili videos to text with high accuracy using Whisper medium model. Use when the user provides a Bilibili video URL (BVxxxxx) and wants to: (1)...
使用说明 (SKILL.md)

Bilibili Transcript v2.2

High-accuracy Bilibili video transcription with multi-language AI subtitle support.

Overview

This skill provides a complete transcription workflow for Bilibili videos:

  1. Extract Video Metadata - Title, author, publish date, duration
  2. Smart Subtitle Detection - Priority: CC subtitles → AI subtitles (multi-language) → Whisper transcription
  3. Multi-language AI Subtitle Support - Auto-detects: ai-zh, ai-en, ai-ja, ai-es, ai-ar, ai-pt, ai-ko, ai-de, ai-fr
  4. Browser Cookie Support - WSL Chromium or Windows Edge for member-only videos
  5. Formatted Output - Saves as structured TXT file with metadata + summary placeholder + full transcript
  6. Simplified Chinese - Automatically converts Traditional to Simplified Chinese

What's New in v2.2

  • Fixed cookie detection - Now uses browser config directory instead of SQLite file (avoids encoding errors)
  • One-stop solution - CC subtitles → AI subtitles → Whisper transcription, all in one script
  • Better WSL support - Automatically detects WSL Chromium and Windows Edge cookies
  • Smart fallback - Seamlessly switches between subtitle sources without user intervention

What's New in v2.1

  • Improved cookie handling - Fixed UTF-8 encoding issues with snap Chromium
  • Three-tier fallback - CC subtitles → AI subtitles → Whisper transcription
  • Better error handling - Gracefully degrades when cookie sources fail

What's New in v2.0

  • Multi-language AI subtitles - Supports 9 languages: Chinese, English, Japanese, Spanish, Arabic, Portuguese, Korean, German, French
  • WSL Chromium support - Better cookie extraction than Windows Edge
  • Correct subtitle download - Uses --write-subs --write-auto-subs combo
  • Language auto-detection - Automatically finds available AI subtitle language

AI Subtitle Language Codes

Bilibili uses ai- prefix for AI-generated subtitles:

Code Language 语言
ai-zh Chinese 中文
ai-en English 英文
ai-ja Japanese 日文
ai-es Spanish 西班牙文
ai-ar Arabic 阿拉伯文
ai-pt Portuguese 葡萄牙文
ai-ko Korean 韩文
ai-de German 德文
ai-fr French 法文

Requirements

Hardware (Your Setup)

  • GPU: NVIDIA RTX 4070 Super (12GB VRAM) - ✅ Perfect for medium model
  • WSL Memory: 16GB (configured)
  • WSL CPU: 6 cores (configured)

Software

  • yt-dlp - Video/audio download
  • ffmpeg - Audio processing
  • whisper - Speech-to-text (local, no API key)
  • opencc - Traditional to Simplified Chinese conversion (optional)

Browser (for AI subtitles)

  • WSL Chromium (recommended) - Log in to Bilibili in WSL
  • Windows Edge - Alternative option

Workflow

Step 1: Run Transcription Script

./scripts/bilibili_transcript.sh "https://www.bilibili.com/video/BVxxxxx"

Priority order:

  1. CC Subtitles (manual) - Fastest, highest accuracy
  2. AI Subtitles (auto-generated) - Fast, good accuracy, multi-language
  3. Whisper Transcription - Slowest, ~95% accuracy, works for all videos

Step 2: Generate Detailed Summary

After the script completes, read the generated TXT file and:

  1. Read the full transcript (第二部分)
  2. Generate a comprehensive summary (第一部分)
  3. Save the updated file

Step 3: Present to User

In Discord, post:

  • Brief summary in message
  • Attach the TXT file for full content

Setup WSL Chromium Login

For best results with AI subtitles:

  1. Start WSL Chromium:

    chromium-browser &
    
  2. Navigate to bilibili.com

  3. Log in with your Bilibili account

  4. Run the transcription script

The script will automatically use Chromium's cookies to access member-only AI subtitles.

Usage Examples

Example 1: Basic Transcription (Default Output)

./scripts/bilibili_transcript.sh "https://www.bilibili.com/video/BV1Z1wJzgEAj/"
# Output: workspace/Bilibili transcript/[VideoTitle]_BVxxxxx_transcript.txt

Example 2: Custom Output Directory

./scripts/bilibili_transcript.sh "https://www.bilibili.com/video/BV1Z1wJzgEAj/" ~/Documents

Notes

Model Selection

  • Your config: RTX 4070 Super 12GB + 16GB RAM + 6 cores
  • Default: medium model (~95% accuracy, balanced speed) ✅
  • Fallback: If GPU unavailable, automatically uses CPU (slower)

Accuracy Comparison

Source Accuracy Speed Best For
CC Subtitles 100% ⚡ Instant All videos with manual subtitles
AI Subtitles (ai-zh) ~90% ⚡ Instant Chinese videos
AI Subtitles (ai-en) ~85% ⚡ Instant English videos
Whisper medium ~95% 🐢 Slow No subtitle videos

Default Output Directory

  • Location: workspace/Bilibili transcript/
  • Created automatically on first run
  • All transcript files organized in one place

File Naming

Output files are named: [VideoTitle]_[BVID]_transcript.txt

  • Special characters (including Chinese punctuation) are replaced with underscores
  • Title truncated to 50 characters
  • Example: 股票分红_是从左口袋掏右口袋吗_BV1ddzUYTE27_transcript.txt

Subtitle Priority

The script tries subtitles in this order:

  1. Manual CC subtitles (zh-CN, zh-TW, en, ja, etc.)
  2. AI subtitles (any available language: ai-zh, ai-en, ai-ja, etc.)
  3. Whisper voice transcription (fallback)

This ensures fastest processing while maintaining high accuracy.

安全使用建议
What you should consider before installing or running this skill: - The script will attempt to read browser cookies (via yt-dlp --cookies-from-browser) to access member-only AI subtitles. That means local authentication cookies from Chromium/Edge may be read; if you are uncomfortable exposing those cookies to a third-party script, do not run it or run without cookie support. - The documentation and implementation disagree in a few places: README version (2.8.0) differs from registry (2.2.0); SKILL.md claims a default 'workspace/Bilibili transcript/' folder while the script defaults to /tmp; registry metadata lists no required binaries while the script requires yt-dlp, whisper, possibly ffmpeg and python3. Treat these as signs you should inspect the script before use. - The script probes the filesystem (e.g., lists /mnt/c/Users) to find Windows profile paths. If you run this on a multi-user or sensitive system, consider running it in a container or VM to avoid leaking local usernames or browser profiles. - If you trust the author and want full functionality, ensure yt-dlp, whisper and ffmpeg are installed from trusted sources. If you only want non-authenticated transcripts, run the script in no-cookie mode or remove the cookie-detection block. - If you are unsure, run the script in an isolated environment (container or throwaway VM), or manually step through the script to confirm behavior; the code is short and readable but performs sensitive local file access. Additional actions that would increase confidence: confirm the authoritative source/homepage and a stable matching version, or have the author update registry metadata to declare required binaries and the intended default output path.
功能分析
Type: OpenClaw Skill Name: bilibili-transcript Version: 2.2.0 The skill's primary script, `scripts/bilibili_transcript.sh`, automatically searches for and accesses sensitive browser cookie databases from both WSL Chromium and Windows Edge (via `/mnt/c/Users/`) to authenticate video downloads. While this behavior is documented in `SKILL.md` as a means to access member-only Bilibili content, the automated extraction of browser credentials represents a significant security risk. No evidence of intentional data exfiltration to external servers was found, but the capability to access host-system browser data warrants a suspicious classification.
能力评估
Purpose & Capability
Name/description match the actual script: it downloads subtitles or audio from Bilibili and transcribes with Whisper. However registry metadata says no required binaries while SKILL.md/README clearly require yt-dlp, whisper, ffmpeg and optionally opencc; README also lists a different version (2.8.0) than registry (2.2.0). SKILL.md claims default output folder 'workspace/Bilibili transcript/' but the script defaults OUTPUT_DIR to /tmp — documentation and implementation are inconsistent.
Instruction Scope
The runtime script probes local environment: it lists /mnt/c/Users to detect a Windows user and reads browser profile directories (WSL Chromium path and Windows Edge user data) to pass to yt-dlp's --cookies-from-browser. That means the script will attempt to read browser cookies (auth tokens) for member-only content. This is privacy-sensitive but is coherent with the stated goal of accessing member-only AI subtitles; still the script automatically searches for cookie locations without explicit interactive consent beyond 'log in in browser'.
Install Mechanism
No install spec is present (instruction-only plus a shell script). No remote downloads or archive extraction are performed by the skill itself. The script relies on external binaries (yt-dlp, whisper, etc.) already on the host.
Credentials
No environment variables or external credentials are declared, which is good, but the script accesses local browser cookie stores via yt-dlp --cookies-from-browser and probes /mnt/c/Users. Those actions grant access to authentication cookies and reveal local usernames/profile paths. This access is proportionate to the stated need (member-only subtitles) but is sensitive and not explicitly reflected in registry 'required config paths' metadata.
Persistence & Privilege
The skill is not always-enabled and does not request elevated privileges or modify other skills or system-wide configuration. It writes transcript files to an output directory (default /tmp or user-specified).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bilibili-transcript
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bilibili-transcript 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.2.0
**bilibili-transcript v2.2.0 Changelog** - Fixed cookie detection: now uses the browser config directory to avoid encoding errors. - Streamlined workflow: automatically prioritizes CC subtitles, then AI subtitles, then Whisper transcription in a single script. - Improved WSL support: auto-detects both WSL Chromium and Windows Edge cookies. - Smarter fallback: seamlessly switches between available subtitle and transcription sources.
v2.16.0
Fix: Add fallback for empty duration display. Current file fixed to show '13分18秒'.
v2.15.0
Bug fixes: Fix empty duration display in TXT file. Improve filename handling to reduce UTF-8 truncation artifacts.
v2.14.0
Restructure TXT output into three clear sections: (1) Video Info with all metadata, (2) Summary generated from transcript, (3) Full transcript text.
v2.13.0
Improve duration format in filename: use 'XX时XX分XX秒' for videos >1 hour, 'XX分XX秒' for shorter videos.
v2.12.0
Fix: Use safer UTF-8 handling for filenames. Limit title to 40 chars and simplify duration format to avoid truncation artifacts.
v2.11.0
New filename format: Title_Author_Date_Duration_BVid.txt. Auto-generate video summary from transcript content. Discord preview shows brief summary.
v2.10.0
Fix: Improve filename sanitization with iconv UTF-8 handling. Extended max filename length to 80 chars.
v2.9.0
Lazy loading: Only check/install Whisper when voice transcription is actually needed. Most videos with subtitles work without Whisper installed.
v2.8.0
Complete Whisper model support: add tiny, small models. Now supports all 5 models (tiny/base/small/medium/large) with time estimation for each.
v2.7.0
Add interactive Whisper model selection with time estimation. Shows GPU info, estimated time for each model (base/medium/large), and lets user choose. Use -m or --model to pre-select, or -y for auto mode.
v2.6.0
Add language priority selection: use -l or --lang to specify AI subtitle language order. Example: -l en,zh for English first, then Chinese.
v2.5.0
Major update: Add multi-language AI subtitle support (ai-zh, ai-en, ai-ja, ai-es, ai-ar, ai-pt, ai-ko, ai-de, ai-fr). Add WSL Chromium cookie support.
v1.6.0
Add Windows Edge cookie support: automatically detects and uses Edge browser cookies for accessing member-only AI subtitles
v1.5.0
Add AI auto-subtitle support: prioritize Bilibili AI subtitles for faster transcription, fallback to manual subtitles, then Whisper
v1.4.0
Fix: Handle Chinese punctuation in filenames (?!,、;:''()【】《》) to prevent encoding issues
v1.3.0
Fix: Use video title as filename, properly extract video metadata (title, author, publish date) from Bilibili
v1.2.0
Update: default Whisper model changed to medium, default output directory set to 'Bilibili transcript' folder
v2.1.0
v2.1.0: Switch to medium model for balanced speed/accuracy (~95%, 5GB VRAM, much faster than large)
v2.0.0
v2.0.0: Use Whisper large model with GPU, output formatted TXT file with metadata, auto convert to Simplified Chinese
元数据
Slug bilibili-transcript
版本 2.2.0
许可证 MIT-0
累计安装 5
当前安装数 5
历史版本数 22
常见问题

Bilibili Transcript 是什么?

Transcribe Bilibili videos to text with high accuracy using Whisper medium model. Use when the user provides a Bilibili video URL (BVxxxxx) and wants to: (1)... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1057 次。

如何安装 Bilibili Transcript?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bilibili-transcript」即可一键安装,无需额外配置。

Bilibili Transcript 是免费的吗?

是的,Bilibili Transcript 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Bilibili Transcript 支持哪些平台?

Bilibili Transcript 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Bilibili Transcript?

由 54Lynnn(@54lynnn)开发并维护,当前版本 v2.2.0。

💬 留言讨论