Bilibili Video Analyzer
Overview
This skill analyzes Bilibili academic and educational videos to generate professional clean-style learning notes (清洁版学习笔记). It automates the complete workflow from video download and transcription to AI-powered content analysis and report generation with key screenshots.
📚 Extended Resources:
When to Use This Skill
Trigger phrases:
- - "分析这个B站视频: [link]"
- "帮我总结这个视频的知识点"
- "生成这个视频的学习报告"
- "提取这个视频的关键内容"
Installation
Prerequisites
- - Python 3.7+
- FFmpeg (for video processing)
- Sufficient disk space (~1-2GB per video analysis)
Install from PyPI
CODEBLOCK0
Verify Installation
CODEBLOCK1
Install FFmpeg
macOS:
CODEBLOCK2
Ubuntu/Debian:
CODEBLOCK3
Windows:
Download from ffmpeg.org and add to PATH
Workflow
7-Step Automated Process:
Step 1: Login Check
CODEBLOCK4
Step 2: Parse Video Information
Extract metadata (title, uploader, duration) using INLINECODE0
Step 3: Download Video
CODEBLOCK5
Step 4: Transcribe Audio
CODEBLOCK6
Step 5: AI Content Analysis ⭐
Claude analyzes the subtitle content and extracts:
- - 6-10 核心知识点 (knowledge point cards)
- Each point includes:
-
title (10-15字)
-
core_concept (20-30字核心概念)
-
details (200-400字详细说明,Markdown格式)
-
key_points (3-5个关键要点)
-
timestamp (视频时间戳)
Output JSON Structure:
CODEBLOCK7
Step 6: Capture Screenshots
CODEBLOCK8
Step 7: Generate Report
Use
scripts/report_generator.py to create clean-style learning notes
Output Format:
- - 标题: 《{视频标题}》学习笔记
- 概览: 视频时长 + 知识点数量
- 核心内容: 📌 知识点卡片(核心概念 + 详细说明 + 关键要点 + 配图)
- 全文总结: 核心知识框架 + 实践价值 + 学习建议
Quality Standards
Based on successful case (BV1ms4y1Y76i):
| Metric | Standard | Example |
|---|
| 知识点数 | 6-10个 | 7个 |
| 单点字数 |
200-400字 | 平均320字 |
| 核心概念 | 20-30字 | 简洁有力 |
| 关键要点 | 3-5个/点 | 便于记忆 |
| 截图数量 | 10张 | 均匀分布 |
| 质量评分 | ≥25/28 | 优秀标准 |
📋 Use Quality Checklist for self-assessment
Key Features
✅ Content Structure
- - Card-based layout (卡片式布局)
- Balanced information density (200-400字/点)
- Clear hierarchy (##/###/####)
✅ Knowledge Extraction
- - 4-dimensional model: 现象+原因+方案+案例
- Core concept in one sentence (20-30字)
- 3-5 key points per card
✅ Visual Support
- - 10 key screenshots
- 600px uniform width
- Precise timestamp alignment
✅ Summary Framework
- - Knowledge structure tree
- Multi-dimensional practical value
- 6 actionable learning suggestions
Technical Implementation
Extract Subtitles
CODEBLOCK9
Batch Screenshots
CODEBLOCK10
Safe JSON Output
import json
output_path.write_text(
json.dumps(analysis, ensure_ascii=False, indent=2),
encoding='utf-8'
)
Resources
Scripts
- -
scripts/srt_parser.py - Parse SRT subtitle files - INLINECODE8 - Capture video frames at specific timestamps
- INLINECODE9 - Generate clean-style learning notes
Reference Docs
Quick Start Guide
For First-Time Users:
- 1. Read this SKILL.md to understand the workflow
- Check BESTPRACTICES.md sections 1-5
- Review the example case: INLINECODE10
- Use Quality Checklist to evaluate your output
For Experienced Users:
- 1. Generate notes using the skill
- Quick check with the quality checklist
- Reference best practices when needed
- Optimize using technical implementation code
Version
Current: v1.1.0 (2026-02-28)
- - ✅ Enhanced content generation guidelines
- ✅ Comprehensive best practices documentation
- ✅ 28-item quality checklist
- ✅ Real successful case examples
See CHANGELOG.md for version history.
Bilibili 视频分析器
概述
本技能用于分析B站学术与教育类视频,生成专业的清洁版学习笔记。它实现了从视频下载、转录到AI驱动的内容分析及关键截图报告生成的完整工作流程自动化。
📚 扩展资源:
何时使用本技能
触发短语:
- - 分析这个B站视频:[链接]
- 帮我总结这个视频的知识点
- 生成这个视频的学习报告
- 提取这个视频的关键内容
安装
前置条件
- - Python 3.7+
- FFmpeg(用于视频处理)
- 足够的磁盘空间(每次视频分析约需1-2GB)
从PyPI安装
bash
pip install railgun-bili-tools
验证安装
bash
bili-dl --version
安装FFmpeg
macOS:
bash
brew install ffmpeg
Ubuntu/Debian:
bash
sudo apt install ffmpeg
Windows:
从ffmpeg.org下载并添加到PATH
工作流程
7步自动化流程:
第1步:登录检查
bash
bili-dl status
如果未登录:bili-dl login
第2步:解析视频信息
使用BilibiliParser提取元数据(标题、上传者、时长)
第3步:下载视频
bash
bili-dl download <视频链接> --quality 1080p --output <输出目录>
第4步:转录音频
bash
bili-dl transcribe <视频路径> --model medium --srt
第5步:AI内容分析 ⭐
Claude分析字幕内容并提取:
- - 6-10个核心知识点(知识点卡片)
- 每个知识点包括:
- title(10-15字)
- core_concept(20-30字核心概念)
- details(200-400字详细说明,Markdown格式)
- key_points(3-5个关键要点)
- timestamp(视频时间戳)
输出JSON结构:
json
{
summary: 视频总览(100-200字),
knowledge_points: [...],
key_screenshots: [
{timestamp: 280, description: 截图描述, reason: 选择原因}
],
knowledge_framework: 知识体系结构,
practical_value: 实践价值说明,
learning_suggestions: [学习建议1, 学习建议2, ...]
}
第6步:截取截图
python
使用 scripts/screenshot_tool.py
ffmpeg -y -ss <时间戳> -i <视频路径> -vframes 1 -q:v 2 <输出文件.jpg>
第7步:生成报告
使用scripts/report_generator.py生成清洁版学习笔记
输出格式:
- - 标题:《{视频标题}》学习笔记
- 概览:视频时长 + 知识点数量
- 核心内容:📌 知识点卡片(核心概念 + 详细说明 + 关键要点 + 配图)
- 全文总结:核心知识框架 + 实践价值 + 学习建议
质量标准
基于成功案例(BV1ms4y1Y76i):
200-400字 | 平均320字 |
| 核心概念 | 20-30字 | 简洁有力 |
| 关键要点 | 3-5个/点 | 便于记忆 |
| 截图数量 | 10张 | 均匀分布 |
| 质量评分 | ≥25/28 | 优秀标准 |
📋 使用质量检查清单进行自我评估
主要特性
✅ 内容结构
- - 卡片式布局
- 均衡的信息密度(200-400字/点)
- 清晰的层级结构(##/###/####)
✅ 知识提取
- - 四维模型:现象+原因+方案+案例
- 一句话核心概念(20-30字)
- 每张卡片3-5个关键要点
✅ 视觉支持
- - 10张关键截图
- 统一宽度600px
- 精确的时间戳对齐
✅ 总结框架
技术实现
提取字幕
python
from srt
parser import parsesrt
file, getfull_transcript
segments = parse
srtfile(srt_path)
full
text = getfull
transcript(segments, includetimestamps=False)
批量截图
python
import subprocess
for ts in timestamps:
cmd = [ffmpeg, -y, -ss, str(ts), -i, video_path,
-vframes, 1, -q:v, 2, output_file]
subprocess.run(cmd)
安全JSON输出
python
import json
output
path.writetext(
json.dumps(analysis, ensure_ascii=False, indent=2),
encoding=utf-8
)
资源
脚本
- - scripts/srtparser.py - 解析SRT字幕文件
- scripts/screenshottool.py - 在特定时间戳截取视频帧
- scripts/report_generator.py - 生成清洁版学习笔记
参考文档
快速入门指南
首次使用用户:
- 1. 阅读本SKILL.md以了解工作流程
- 查看BESTPRACTICES.md第1-5节
- 审查示例案例:reports/2026-02-28/BV1ms4y1Y76i*/
- 使用质量检查清单评估输出
有经验用户:
- 1. 使用本技能生成笔记
- 使用质量检查清单快速检查
- 必要时参考最佳实践
- 使用技术实现代码进行优化
版本
当前:v1.1.0(2026-02-28)
- - ✅ 增强的内容生成指南
- ✅ 全面的最佳实践文档
- ✅ 28项质量检查清单
- ✅ 真实成功案例
版本历史请参见CHANGELOG.md。