yt-dlf/README.md
Claude Fable 5 a3eb962b90 Transcribe videos without subtitles via faster-whisper fallback
When yt-dlp yields no subtitle files, the server now runs
scripts/transcribe.py (faster-whisper, large-v3-turbo, CUDA with CPU
fallback) on the downloaded media and feeds the resulting VTT through
the existing Markdown conversion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1w53ybPWArpZpcei9JPYX
2026-08-29 22:20:55 +02:00

63 lines
1.8 KiB
Markdown

# yt-dlf
YouTube Downloader & Transcript Extractor — a local web frontend for `yt-dlp` and `ffmpeg`.
## Features
- Paste a YouTube URL and download the best available video quality
- Subtitles downloaded automatically in the video's original language, English, and German (where available)
- Subtitles converted to clean Markdown (timestamps stripped, text deduplicated and paragraph-wrapped)
- Videos without subtitles (Instagram, archive.org, …) are transcribed locally via Whisper (faster-whisper, GPU-accelerated) — see `INSTALL.md`
- Optional audio extraction to MP3 via ffmpeg
- Real-time progress log streamed to the browser
- Files saved to `~/YouTube/<video title>/`
## Prerequisites
```bash
brew install yt-dlp ffmpeg
```
Node.js 16+ is required for the web app (tested with Node 26).
## Project Layout
```
yt-dlf/
├── scripts/
│ └── subtitle_to_markdown.py # standalone CLI converter
├── src/
│ ├── lib/
│ │ └── subtitle.js # JS conversion module (used by web app)
│ └── routes/
│ ├── api/download/
│ │ └── +server.js # SSE endpoint — runs yt-dlp / ffmpeg
│ ├── +layout.svelte
│ └── +page.svelte # UI
└── vite.config.js
```
## Running the web app
```bash
npm install # first time only
npm run dev # starts on http://localhost:5173
```
To use a custom port:
```bash
PORT=8080 npm run dev
```
## Standalone subtitle converter
Convert a `.vtt` or `.srt` subtitle file to Markdown directly from the terminal:
```bash
./scripts/subtitle_to_markdown.py video.en.vtt
./scripts/subtitle_to_markdown.py video.en.vtt output.md
```
Output is saved next to the input file (same name, `.md` extension) unless a second argument is given.