Bilibili Video Chapter Generator
Generate chapter lists for Bilibili videos based on subtitle content, which users can directly copy to the Bilibili video editing page.
Bilibili Chapter Format Specifications
00:00 Introduction
01:23 Part 1 Title
05:30 Part 2 Title
Format Requirements (Bilibili Mandatory Restrictions):
- The first chapter must start at (This is a mandatory requirement)
- Number of chapters: 3-10 (Must be > 2 and ≤ 10)
- Chapter titles cannot contain special characters (Prohibited characters include etc.)
- Time format: (minutes:seconds) or (hours:minutes:seconds)
- One chapter per line:
- Interval between chapters must be ≥ 5 seconds
Workflow
Step 1: Obtain SRT File
Ask the user for the SRT subtitle file path, or retrieve it from the context.
Step 2: Parse Subtitle Content
Call the
skill to parse subtitles:
bash
python3 ~/.claude/skills/srt-to-structured-data/scripts/parse_srt.py "<srt_file_path>" --stats
This will output:
- JSON structure of subtitles (including timestamps and text)
- Statistical information (total duration, number of subtitles, etc.)
Step 3: Analyze Subtitle Content
Read the subtitle content to understand the video's:
- Theme and structure
- Content turning points
- Key topic changes
Step 4: Generate Chapter List
Generate the chapter list based on the user's described intent (if any) or automatic analysis:
- Identify content turning points: Locate positions where topics change or new paragraphs begin
- Determine chapter titles: Briefly describe the content of the segment (2-8 characters recommended)
- Verify time intervals: Ensure the interval between adjacent chapters is ≥ 5 seconds
- Format output: Use the format
Step 5: Output Results
Output the chapter list in plain text format, which users can directly copy:
00:00 Opening Introduction
02:15 Core Concept Explanation
08:30 Practical Demonstration
15:00 Summary and Review
Usage Examples
User Input:
Help me convert ./video-subtitles.srt to Bilibili chapters
Or more detailed requirements:
Help me generate Bilibili chapters with the following requirements:
- Subtitle file: ./demo.srt
- Approximately 5-6 chapters
- Highlight the practical section
Chapter Division Recommendations
Bilibili Restriction: 3-10 chapters (Must be > 2 and ≤ 10)
- Short videos (< 5 minutes): 3-4 chapters
- Medium-length videos (5-15 minutes): 4-7 chapters
- Long videos (> 15 minutes): 7-10 chapters
Notes
- The first chapter must start at , named "Opening", "Introduction" or directly state the topic
- Chapter titles are prohibited from containing special characters: Colons, commas, brackets, etc. are not allowed; only use Chinese/English/numbers
- Chapter titles should be concise and powerful, allowing viewers to quickly locate content (2-8 characters recommended, plain text only)
- The last chapter can be "Summary", "Conclusion" or "Easter Egg"
- Avoid overly dense chapters (too short intervals will look cluttered)
- Timestamps should take the start time of subtitle paragraphs, rounded down to the nearest second
- The total number of chapters must be > 2 and ≤ 10, otherwise Bilibili will reject it
Chapter Title Examples
Correct Examples:
00:00 Opening Introduction
03:35 Agent Demo: Skill Loading Process
05:39 Environment Configuration
08:38 Source Code Analysis
Incorrect Examples (Contain Special Characters):
03:35 Agent Demo: Loading Skill Process
(Contains colon)
05:39 Environment Preparation, Install Dependencies
(Contains comma)
08:38 Code Analysis (Core Logic)
(Contains brackets)