Open Source Projects/Youtube Download Extension

Youtube Download Extension

MIT Open Source

Download any YouTube video up to 1080p. Local bridge, no cloud, no subscription.

TypeScriptPythonChrome Extensionyt-dlpReactMV3Local-firstffmpegOpen Source

Overview

A Chrome extension + Python bridge that injects a native-feeling Download button into every YouTube watch page. Click it, and the video gets pulled directly to your disk via yt-dlp. No third-party server ever sees your request. Supports age-restricted and member-only videos through browser cookies, real-time progress tracking, dark mode, and a CLI for power users.

  • Chrome extension (TypeScript + React, MV3) injects a floating download panel into the YouTube page that matches YouTube's own UI, with the same colors, typography, and button shapes.
  • Python HTTP bridge runs on localhost:8765, receives the video URL, queues the job, and streams yt-dlp progress back to the extension in real time.
  • Supports age-restricted and member-only videos via exported browser cookies (Netscape format), with a CLI fallback that reads cookies directly from your Chrome profile.
Screenshots
Tap or click any preview to expand
Demo

§How it works

The extension's content script injects a Download button into every YouTube watch page. Clicking it sends the video URL to a lightweight Python HTTP server running locally at 127.0.0.1:8765. The server queues the job, kicks off yt-dlp (merging best video + best audio into MP4 via ffmpeg), and streams live progress back. The extension polls /jobs/{id} and renders a real-time progress bar. Nothing ever leaves your machine.

  • Content script injects a floating panel that reuses YouTube's own CSS variables so it looks like it belongs there.
  • Service worker proxies messages between the injected panel and the local bridge, keeping the extension permissions minimal.
  • Bridge exposes three endpoints: GET /health, POST /download, GET /jobs/{id}, simple enough to curl from the terminal.
  • ffmpeg merges the best available video stream with the best audio stream into a single MP4 automatically.

§Why local-first

Every cloud-based YouTube downloader logs your IP, the video URL, and the timestamp on their server. YT Local routes all traffic through your own machine: the extension is a thin UI layer, and yt-dlp talks directly to YouTube's CDN from your IP. No relay, no quota, no account required.

  • Zero telemetry: the extension and bridge have no analytics, no error reporting to a remote endpoint.
  • Works with any video yt-dlp supports, including age-restricted, members-only, and unlisted videos via your own session cookies.
  • CLI mode available for scripting and batch downloads without the browser.
  • MIT licensed, auditable end-to-end, no black boxes.

§Stack & architecture

Built with TypeScript on the extension side and Python on the bridge side, keeping each layer in its strongest language:

  • browser_extension/: TypeScript + React (popup settings), Vite build, Chrome MV3 manifest.
  • youtube_downloader/bridge.py: ThreadingHTTPServer with a job queue; each download runs in its own thread.
  • youtube_downloader/cli.py: thin yt-dlp wrapper with --output-dir, --cookies, and multi-URL support.
  • CI via GitHub Actions; Python linted with ruff, TypeScript with ESLint.