A minimal, self-hosted web UI for downloading YouTube videos as MP4 or extracting audio as MP3 — powered by yt-dlp and Flask.
- 🎬 Best-quality MP4 — merges the highest-res video + audio streams via ffmpeg
- 🎵 Best-quality MP3 — pulls the best audio stream and encodes at VBR 0 (highest)
- 🗑️ No storage bloat — each file is deleted from the server a few seconds after it's sent
- 🖤 Zero dependencies on the front end — plain HTML/CSS/JS, no frameworks
| Dependency | Notes |
|---|---|
| Python 3.9+ | |
| ffmpeg | Must be on your system PATH |
| pip packages | Listed in requirements.txt |
# macOS
brew install ffmpeg
# Ubuntu / Debian
sudo apt install ffmpeg
# Windows
# Download from https://ffmpeg.org and add the bin/ folder to your PATHgit clone https://github.com/your-username/yt-grab.git
cd yt-grab
# (Recommended) create a virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtpython app.pyOpen http://localhost:5000 in your browser, paste a YouTube URL, choose a format, and click Download.
- The browser POSTs
{ url, fmt }to/download. - The server spawns a yt-dlp job in an isolated temp directory.
- The finished file is streamed back to the browser as an attachment.
- A background thread deletes the temp directory 5 seconds later.
YouTube changes its site frequently. If downloads start failing, update yt-dlp:
pip install -U yt-dlpyt-grab/
├── app.py # Flask app + embedded UI
├── requirements.txt
└── README.md
MIT