Universal video downloader API supporting multiple platforms with yt-dlp backend, batch processing, and Go REST API
  • Go 34.7%
  • HTML 19.7%
  • TypeScript 18.9%
  • JavaScript 18.1%
  • CSS 6.7%
  • Other 1.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Khoavo 34e74c9c7c
Some checks failed
/ build (push) Has been cancelled
chore: delegate push-all to universal ship.sh
2026-09-19 07:37:44 +07:00
.forgejo/workflows fix forgejo actions: use gitea.com action URLs and fix sha syntax 2026-04-04 17:38:47 +07:00
dist feat: release v1.0.11 with in-app media sniffer and mobile responsive improvements 2026-09-02 18:19:28 +07:00
frontend feat: 8K/4K resolution selection, in-app deletion modal, and v1.0.38 release 2026-09-04 20:32:45 +07:00
mobile feat: release v1.0.11 with in-app media sniffer and mobile responsive improvements 2026-09-02 18:19:28 +07:00
src feat: 8K/4K resolution selection, in-app deletion modal, and v1.0.38 release 2026-09-04 20:32:45 +07:00
static feat: Grid media selector, live sniffer overhaul, theme contrast polish and v1.0.37 release 2026-09-04 20:06:01 +07:00
templates/media Update codebase with media, gallery, organize, and frontend changes 2026-09-04 17:29:48 +07:00
.dockerignore chore: clean up stale files and rename module to kv-download 2026-08-10 17:21:06 +07:00
.gitignore feat: Next.js 15 + React 19 + TypeScript rewrite & mobile-first UI 2026-09-04 17:42:41 +07:00
.tool-versions Upgrade from go 1.25.1 to go 1.25.3 2025-10-19 15:46:59 -07:00
build.sh Update codebase with media, gallery, organize, and frontend changes 2026-09-04 17:29:48 +07:00
CHANGELOG.md feat: 8K/4K resolution selection, in-app deletion modal, and v1.0.38 release 2026-09-04 20:32:45 +07:00
docker-build.sh chore: bump SPK release to 1.0.0-16 with fast remuxing 2026-08-21 06:56:04 +07:00
docker-compose.yml feat: include cookies.txt volume mount in docker-compose.yml 2026-08-04 20:11:16 +07:00
docker-run.sh security: fix .gitignore cookies rule, fix workflow image targets, fix script ports/dirs 2026-08-04 16:08:43 +07:00
Dockerfile feat: Next.js 15 + React 19 + TypeScript rewrite & mobile-first UI 2026-09-04 17:42:41 +07:00
go.mod feat: implement MeTube-style task watcher, SSE progress streaming, format selection, and queue controls 2026-08-21 06:30:10 +07:00
go.sum feat: implement MeTube-style task watcher, SSE progress streaming, format selection, and queue controls 2026-08-21 06:30:10 +07:00
kv fix: properly map people/Name/ID profile URLs to profile.php?id=ID to fix 404s for some share links 2026-09-04 13:44:17 +07:00
launch.sh feat: complete frontend rewrite with App.js, enhanced run.sh launcher, launch.sh quick-start 2026-09-04 16:48:38 +07:00
output.txt fix: deploy pagination fixes for mobile client on NAS 2026-09-04 13:13:44 +07:00
output_desktop.txt fix: deploy pagination fixes for mobile client on NAS 2026-09-04 13:13:44 +07:00
output_invalid_cookie.txt fix: properly map people/Name/ID profile URLs to profile.php?id=ID to fix 404s for some share links 2026-09-04 13:44:17 +07:00
output_m.txt fix: properly map people/Name/ID profile URLs to profile.php?id=ID to fix 404s for some share links 2026-09-04 13:44:17 +07:00
output_mibextid.txt fix: deploy pagination fixes for mobile client on NAS 2026-09-04 13:13:44 +07:00
output_test.txt fix: deploy pagination fixes for mobile client on NAS 2026-09-04 13:13:44 +07:00
push-all.sh chore: delegate push-all to universal ship.sh 2026-09-19 07:37:44 +07:00
README.md docs: modernize README with comparison matrix, badges, and quickstart 2026-09-14 21:22:37 +07:00
run.sh feat: Next.js 15 + React 19 + TypeScript rewrite & mobile-first UI 2026-09-04 17:42:41 +07:00
spk-build.sh feat: release v1.0.11 with in-app media sniffer and mobile responsive improvements 2026-09-02 18:19:28 +07:00
test2.txt fix: properly map people/Name/ID profile URLs to profile.php?id=ID to fix 404s for some share links 2026-09-04 13:44:17 +07:00
tidy.sh Update README with Synology NAS deployment guide, tag image as v1, fix volume paths 2026-04-04 17:07:28 +07:00

⚡ KV-Download — Universal Multi-Platform Media Extractor & Downloader

A blazing-fast, mobile-friendly Go + yt-dlp media downloader with batch queuing, ZIP export, and anti-bot browser impersonation.

GitHub Stars GitHub Forks Go Version Docker Image Platform yt-dlp License: MIT

Features • Comparison • Architecture • Quickstart • Docker & NAS • API • License

KV Download — screenshot

⚡ Why KV-Download?

Free online video converters are plagued by intrusive popups, shady redirects, low speed throttles, and privacy risks. Self-hosted alternatives are often bloated, resource-heavy, or fail against aggressive TikTok/Instagram anti-bot mechanisms.

KV-Download delivers an ultra-clean, ad-free self-hosted gateway powered by a concurrent Go HTTP core and yt-dlp with curl_cffi browser impersonation.

📊 Competitive Matrix

Feature ⚡ KV-Download 🌐 Cobalt 📺 youtube-dl-webui 🚫 Ad-filled Converters
Backend Engine Compiled Go + yt-dlp Node.js + custom scrapers Python / Node Blackbox / Cloud
Anti-Bot Impersonation ✅ curl_cffi (<0.16) bypass ⚠️ API-based ❌ Basic requests ❌ Cloudflare block
Multi-URL Batching ✅ Batch paste + ZIP all ❌ One-by-one ⚠️ Queued individually ❌ One-by-one
Mobile & Glass UI ✅ Responsive Glassmorphism ✅ Clean UI 🐢 Outdated Web UI 🛑 Cluttered with Ads
Automatic Cookie Refresh ✅ Auto-extract & sync ❌ Manual config ❌ Manual upload ❌ Not supported
NAS & Homelab Ready ✅ amd64 + arm64 single image ⚠️ Heavy multi-container 🟡 Single arch often ❌ Cloud only
Zero Telemetry / Ads ✅ 100% Private & Open ✅ Open source ✅ Open source ❌ Malware / Tracking

✨ Key Features

🚀 Multi-URL Batch 📥 Concurrent Queue 💾 Bundle ZIP Export
Paste multiple URLs at once and download in parallel Live real-time download progress and status per link One-click bundle to download all extracted videos as a single .zip
📱 Responsive Glassmorphism 👀 In-Browser Preview 🔄 Auto-Updating Engine
Sleek modern dark mode for desktop, tablet, and mobile Watch videos directly before downloading yt-dlp automatically refreshes its extractors every 6 hours
🛡️ Anti-Bot Bypass 🔄 Smart Retries 🧹 Automated NAS Cleanup
Browser fingerprint impersonation via curl_cffi Automatic 3× retry on transient network/platform limits Cron-friendly file expiration for Synology NAS

Supported Platforms: YouTube · TikTok · Instagram · Twitter / X · Facebook · Vimeo · Reddit · Twitch · and 1000+ more.


🏗️ Architecture

┌────────────────────────────────────────────────────────┐
│             Web Browser / Bookmarklet / API            │
└───────────────────────────┬────────────────────────────┘
                            │ HTTP GET/POST (JSON / Stream)
┌───────────────────────────▼────────────────────────────┐
│                  KV-Download Go Engine                 │
│                                                        │
│  ┌──────────────────────┐    ┌──────────────────────┐  │
│  │   Goroutine Worker   │    │  In-Memory / SQLite  │  │
│  │   Batch Queue Pool   │    │     Job Dispatch     │  │
│  └──────────┬───────────┘    └──────────────────────┘  │
│             │                                          │
│  ┌──────────▼───────────────────────────────────────┐  │
│  │     yt-dlp Engine + curl_cffi Browser TLS        │  │
│  │       (Auto-Cookie Injector + Proxy Support)     │  │
│  └──────────────────────────┬───────────────────────┘  │
└─────────────────────────────┼──────────────────────────┘
                              │ HTTPS with TLS Camouflage
┌─────────────────────────────▼──────────────────────────┐
│     Target Media Platforms (YouTube, TikTok, X...)     │
└────────────────────────────────────────────────────────┘

🚀 Quick Start

Prerequisites: Go 1.24+, yt-dlp, FFmpeg.

git clone https://github.com/vndangkhoa/kv-download.git
cd kv-download
./run.sh

Navigate to http://localhost:9292 in your browser 🎉


🐳 Docker & NAS Deployment

Quick Docker Run

docker run -d   --name kv-download   -p 9292:9292   -v ./downloads:/download   -v ./cookies.txt:/app/cookies.txt   --restart unless-stopped   vndangkhoa/kv-download:latest

Docker Compose

services:
  kv-download:
    image: vndangkhoa/kv-download:latest
    container_name: kv-download
    restart: unless-stopped
    ports:
      - "9292:9292"
    volumes:
      - ./downloads:/download
      - ./cookies.txt:/app/cookies.txt
    environment:
      - TZ=Asia/Ho_Chi_Minh
docker compose up -d

Synology NAS (Container Manager)

  1. Open Container Manager on DSM.
  2. Create project kv-download mapped to /volume1/docker/kv-download/.
  3. Use the Compose snippet above (change volume to /volume1/docker/kv-download/downloads).
  4. Place cookies.txt in /volume1/docker/kv-download/ if downloading restricted social media clips.
  5. Set up DSM Task Scheduler for auto-cleanup (e.g., delete files older than 7 days):
    0 3 * * * find /volume1/docker/kv-download/downloads/ -type f -mtime +7 -delete
    

🍪 Cookies & Anti-Bot Bypass

Some platforms (TikTok, Instagram, Twitter/X) require active session cookies to download HD or restricted media.

Set MR_COOKIES_BROWSER to auto-extract cookies on startup and every 24 hours:

docker run -d -p 9292:9292   -e MR_COOKIES_BROWSER=chrome   -v ./downloads:/download   vndangkhoa/kv-download:latest

Option 2: Manual cookies.txt

  1. Use browser extension Get cookies.txt LOCALLY (Chrome) or cookies.txt (Firefox).
  2. Export cookies for your target domain.
  3. Mount the file into /app/cookies.txt in the container.

⚠️ Note: Mount cookies.txt as read-write (not :ro), as yt-dlp updates cookies on exit.


⚙️ Environment Configuration

Variable Description Default
MR_DOWNLOAD_DIR Main folder where downloads are stored (videos/, music/, photos/) /download (Docker) / downloads/
MR_PROXY HTTP/SOCKS5 proxy URL for geo-blocked downloads (empty)
MR_COOKIES_BROWSER Browser to auto-extract cookies (chrome, firefox, edge, brave, safari) (disabled)
MR_COOKIES_URL Check URL during cookie refresh https://www.tiktok.com/
MR_COOKIES_MAX_AGE_HOURS Expiration limit before refreshing cookies 168 (7 days)

📡 REST API & Bookmarklet

Fetch Media Info

GET /api/info?url=https://www.youtube.com/watch?v=VIDEO_ID
{
  "media": [
    {
      "Id": "abc123/video.mp4",
      "Name": "video.mp4",
      "SizeInBytes": 1048576,
      "HumanSize": "1.0 MB"
    }
  ],
  "error": ""
}

Stream Video

GET /download?id=abc123/video.mp4

Batch ZIP Archive

GET /download/zip?id=ID1&id=ID2&id=ID3

One-Click Browser Bookmarklet

Drag this snippet into your browser bookmarks bar:

javascript:(location.href="http://localhost:9292/fetch?url="+encodeURIComponent(location.href));

🌟 Star History

Star History Chart


📄 License

This project is open source under the MIT License.

Donation QR code

Crafted with ❤️ by vndangkhoa