Skip to content

About

Application that generates intelligent YouTube video summaries

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

YouTube Summarizer

License GitHub Super-Linter Code style: black

visitors Scc Code Badge Scc COCOMO Badge

yt-summarizer is a Python CLI that reads YouTube videos from a Notion database or playlist, retrieves transcripts, generates per-video summaries and main points with an LLM, and writes the results back to Notion and/or a local Open Knowledge Format (OKF) knowledge collection. Filesystem output includes a collection index, an executive overview, a linked video-note table, and one Markdown note per video with its summary, main points, and YouTube thumbnail.

Diagram

Key Features

  • Notion-backed workflow: Reads video records from a Notion database and updates them in place.
  • YouTube playlist support: Accepts a --playlist-url and adds new playlist videos to the current run.
  • Per-video analysis: Generates a concise summary and a list of main points for each video.
  • Concurrent processing: Processes videos in parallel using a default worker count based on available CPU cores, configurable with --workers (Ollama models default to 1 worker because Ollama serves requests serially).
  • Summaries are written in English by default; use --language (or SUMMARY_LANGUAGE), e.g. --language es, to change it.
  • LLM_TIMEOUT (seconds, default 1800) sets the per-request timeout and OLLAMA_MAX_CONTEXT (default 32768) caps the Ollama context window.
  • Executive summaries: Produces a synthesized playlist or collection-level executive summary at the end of the run and includes it in the generated collection.
  • Browsable OKF output: Generates a navigable Markdown knowledge collection compatible with the structure used by yt-conferences.
  • Flexible LLM backends: Works with local Ollama models and other LiteLLM-compatible providers.
  • Context-aware prompt compression: Uses Headroom with model-specific token budgets before LLM requests, then reduces oversized transcripts with token-aware map-reduce summarization for any provider, even when compression is unavailable or fails.
  • Operational visibility: Includes structured logging and clearer connection errors for unreachable LLM endpoints.

How It Works

  1. Load existing video records from Notion.
  2. Optionally expand the queue with videos discovered from --playlist-url.
  3. Fetch each video's title and transcript from YouTube, in parallel across videos.
  4. Generate a summary and main points for each video with the configured LLM.
  5. Upsert the results into configured storage backends.
  6. Print an executive summary across the processed collection.

Notion Database Expectations

The CLI updates Notion properties with these names:

  • Title
  • URL
  • Summary
  • Main Points

Use Cases

  • Build a shared Notion knowledge base from conference talks and technical playlists.
  • Batch-summarize videos already curated in Notion.
  • Import a new playlist and immediately generate a higher-level executive brief.
  • Capture key points for later review without rewatching full videos.

Limitations

  • Age-restricted videos are not supported by the current transcript retrieval flow.
  • Videos without captions or transcripts cannot be summarized.
  • Private, deleted, or otherwise inaccessible videos cannot be processed.
  • Playlist processing still depends on each individual video being reachable and transcribed.

Additional Documentation

About

Application that generates intelligent YouTube video summaries

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages