Media Downloader
Paste a URL that has video or audio. Check the format you want : video (MP4) or audio (MP3) : and hit download. Backend uses yt-dlp to extract and stream the file to your browser.
Live Demo
Paste a URL and click Check to see what's available.
How it works
Decisions
Running yt-dlp as a subprocess isolates it from the Flask process. Easier to update (pip install --upgrade), and crash in yt-dlp doesn't take down the API.
yt-dlp writes to a temp directory. Flask streams the file back with send_file,
then a cleanup callback deletes the temp directory. No files accumulate on disk.
Prevents the demo from downloading multi-GB files that would exhaust disk or block a gunicorn worker for too long. Reasonable for most clips and songs.
Check URL first (fast, metadata only), then download on confirm. Avoids accidentally triggering large downloads and lets the user see what they're getting.
YouTube aggressively blocks datacenter IPs running yt-dlp. Instead, YouTube URLs route through the Innertube player API using Android/VR client identities, which bypass the web bot challenge. Results are cached so metadata + download don't double-hit Google. yt-dlp is kept as a fallback.