Skip to content

Krainium/youtube

Repository files navigation

youtube

Download any YouTube video or audio directly — CLI tool and full-featured web app.

Hits YouTube's internal Innertube API the same way the official apps do. Pulls every available format, resolution, and codec. Works on Linux, macOS, and Windows.


Web App — ytdl-web-zeta.vercel.app

A privacy-first YouTube downloader that runs entirely in your browser. No sign-in, no tracking, no file upload.

Features

  • Smart Merge — merges a high-quality video-only stream with audio using ffmpeg compiled to WebAssembly, completely in-browser. Supports up to 4K.
  • Dubbed language picker — when a video has dubbed audio tracks (e.g. Hindi, Spanish, French…), Smart Merge shows a second dropdown so you can pick exactly which language to pair with the video. The original language is always pre-selected. No other public downloader exposes this.
  • All formats — three tabs: Video + Audio (pre-muxed up to 360p), Video Only (up to 4K, no audio), Audio Only (original language, all bitrates).
  • No upload — your video never leaves your device. ffmpeg runs locally via WebAssembly.
  • Fast — ffmpeg stream-copies both tracks (no re-encode), so muxing a 1 GB 4K file takes a few seconds.

How Smart Merge works

  1. Paste a YouTube URL and hit Enter.
  2. Open the Video + Audio tab — Smart Merge appears at the top.
  3. Choose video quality from the first dropdown.
  4. If the video has dubbed tracks, a language dropdown appears — choose the audio language.
  5. Hit Merge & Download. ffmpeg loads (cached after first use), fetches both streams, muxes them in-browser, and saves Title [1080p] [Hindi].mp4 to your downloads.

CLI Tool

Download any YouTube video or audio directly from the terminal — no API key, no dependencies.

Run it

# Linux / macOS
go run .

# Windows
build.bat

# Non-interactive (downloads best video)
go run . https://www.youtube.com/watch?v=VIDEO_ID

Options

Flag Description
-o <dir> Custom output directory
--cookies <file> Netscape cookies.txt for private/age-gated videos
--proxy <url> HTTP/SOCKS5 proxy URL

Build binaries

# Linux
CGO_ENABLED=0 go build -o ytdl .

# Windows (cross-compile from Linux/macOS)
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o ytdl.exe .

Go 1.22+ required. Zero external dependencies.

About

⬇️ YouTube video & audio downloader — zero dependencies, no API key, hits YouTube's internal API directly. Supports all resolutions, MP4/WebM/M4A, cross-platform CLI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors