No description
- Python 100%
|
|
||
|---|---|---|
| .gitignore | ||
| batch_runner.py | ||
| config.example.toml | ||
| feedback.md | ||
| PLAN.md | ||
| README.md | ||
| state.json | ||
| summarizer.py | ||
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
-
Dependencies
pip install -r requirements.txt -
Install
yt-dlp(binary, not pip)brew install yt-dlp # macOS # or: pip install yt-dlp -
Install a local LLM server (e.g. Ollama, vLLM) and configure
config.toml:[llm] endpoint = "http://localhost:9931/v1" model_name = "your-model-name" -
Add channels to
[channels]inconfig.toml(used bybatch_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
- Extract — grabs transcript (via
youtube-transcript-apioryt-dlp) and video metadata (scrapes YouTube) - Chunk — splits the transcript into overlapping chunks
- Map — sends each chunk to the LLM in parallel to extract key facts
- 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