Bilibili & YouTube Video Summarizer: Transforming Long Videos into Transcripts and Structured Summaries with Agent Skill

Foreword

Technical sharing sessions, course replays, and interviews often last for tens of minutes. If you just want to confirm “what was discussed” or extract a few key points, watching the entire segment is costly; relying only on platform-built subtitles often results in missing subtitles, poor machine translation quality, or script failures caused by changes in scraping strategies for Bilibili and YouTube.

Below we introduce a community Skill on SkillHub called Bilibili & YouTube Video Summarizer (coordinate: @user_06b53f10/bilibili-youtube-video-summarizer). Within Agent conversations, it follows a fixed workflow to fetch content from Bilibili or YouTube, obtains text using faster-whisper or a subtitle API, and then has the model translate (non-Chinese content) and generate a structured summary. SkillHub categorizes it under knowledge-management, with a tag indicating requires_api_key=false; the current page version is v1.0.0 (the SKILL.md inside the skill package self-describes version 3.2.1, author pomisun).

What Is This

Bilibili & YouTube Video Summarizer is a video/audio fetching and transcription Skill designed for Agents: it obtains audio or subtitles from bilibili and YouTube, transcribes them into text, and guides the model to output summaries and notes.

  • Source: SkillHub community, publisher user_06b53f10
  • License: MIT (see skill package SKILL.md)
  • Runtime environment: Python >= 3.10; core dependencies include ffmpeg, faster-whisper, as well as platform-specific tools like bilibili-api-python, yt-dlp, deno, youtube-transcript-api, etc. (see environment check script description)

The entire pipeline can be summarized as: video → audio/subtitles → text transcription → translation (if non-Chinese) → structured summary.

Core Features

The following capabilities are from the official introduction and the skill package’s SKILL.md:

  1. Dual-platform URL recognition: supports bilibili.com, b23.tv (short links require the Agent to use web_fetch to resolve the actual BV link), youtube.com, youtu.be.
  2. Bilibili audio download: uses scripts/download.py via bilibili-api, downloads default low-bitrate audio and automatically converts to mp3; optional --page for multi-part videos, --quality high, --sessdata for login state.
  3. YouTube subtitle-first: when subtitles exist, uses scripts/fetch_subtitle.py (youtube-transcript-api); when no subtitles, falls back to download.py (usually requires browser cookies, documentation example uses --browser edge).
  4. Transcription: scripts/transcribe.py defaults to faster-whisper with built-in VAD silence filtering; documentation states it’s about 3–4x faster than the original Whisper; optional --engine openai fallback; outputs txt/md/srt/vtt.
  5. Non-Chinese content: Agent translates subtitles or transcriptions into Simplified Chinese (documentation explicitly does not recommend relying on YouTube’s built-in Simplified Chinese translation).
  6. Summary template: organizes output by basic info, chapter-by-chapter key points, key data, actionable recommendations, terminology mapping, etc.
  7. Natural language triggers: e.g., “video summary”, “transcribe video”, “what does this video talk about”, “Bilibili scraping”, “YouTube subtitles”, etc. (complete list see SkillHub introduction).

Installation and Activation

1. Install SkillHub CLI (if not already installed)

command -v skillhub && skillhub --version

If not installed, follow the SkillHub installation instructions:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

2. Install this Skill to the current Agent’s skills directory

When installing, you must use --dir to point to the directory actually read by the Agent; otherwise, it may default to ./skills/ and not be recognized. Common paths (excerpted from SkillHub installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

Installation command:

skillhub install @user_06b53f10/bilibili-youtube-video-summarizer --dir ~/.cursor/skills/

Replace ~/.cursor/skills/ with the directory corresponding to your current client. You can also pass the following prompt to the AI to have it complete the installation according to the documentation:

Please follow https://skillhub.cn/install/skillhub.md to install `@user_06b53f10/bilibili-youtube-video-summarizer`.

3. First-time environment check

After installation, run a self-check on scripts/check_env.py in the skill directory; when dependencies are missing, you can try automatic Python package installation with --fix:

python <skill-path>/scripts/check_env.py
python <skill-path>/scripts/check_env.py --fix

<skill-path> is the skill root directory after installation, e.g., ~/.cursor/skills/@user_06b53f10/bilibili-youtube-video-summarizer.

Typical Usage

Provided the Agent has loaded this Skill, you can trigger the full workflow with trigger words plus a link; the Agent will call scripts according to SKILL.md. Below are reproducible command examples consistent with the documentation (replace paths with your local <skill-path>).

Environment self-check

python <skill-path>/scripts/check_env.py --fix

Bilibili: Download audio and transcribe

python <skill-path>/scripts/download.py --url "https://www.bilibili.com/video/BVxxx" --output "./output/video1"
python <skill-path>/scripts/transcribe.py --input "./output/video1.mp3" --output "text.md" --format md --language zh

YouTube: Try subtitles first (recommended)

python <skill-path>/scripts/fetch_subtitle.py --url "https://www.youtube.com/watch?v=xxx" --list
python <skill-path>/scripts/fetch_subtitle.py --url "https://www.youtube.com/watch?v=xxx" --output "sub.md" --lang en --format md

YouTube: Download audio when no subtitles

python <skill-path>/scripts/download.py --url "https://www.youtube.com/watch?v=xxx" --output "./output/yt1" --browser edge
python <skill-path>/scripts/transcribe.py --input "./output/yt1.mp3" --output "text.md" --format md --language zh

Conversation-side examples (no need to memorize parameters, Agent handles orchestration):

  • “Help me summarize this Bilibili video: https://www.bilibili.com/video/BVxxx”
  • “What does this YouTube video talk about? https://www.youtube.com/watch?v=xxx”
  • “Convert this English video to Chinese subtitles and write video notes”

After the above steps, the model will complete translation (if needed) based on the transcription or subtitles and output a summary following the Skill’s agreed structure.

Use Cases and Notes

Who it’s for

  • Developers and learners who need to quickly turn long Bilibili/YouTube videos into transcripts, notes, or bullet-point lists.
  • Users already working in Skills-supporting environments like Cursor, Claude Code, Codex, who want to handle anti-scraping and transcription details with unified scripts.

Limitations and pitfalls (see skill package references/pitfalls.md)

  • Bilibili: Do not use yt-dlp directly; b23.tv short links must be resolved first with web_fetch—don’t expect scripts to handle short links directly.
  • YouTube downloads: Audio downloads are often blocked without cookies; when subtitles exist, prioritize fetch_subtitle.py to avoid unnecessary yt-dlp downloads.
  • Rate limiting: The subtitle API documentation mentions an IP rate limit of about 300 requests/hour; high-frequency usage requires waiting for recovery.
  • Compute and time: faster-whisper downloads models on first run (medium is about 1.5GB); long audio transcription takes significant time; with an NVIDIA GPU, the faster engine can automatically use CUDA.
  • Quality tradeoffs: Chinese content recommends --language zh; if faster occasionally misses words, you can try --engine openai (requires pip install openai-whisper).

Conclusion

Bilibili & YouTube Video Summarizer encodes platform differences, download routes, dual-engine transcription, and summary structure into a Skill, allowing Agents to complete the common “watch video → get conclusions” workflow via conversation triggers, without needing an additional API Key.

  • SkillHub page: https://www.skillhub.cn/skills/user_06b53f10/bilibili-youtube-video-summarizer
  • Installation coordinate: @user_06b53f10/bilibili-youtube-video-summarizer
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye