🇬🇧 English | 🇻🇳 Tiếng Việt
TokenVector Media Downloader is a high-performance, cross-platform (Windows, Linux, macOS) media downloader written entirely in the TokenVector (.tkv) programming language.
Unlike traditional media downloaders that are notoriously heavy (often 30 MB – 150 MB due to bundling Python runtimes, Node.js, or Chromium engines), TokenVector Downloader harnesses the power of the TokenVector Compiler (tkvc) to compile directly to native Common Intermediate Language (CIL/MSIL) bytecode. This delivers:
- 🚀 Ultra-lightweight binary: Full-featured GUI application weighs only ~32 KB, CLI only ~25 KB!
- ⚡ Instant startup: 0-second delay, minimal RAM footprint (< 15 MB under load).
- 🛡️ Zero Dependencies: Fully standalone, direct native HTTP/HTTPS streaming, HLS parsing, and stream resolution.
- 🌐 True Cross-Platform: Runs seamlessly on Windows (Native PE), Linux (Ubuntu, Debian, Arch...), and macOS (Apple Silicon & Intel) in both Graphical User Interface (GUI) and Command-Line Interface (CLI) modes.
| Feature / Metric | ⚡ TokenVector Media Downloader | 🐢 yt-dlp (Traditional) | The TokenVector Advantage |
|---|---|---|---|
| Programming Language | TokenVector (.tkv) | Python (C-Python runtime) | Clean modern language, optimized native CIL architecture |
| Executable Size (.exe) | ~32 KB (GUI) / ~25 KB (CLI) | ~17 MB – 85 MB (PyInstaller bundle) | Over 500x lighter |
| Third-Party Dependencies | 0 (Zero Dependency) | Requires Python Runtime, FFmpeg (~80 MB) to merge audio/video | Runs out-of-the-box, no external utilities needed |
| User Interface (UI) | Cross-platform GUI (WinForms) & CLI | Command-Line only (requires complex wrappers) | Intuitive, responsive UI across Windows, Linux & macOS |
| Startup Latency | Instant (< 50ms) | 1.5s – 3.5s (due to unpacking Python environment) | Significantly faster, zero noticeable lag |
| RAM Footprint | ~12 MB – 18 MB | ~60 MB – 150 MB (Python VM + child processes) | Maximum system resource efficiency |
| Progress Indicator | Adaptive: Exact % & animated pulsing glow (Marquee) |
Plain console text output | Smooth visual tracking |
| Safe Stop & Cleanup | One-touch STOP button, instantly releases threads & cleans .part files |
Pressing Ctrl+C often leaves orphaned temp files |
Safe for disk storage, never leaves corrupted files |
| HLS Stream (.m3u8) Support | Built-in Native CIL HLS Parser & 3-Layer Anti-Ad Filter | Relies on external FFmpeg binary | Direct .m3u8 & web embed extractor, filters out 5s/15s ads, merges into MP4 without FFmpeg |
| Transcript & Subtitle Extraction | Dedicated [ GET TRANSCRIPT ] button (downloads both .srt & _transcript.txt) |
Requires extra Python script (yt-dlp-transcript) + srt lib |
1-click instant extraction, no Python, LLM AI ready |
| Packaging & Portability | Single portable ~28 KB file for Windows, Linux & macOS | Requires multi-megabyte installers or Python/Pip setup | Instant distribution via Email, Chat, AirDrop |
💡 Summary: While
yt-dlpis a heavyweight tool packing an entire Python ecosystem, TokenVector Media Downloader is an ultra-lean, laser-focused native utility: lightning fast, featherlight size, responsive GUI, and 100% dependency-free.
TokenVector is an advanced programming language designed and developed by Trần Nguyên Hùng, featuring elegant syntax, direct CIL/Assembly interop, and extreme binary optimization:
- Direct .NET CLR & Win32 Interop: Native instantiation of
System.Windows.Formscomponents, asynchronous thread control, and high-performance network sockets. - High-Throughput Smart Buffer: Network streaming utilizing an optimal 128 KB (
131072bytes) buffer to minimize CPU context-switching and saturate network bandwidth. - Instant Cancel & Clean Safety Engine: Allows users to halt active downloads instantly via the STOP button, properly releasing file locks and purging incomplete
.parttemporary files.
- Dedicated "GET TRANSCRIPT" Button (1-Click Subtitles & Transcript Extraction):
- 🔘 Independent Operation: No need to navigate dropdown menus—paste the URL and click
[ GET TRANSCRIPT ]to download immediately. - 📝 Simultaneous Dual-Format Output:
[Video_Title].srt: Standard subtitle file with millisecond-accurate timestamps, ready for VLC, YouTube, CapCut, Premiere, etc.[Video_Title]_transcript.txt: Formatted timeline transcript with clean[mm:ss](or[hh:mm:ss]) timestamps on every line, perfectly matching YouTube's video timeline for effortless reading, quick reference, and AI summarization.
- ⚡ 100% Native TokenVector CIL: Directly negotiates with YouTube InnerTube API (Android Client) to bypass PO token restrictions without Python,
yt-dlp.exe, or FFmpeg. Extracts in ~1 second!
- 🔘 Independent Operation: No need to navigate dropdown menus—paste the URL and click
- Standardized Clean English UI:
- Completely avoids legacy ANSI/Unicode code-page rendering issues on Windows Forms.
- Symmetrical 3-button layout:
[ DOWNLOAD ]|[ GET TRANSCRIPT ]|[ STOP ]. - Empty default Video URL input for quick and clean paste upon launching.
- Comprehensive Video & Audio Format Support:
- 🎬 Video:
MP4 (480p Standard - Default),MP4 (720p HD),MP4 (1080p Full HD),MKV (1080p High Quality),WebM (Original Quality). - 🎵 Audio:
MP3 (Most Popular, 320kbps),M4A (AAC High Quality),WAV (Lossless Uncompressed),FLAC (Lossless Studio Master). - 📜 Subtitles / Transcript:
Subtitle: Transcript & SRT (.srt & .txt - YouTube Transcript).
- 🎬 Video:
- Dynamic Adaptive ProgressBar:
- Automatically displays exact percentage when the server provides
Content-Length. - Seamlessly switches to pulsing marquee animation (
ProgressBarStyle.Marquee) forTransfer-Encoding: chunkedstreams, reporting real-time received megabytes.
- Automatically displays exact percentage when the server provides
- Custom Output Directory Selection & STA Threading Architecture:
- Fast, responsive folder picker (
Browse...) powered by Single-Threaded Apartment (STA) thread model. - Passes native window handle owner and cleans up COM dialog handles properly, completely preventing GUI freezing or
(Not Responding)states.
- Fast, responsive folder picker (
- Native HLS Stream Downloader (.m3u8 Direct Extraction):
- 🎬 Automatic M3U8 Detection: Simply paste any direct HLS playlist URL (
.m3u8) or supported web player page and click[ DOWNLOAD ]. The engine detects the playlist, resolves variants, downloads.tssegments, and merges them into a clean.mp4file. - ⚡ Zero-Dependency Merging: 100% native CIL binary streaming and packet stitching without needing FFmpeg or external tools.
- 📊 Segment Progress & Instant Stop: Real-time segment progress counter (
X/Y segments - %) with one-click STOP to halt and clean temporary files immediately.
- 🎬 Automatic M3U8 Detection: Simply paste any direct HLS playlist URL (
- Facebook Videos & Reels Downloader:
- 🔵 Paste any public Facebook video, Reel or
fb.watchlink and click[ DOWNLOAD ]— no login, no cookies, no yt-dlp/FFmpeg needed. - 🔗 Bare links work too:
facebook.com/...orfb.watch/...pasted withouthttps://are completed automatically. - 🛡️ If a resolved link turns out to be an expired placeholder page instead of video bytes, it is deleted automatically and reported clearly instead of leaving a fake
.mp4behind.
- 🔵 Paste any public Facebook video, Reel or
- TikTok Videos Downloader:
- 🎵 Paste a TikTok video link (
tiktok.com/@user/video/...) and click[ DOWNLOAD ]— the app resolves the direct MP4 and saves it under the video title (GUI) or astiktok_video.mp4(CLI).
- 🎵 Paste a TikTok video link (
- Facebook CLI notes: the CLI saves Facebook downloads as
facebook_video.mp4and reports a distinct error code for each outcome (0ok,2page/API unreachable,3no video link found,4file download failed,5placeholder pages on every attempt). - AI-Ready CLI (
--json+SKILL.md): add--jsonin any position and stdout becomes exactly one machine-readable line, e.g.{"status":"ok","platform":"tiktok","file":"tiktok_video.mp4"}— so any AI agent with shell access can download videos reliably. SeeSKILL.mdfor the agent contract (error codes, public-only rule, file verification). - Both GUI and CLI Editions Included:
tv-downloader-gui.exe: Modern graphical user application (~32 KB).tv-downloader-cli.exe: Terminal utility for scripting and automated workflows (~25 KB). Usage:tv-downloader-cli.exe <media_url> [c_user] [xs].
TokenVector-Media-Downloader/
├── .github/workflows/ # Automated CI/CD Matrix (Ubuntu, macOS, Windows)
├── src/ # Native TokenVector source code (.tkv)
│ ├── gui_runner.tkv # GUI application entrypoint (Entry: run)
│ ├── cli_runner.tkv # CLI application entrypoint (Entry: main)
│ └── core_engine.tkv # Download orchestration, network stream & POSIX bridge
├── il_features/ # CIL compiler features & WinForms UI modules
│ ├── win32_gui_window.tkv # Native WinForms UI & stream decoding logic
│ └── ... # TokenVector IL library modules
├── tv-downloader-gui.exe # Compiled GUI executable (~32 KB, runs on Win/Linux/macOS)
├── tv-downloader-cli.exe # Compiled CLI executable (~25 KB, runs on Win/Linux/macOS)
├── build.bat # Windows automated build script
├── build.sh # Linux & macOS automated build script
├── USER_GUIDE.txt # Quick user manual (Vietnamese)
├── USER_GUIDE_EN.md # Quick user manual (English)
├── DEV_GUIDE.md # TokenVector coding & build guide (English)
├── DEV_GUIDE_VI.md # TokenVector coding & build guide (Vietnamese)
├── SKILL.md # Agent contract: use the CLI as an AI tool
├── llms.txt # AI-readable project summary
├── LICENSE # MIT License
├── README.md # English documentation (this file)
└── README.vi.md # Vietnamese documentation (Tài liệu tiếng Việt)
- On Windows:
- Launch GUI: Double-click
tv-downloader-gui.exe. - Launch CLI: Open Command Prompt / PowerShell:
.\tv-downloader-cli.exe <media_url>.
- Launch GUI: Double-click
- On Linux (Ubuntu/Debian):
- Prerequisites:
sudo apt-get install -y mono-runtime libmono-system-windows-forms4.0-cil libgdiplus xvfb - GUI:
xvfb-run mono tv-downloader-gui.exe(xvfb-runonly needed on headless servers; skip it on desktop). - CLI:
mono tv-downloader-cli.exe <media_url>
- Prerequisites:
- On macOS:
- Prerequisites: Mono MDK + XQuartz.
- GUI:
mono tv-downloader-gui.exe - CLI:
mono tv-downloader-cli.exe <media_url>
| File | Windows | Linux | macOS |
|---|---|---|---|
tv-downloader-cli.exe (~25 KB) |
Native ✅ | Verified on Ubuntu + Mono 6.8 ✅ (banner, demo flow, live TikTok download byte-identical to Windows) | Expected via Mono (covered by CI matrix, not yet run locally) |
tv-downloader-gui.exe (~32 KB) |
Native ✅ | Verified rendered & running (Xvfb + openbox screenshot: full form, inputs, buttons, progress) ✅ | Expected via Mono + XQuartz (not yet run locally) |
Notes: the GUI needs an X server (hence xvfb-run on headless machines) and libgdiplus for text rendering; the os_system bridge auto-selects /bin/sh on POSIX instead of cmd.exe.
You can compile the .tkv source code into native executables using the TokenVector Compiler (tkvc.exe) from the TokenVector project:
# From the project root:
tkvc.exe build src\gui_runner.tkv --entry run --out tv-downloader-gui.exetkvc.exe build src\cli_runner.tkv --entry main --out tv-downloader-cli.exeThe compiled binaries target .NET CIL bytecode, enabling full support for both GUI (Windows Forms) and CLI on Linux and macOS via the Mono runtime:
# 1. Install Mono runtime and GDI+ / WinForms libraries:
sudo apt-get update
sudo apt-get install -y mono-runtime mono-devel libgdiplus mono-winforms
# 2. Launch GUI:
mono tv-downloader-gui.exe
# 3. Launch CLI:
mono tv-downloader-cli.exe <media_url># 1. Install Mono MDK and XQuartz (X11 server for WinForms rendering):
brew install --cask xquartz mono-mdk
# 2. Launch GUI:
mono tv-downloader-gui.exe
# 3. Launch CLI:
mono tv-downloader-cli.exe <media_url>This project is licensed under the MIT License. Feel free to use, modify, and distribute.
If this tool saves you time, consider sponsoring — every coffee keeps the binaries tiny and the updates coming:
-
GitHub Sponsors: https://github.com/sponsors/nguyenhungtran18 (Vietnam-supported 🇻🇳, cards welcome from anywhere)
-
Buy Me a Coffee: https://buymeacoffee.com/nguyen.hung.tran.18 (one-time or monthly, 5% platform fee)
-
Bank transfer (Vietnam): MB Bank — Account:
0989503018— TRAN NGUYEN HUNG. -
MoMo: scan the QR code below.
- Author: Trần Nguyên Hùng
- Email: nguyen.hung.tran.18@gmail.com
- TokenVector Language Project: https://github.com/nguyenhungtran18/TokenVector
- Downloader Repository: https://github.com/nguyenhungtran18/TokenVector-Media-Downloader
Engineered with passion using the TokenVector programming language.