Jamie Software Lab
Python yt-dlp Innertube API Flask Streaming

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.

BackendFlask + yt-dlp
OutputMP4 / MP3
Max file500 MB
Timeout120 seconds

Live Demo

Paste a URL and click Check to see what's available.

Extracting media info…
Thumbnail
Preparing download…

How it works

Paste URL
User pastes a link with video or audio content
Extract info
YouTube URLs go via Innertube API (Android client); other sites use yt-dlp's --dump-json
Choose format
User picks video (MP4) or audio (MP3) via checkboxes
Download
YouTube streams directly via Innertube; other sites use yt-dlp temp file. Flask sends the file back

Decisions

yt-dlp via subprocess, not library

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.

Temp file, then stream

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.

500 MB limit

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.

Two-step flow

Check URL first (fast, metadata only), then download on confirm. Avoids accidentally triggering large downloads and lets the user see what they're getting.

Innertube API for YouTube

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.