Extract full content from a Bilibili video — transcript/subtitles, danmaku, comments, and description — then use your own LLM capabilities to produce a deep summary. No external AI API required (no OpenAI / Gemini key needed).
Data SourceMethodPriorityCC SubtitlesBilibili APIFastest, used if availableAudio Transcriptionwhisper.cpp + Vulkan GPUAutomatic fallback when no subtitlesVideo Descriptionyt-dlpAlways capturedDanmaku (scrolling comments)yt-dlpParsed, analyzed for frequent contentCommentsBilibili Comment APIHot-sorted, deduplicated, top liked extracted
When you receive a Bilibili video link and are asked to summarize it, follow these steps:
bash
python bili-transcript.py "<video_url>"
The script automatically:
Output files are saved to ./bili-output/:
transcript.txt — full transcript/subtitle textdanmaku.json — danmaku data with statisticscomments.json — comment data with top-likedThe JSON output includes preview text, danmaku summary, and top comments.
The JSON preview truncates at 2000 characters. Read the full file:
bash
cat ./bili-output/transcript.txt
Review community response data:
bash
cat ./bili-output/danmaku.json
cat ./bili-output/comments.json
Use your own LLM capabilities to produce a comprehensive summary. Suggested structure:
Video Overview — Title, uploader, duration, transcription source (subtitle / GPU). Key info from the description (project links, update notes, etc.).
Core Content — What the video is about. Fluent paragraph summary of the main narrative.
Key Points — Notable arguments, data points, or information worth highlighting.
Community Response (optional) — Reactions from danmaku and comments. Skip if content is insubstantial (spam, trolling, no valuable discussion).
Assessment (optional) — Content quality, information density, notable strengths or weaknesses.
bash
# Video metadata only
python bili-transcript.py "<URL>" --action info
# CC subtitles only (if available)
python bili-transcript.py "<URL>" --action subtitle
# Force GPU transcription (skip subtitle check)
python bili-transcript.py "<URL>" --action transcribe
# Danmaku only
python bili-transcript.py "<URL>" --action danmaku
# Comments only
python bili-transcript.py "<URL>" --action comments
# Custom output directory
python bili-transcript.py "<URL>" --output ./my-output
VariablePurposeWHISPER_CPP_DIRPath to whisper.cpp directory (containing whisper-cli)WHISPER_MODELPath to whisper model file (e.g., ggml-large-v3-turbo.bin)BILI_OUTPUT_DIRDefault output directory (default: ./bili-output)
Video LengthTotal TimeNotes5 minutes15sGPU transcription is fast12 minutes22sDownload + convert + transcribe1 hour2-3 minDepends on audio densityDanmaku/Comments5-10sDepends on comment volume
--action subtitle first