Brandon Hubbard / lux-rs
GitHub ↗
RUST · MEDIA DOWNLOADER

lux-rs — Concurrent Multi-Platform Media Stream Extractor & Downloader in Rust

lux-rs is a lightweight, 100% safe Rust rewrite of the lux media downloader for extracting video and audio streams from online platforms. It features async multi-chunk HTTP range downloading, automatic playlist traversal, and zero-copy stream muxing in a single static binary.

$ cargo install lux-rs
GitHub ↗
< 3ms
Cold Startup Time
100%
Safe Rust (0 Unsafe)
0.02s
Test Suite Runtime
4x - 8x
Chunked Concurrency

Interactive Command Generator 🛠️

Configure options below to generate the exact lux CLI command:

lux https://www.bilibili.com/video/BV1xx411c7mD -o ./downloads --threads 8

Architecture & Pipeline 🏗️

1. URL Router
(av/BV/ep regex, domain match)
➔
2. Extractor
(Bilibili, YouTube, Douyin, HTML5)
➔
3. Metadata Engine
(DASH streams, XML danmaku)
➔
4. Chunk Downloader
(HTTP/2, resume, indicatif)
➔
5. Stream Muxer
(zero-copy copy, .ass subtitle)

Installation & Usage 🚀

# Install via Cargo
cargo install --git https://github.com/bhubbard/lux-rs

# Inspect video formats without downloading
lux -i "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

# Download 1080P with 8 threads & Danmaku converted to .ass
lux -s 80 --threads 8 "BV1xx411c7mD"

# Universal HTML5 video grabber
lux -o ./movies "https://example.com/stream-page"