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.
- Notion-backed workflow: Reads video records from a Notion database and updates them in place.
- YouTube playlist support:
Accepts a
--playlist-urland 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(orSUMMARY_LANGUAGE), e.g.--language es, to change it. LLM_TIMEOUT(seconds, default 1800) sets the per-request timeout andOLLAMA_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.
- Load existing video records from Notion.
- Optionally expand the queue with videos discovered from
--playlist-url. - Fetch each video's title and transcript from YouTube, in parallel across videos.
- Generate a summary and main points for each video with the configured LLM.
- Upsert the results into configured storage backends.
- Print an executive summary across the processed collection.
The CLI updates Notion properties with these names:
TitleURLSummaryMain Points
- 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.
- 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.
