Add chapters to videos by transcribing, analyzing, and generating structured markdown documents with YouTube chapter markers. Optionally generate highlight videos.
Add chapters to videos by transcribing, analyzing, and generating structured markdown documents with YouTube chapter markers. Optionally generate highlight videos.
Add chapters to videos by transcribing, analyzing, and generating structured markdown documents with YouTube chapter markers. Optionally generate highlight videos.
allowed-tools
["Read","Write","Bash","Glob"]
license
MIT
video-add-chapters
Transcribe videos using Whisper API, automatically detect chapter boundaries, and generate structured markdown documents with YouTube chapter markers. Optionally create highlight videos from selected segments.
When to Use This Skill
Transcribing long videos (20+ minutes) and splitting into chapters
Converting video transcripts into structured documentation
Generating YouTube chapter markers for video descriptions
Cleaning up raw transcripts into readable documents
Creating highlight videos from selected transcript segments
flowchart TB
subgraph Auto[Automatic Processing]
direction LR
A[Video] --> B[Transcribe] --> C[Analyze] --> D[Generate] --> E[Clean]
end
subgraph Optional[Optional Review]
F[Check & Adjust]
end
Auto -.-> Optional -.-> Auto
All steps run automatically without user intervention. Optional review step available if manual adjustment is needed.
Usage
Quick Start (Automated Pipeline)
# Run all steps automatically
python transcribe_video.py "video.mp4" --language ko --output-dir "./output"
python suggest_chapters.py "video.mp4" --output "chapters.json"
python generate_docs.py "video.mp4" --chapters "chapters.json" --output-dir "./output"
python clean_transcript.py "./output/merged_document.md" --backup
Step-by-Step Details
1. Transcribe Video
python transcribe_video.py "video.mp4" --language ko --output-dir "./output"# Skip if transcript already exists (useful for workflow integration)
python transcribe_video.py "video.mp4" --skip-if-exists
After completing the chapter workflow, you can create a highlight video by selecting specific segments from the transcript.
Method 1: Annotation in Transcript (Recommended)
Mark highlights directly in the transcript using <u> or == annotations.
flowchart LR
A[Transcript] --> B["Add <u> or ==marks=="]
B --> C[parse_highlight_annotations.py]
C --> D[Highlight Script]
D --> E[generate_highlights.py]
E --> F[Highlight.mp4]
Quick Start:
# 1. Open transcript markdown and add annotations:# <u>text to highlight</u> or ==text to highlight==# 2. Parse annotations to generate highlight script
python parse_highlight_annotations.py "transcript.md" --video "video.mp4"# 3. (Optional) Edit the generated highlight script to add titles# 4. Generate highlight video
python generate_highlights.py "transcript - highlight_script.md" --padding 0.5
Supported Annotation Formats:
<u>highlighted text</u> - HTML underline (visible in most editors)
Adds 0.5s padding before/after each segment to avoid mid-sentence cuts
Displays optional segment titles (yellow centered text, Korean font) for 3 seconds
Merges all segments into single video using FFmpeg
Output: {video} - highlights.mp4
Highlight Script Format
# Highlight Script: Video Title**Source Video**: /path/to/video.mp4
---
[00:00:09-00:00:21] {Gemini CLI 설정} 우선은 Gemini에다가 제가 현재 커뮤니티 볼트가...
[01:46-02:15] {설치 완료} 네 설치가 된 것 같습니다. 볼트에서 확인해 볼까요.
[03:56-04:01] 아웃박스 커뮤니티 폴더에 질문을 생성을 했어요.
Format: [START-END] {Optional Title} Text content
Titles in {curly braces} are optional
If provided, title appears as yellow centered text overlay (144px, Korean font supported)