Z
Zaid
Projects
Live

yt-batch

Paste a stack of YouTube links and download them all in parallel. A tiny local web app around yt-dlp that runs only on your own machine.

pythondevtoolslocal-firstmedia

TL;DR

Paste links, choose format and quality, click Download all, walk away. Every video gets its own progress bar, and one dead link does not stop the rest.


Overview

yt-batch is a small local web app wrapped around yt-dlp. Paste ten, fifteen or fifty links, pick video or audio and a quality cap, choose how many downloads run at once, and go do something else. The server binds to 127.0.0.1 only. No accounts, no uploads, no tracking; the only thing that leaves the machine is yt-dlp talking to YouTube.

Approach

- Standard library server: app.py is a plain Python HTTP server, no web framework, with yt-dlp running as a library so progress hooks report live speed and ETA per video
- A resizable concurrency gate: a thread pool does the work and a gate limits how many run at once. The limit can be changed from one to eight while a batch is running
- Single-file UI: index.html in vanilla JavaScript with no build step, polling the server once a second to draw the progress bars
- The options that matter: mp4 or mp3, 1080p, 720p, 480p or best available, borrow a browser's login cookies for age-restricted or members-only videos, playlist expansion off by default so a link with a playlist parameter grabs just the one video
- Terminal mode: pass URLs straight on the command line and skip the browser entirely

Key Decisions

- Local only, by construction: binding to loopback is the privacy policy. There is nothing to trust because there is nothing remote.
- Failures stay isolated: a dead link is marked failed and the rest keep going; duplicates are dropped automatically. A batch tool that stops on the first error is not a batch tool.

Outcome

Open source under MIT. Files land in ~/Downloads/yt-batch and the Open folder button takes you there.

Related