No description
Find a file
Aditya Naik 3b6bd9d9b0 customizations (#6)
Co-authored-by: Aditya Naik <naik.aditya@gmail.com>
Reviewed-on: #6
2026-08-21 12:13:38 +02:00
.gitignore chore: channel registry (#5) 2026-08-19 13:47:46 +02:00
batch_runner.py customizations (#6) 2026-08-21 12:13:38 +02:00
config.example.toml customizations (#6) 2026-08-21 12:13:38 +02:00
feedback.md chore: channel registry (#5) 2026-08-19 13:47:46 +02:00
PLAN.md customizations (#6) 2026-08-21 12:13:38 +02:00
README.md chore: channel registry (#5) 2026-08-19 13:47:46 +02:00
state.json customizations (#6) 2026-08-21 12:13:38 +02:00
summarizer.py customizations (#6) 2026-08-21 12:13:38 +02:00

YouTube Summarizer

Turns YouTube videos into structured Markdown reports with YAML frontmatter. Uses a map-reduce LLM pipeline: chunks the transcript, extracts key facts in parallel, then synthesizes into a final article.

Setup

  1. Dependencies

    pip install -r requirements.txt
    
  2. Install yt-dlp (binary, not pip)

    brew install yt-dlp   # macOS
    # or: pip install yt-dlp
    
  3. Install a local LLM server (e.g. Ollama, vLLM) and configure config.toml:

    [llm]
    endpoint = "http://localhost:9931/v1"
    model_name = "your-model-name"
    
  4. Add channels to [channels] in config.toml (used by batch_runner.py).

Usage

Single video:

python summarizer.py "https://www.youtube.com/watch?v=VIDEO_ID"

All configured channels:

python batch_runner.py

Output

Summaries are written to outputs/summaries/ as:

{video_id}_{slug_title}.md

Each file has YAML frontmatter with metadata (title, channel, published date, duration, tags, speakers, key takeaways) followed by the markdown report.

How it works

  1. Extract — grabs transcript (via youtube-transcript-api or yt-dlp) and video metadata (scrapes YouTube)
  2. Chunk — splits the transcript into overlapping chunks
  3. Map — sends each chunk to the LLM in parallel to extract key facts
  4. Reduce — synthesizes all extracted facts into one flowing report

Config

config.toml sections:

  • [llm] — endpoint, model, timeout, retries
  • [processing] — chunk size, overlap, max parallel workers
  • [channels] — channel name → homepage URL (for batch runs)
  • [yt_dlp] — retries, socket timeout, geo-bypass, extractor args
  • [paths] — output, summary, and transcript directories