Skip to content

About

Single-page web application to download video and audio from YouTube, Facebook, Instagram, TikTok, X, and Threads.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Media Downloader

Blotcat using a giant vacuum pipe to suck media files down from the internet cloud Single-page web application to download video and audio from YouTube, Facebook, Instagram, TikTok, X, Threads, and Reddit.

Architecture

Blotcat receiving requests from a phone and pulling levers to command a huge yt-dlp engine

  • Frontend: Vanilla HTML5, CSS3, and JavaScript with PWA install and share-target support.
  • Backend: Express.js server (server.js) executing yt-dlp in a local Python virtual environment.
  • Dependencies: Node.js (version 20+), Python (version 3.10+), and ffmpeg.

Prerequisites

Ensure ffmpeg is installed on the host system.

Ubuntu/Debian

sudo apt update && sudo apt install -y ffmpeg

macOS

brew install ffmpeg

Local Installation

  1. Install Node.js dependencies:

     npm ci
  2. 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
  3. Start the Express server:

    npm start

    The application runs at http://localhost:3300.

  4. Run the regression tests:

    npm test

Docker Deployment

Build and run the application using the provided Dockerfile.

  1. Build the Docker image:

    docker build -t media-downloader .
  2. Run the container:

    docker run -d -p 3300:3300 --name media-downloader media-downloader

Operations

  • 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=1 only when the app is behind one trusted reverse proxy.

Design Details

Blotcat picking the lock on a vault to extract the highest quality audio and video streams

  • Install Preference: Stores PWA install-banner dismissal in localStorage.
  • Signature Decryption: Uses node.js runtime with --remote-components ejs:github challenge solver to handle YouTube signature decryption.
  • Format Fallback: Uses format_id+bestaudio/format_id/best format selector to download requested resolution with best audio, falling back to standalone format if needed.

About

Single-page web application to download video and audio from YouTube, Facebook, Instagram, TikTok, X, and Threads.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages