Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

video-add-chapters

БесплатноЗапускает вложенные скриптыНе проверен

Add chapters to videos by transcribing, analyzing, and generating structured markdown documents with YouTube chapter markers. Optionally generate highlight…

jykimот jykim★ 52 звезды на GitHub14 установок в других каталогах

Об этом скилле

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

Example Results

Requirements

System

  • Python 3.7+
  • FFmpeg (for audio extraction)

Python Packages

pip install -r requirements.txt

Environment Variables

  • OPENAI_API_KEY - Required for Whisper API

How It Works

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
  • Splits video into 15-minute chunks
  • Transcribes using Whisper API
  • Handles timestamp offsets automatically
  • Output: {video} - transcript.json

2. Detect Chapter Boundaries

python suggest_chapters.py "video.mp4" --output "chapters.json"
  • Analyzes transcript for topic transitions
  • Uses transition signal patterns (not pauses)
  • Output: chapters.json with suggested boundaries

3. Generate Documents

python generate_docs.py "video.mp4" --chapters "chapters.json" --output-dir "./output"
  • Creates individual chapter markdown files
  • Generates merged document and index
  • Outputs YouTube chapter markers

4. Clean Transcript

python clean_transcript.py "./output/merged_document.md" --backup
  • Removes filler words
  • Improves sentence structure
  • Enhances paragraph cohesion
  • Preserves timestamps and chapter boundaries

Optional: Manual Review

If chapter boundaries need adjustment:

  1. Edit chapters.json with corrected timestamps
  2. Re-run generate_docs.py to regenerate documents

Highlight Video Generation (Optional)

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)
  • ==highlighted text== - Markdown highlight (Obsidian compatible)

Features:

  • Consecutive highlighted segments are automatically merged
  • End times calculated from next segment start
  • Auto-generates titles from first few words

Method 2: Manual Script Editing

Export full transcript as editable script, then delete unwanted lines.

flowchart LR
    A[Transcript] --> B[Export Script]
    B --> C[User Deletes Lines]
    C --> D[Generate Video]
    D --> E[Highlight.mp4]

Quick Start:

# 1. Export editable highlight script
python export_highlight_script.py "video.mp4" \
  --transcript "./output/video - transcript.json"

# 2. Edit the script - delete unwanted lines (in any text editor)

# 3. Generate highlight video
python generate_highlights.py "./output/video - highlight_script.md"
`
Полный SKILL.md на GitHub

Установить video-add-chapters в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Bash
Glob

Вложенные файлы

clean_transcript.pyexamples/sample_chapter.mdexamples/sample_youtube_chapters.txtexport_highlight_script.pygenerate_docs.pygenerate_highlights.pyparse_highlight_annotations.pyrequirements.txtsuggest_chapters.pytemplates/chapter.mdtemplates/index.mdtemplates/youtube_chapters.txttranscribe_video.py

FAQ

Что делает скилл video-add-chapters?

Add chapters to videos by transcribing, analyzing, and generating structured markdown documents with YouTube chapter markers. Optionally generate highlight videos.

Как установить скилл video-add-chapters?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл video-add-chapters запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить video-add-chapters с