Single-page web application to download video and audio from YouTube, Facebook, Instagram, TikTok, X, Threads, and Reddit.
- Frontend: Vanilla HTML5, CSS3, and JavaScript with PWA install and share-target support.
- Backend: Express.js server (
server.js) executingyt-dlpin a local Python virtual environment. - Dependencies: Node.js (version 20+), Python (version 3.10+), and ffmpeg.
Ensure ffmpeg is installed on the host system.
sudo apt update && sudo apt install -y ffmpegbrew install ffmpeg-
Install Node.js dependencies:
npm ci
-
Create a local Python virtual environment and install/upgrade
yt-dlp:python3 -m venv venv ./venv/bin/pip install --upgrade yt-dlp yt-dlp-ejs
-
Start the Express server:
npm start
The application runs at
http://localhost:3300. -
Run the regression tests:
npm test
Build and run the application using the provided Dockerfile.
-
Build the Docker image:
docker build -t media-downloader . -
Run the container:
docker run -d -p 3300:3300 --name media-downloader media-downloader
- Health check:
GET /health - API requests are limited to 30 requests per client every 10 minutes.
- At most three downloads run concurrently by default. Override with
MAX_CONCURRENT_DOWNLOADS. - Set
TRUST_PROXY=1only when the app is behind one trusted reverse proxy.
- Install Preference: Stores PWA install-banner dismissal in localStorage.
- Signature Decryption: Uses node.js runtime with
--remote-components ejs:githubchallenge solver to handle YouTube signature decryption. - Format Fallback: Uses
format_id+bestaudio/format_id/bestformat selector to download requested resolution with best audio, falling back to standalone format if needed.

