AI-powered YouTube video summarizer. Paste a YouTube URL, get a structured summary with timestamped links back to the original video.
- Node.js 18+
- uv (used to run yt-dlp via
uvx) - deno (required by yt-dlp for YouTube JS challenge solving)
- Google Gemini API key
npm install
cp config.js.example config.jsEdit config.js with your Google Gemini API key and preferred model.
| Field | Description |
|---|---|
GOOGLE_API_KEY |
Your Google Gemini API key |
MODEL |
Gemini model to use (e.g. gemini-3.1-flash-lite-preview) |
| Variable | Default | Description |
|---|---|---|
PORT |
3000 |
Server port |
HOST |
localhost |
Server bind address |
# Production
npm start
# Development (auto-reload on changes)
npm run devWhen running as a systemd service, uvx and deno may not be in the default PATH. Set it explicitly in your unit file:
[Service]
Environment=PATH=/home/viberaven/.local/bin:/home/viberaven/.deno/bin:/usr/local/bin:/usr/bin:/binIf YouTube returns 429 errors (rate limiting), you can place a cookies.txt file (Netscape format) in the data/ directory. Export it from a browser where you're logged into YouTube using an extension like "Get cookies.txt LOCALLY".
- User pastes a YouTube URL on the homepage
- Server checks if the video has already been processed (SQLite cache in
data/tldw.db) - If not cached,
yt-dlpfetches video metadata and closed captions - Captions + metadata are sent to Google Gemini for summarization
- Result is stored in the database and displayed as a clean page with:
- Channel name and description
- Video title and thumbnail
- AI-generated abstract (3 sentences)
- Detailed summary with inline timestamp links to the original video
https://tldw.viberaven.com/- Homepagehttps://tldw.viberaven.com/<videoId>- Video summary page (triggers processing if not cached)
Each processed video is available as:
- HTML page - rendered in the browser with Tailwind CSS (dark mode auto-detected)
- Markdown file - downloadable via the "Download Markdown" button
The markdown template can be customized by editing template.md.
βββ config.js # API keys and model config
βββ config.js.example # Template for config.js
βββ server.js # Express server and API routes
βββ db.js # SQLite database
βββ youtube.js # yt-dlp integration
βββ gemini.js # Gemini API integration
βββ template.md # Markdown output template
βββ data/ # SQLite database files
βββ public/
βββ index.html # Homepage
βββ video.html # Video summary page