Skip to content

hoodrichpirobo/UltimaDL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UltimaDL 🚀

The High-Performance, Stream-Based YouTube Downloader. Zero Disk IO. Constant Memory Footprint. Blazing Speed.

UltimaDL is a Rust-based orchestration engine that treats YouTube downloads as real-time streams. Unlike traditional downloaders that download a massive temp file to disk before converting, UltimaDL pipes raw bytes directly from the network through memory into the encoder.

Result: A 6-hour 1080p stream converts to MP3 in under 7 minutes (52x real-time speed) with negligible RAM usage.


🏗 Architecture: The Pipeline

UltimaDL leverages the Unix Philosophy: Do one thing well and pipe data to the next program.

graph LR
    A[YouTube Server] -- TCP Stream --> B(yt-dlp process)
    B -- Raw Bytes (STDOUT) --> C{Rust Pipe}
    C -- Buffered Stream (STDIN) --> D(FFmpeg process)
    D -- Encoded Audio/Video --> E[Final File on Disk]
Loading
  1. Extraction: yt-dlp fetches the optimal stream url.
  2. Orchestration: Rust manages the child processes and asynchronous I/O pipes.
  3. Transcoding: FFmpeg encodes the stream in-flight.
  4. Optimization: If mp3 is requested, UltimaDL intelligently requests audio-only data, saving ~95% bandwidth.

⚡ Benchmarks

Metric Standard Downloader UltimaDL (Rust) Improvement
Disk IO ~10 GB (Temp Files) 0 GB (Direct Write) Infinite
RAM Usage High (Buffers whole file) Constant (~20MB) 90%+
Bandwidth Downloads Video+Audio Audio Only (Smart) 95% Saved
Speed 15-20 Minutes < 7 Minutes 3x Faster

🛠️ Installation

1. Prerequisites

UltimaDL is a wrapper orchestrator. You need the engines installed in your PATH.

Arch Linux (The Best)

sudo pacman -Sy yt-dlp ffmpeg

Ubuntu / Debian

sudo apt update && sudo apt install yt-dlp ffmpeg

macOS

brew install yt-dlp ffmpeg

2. Build from Source

git clone https://github.com/hoodrichpirobo/yt2mp-.git
cd yt2mp-
cargo build --release

The binary will be located at ./target/release/rust_stream_dl.


💻 Usage

The CLI is designed for speed and simplicity.

Download Music (MP3)

Automatically fetches the best audio stream and converts to high-quality MP3.

cargo run --release -- "https://youtu.be/example" --mode mp3 --name MySong

Download Video (MP4)

Fetches video and audio, piping them into an MP4 container without re-encoding (copy codec) whenever possible for instant results.

cargo run --release -- "https://youtu.be/example" --mode mp4 --name MyVideo

🧠 Engineering Philosophy

  • Digital Minimalism: We do not reinvent the wheel. We automate the maintenance by using yt-dlp (which updates daily) and ffmpeg (the industry standard), while Rust provides the safety and concurrency.
  • Zero-Cost Abstractions: We use Rust's std::process and Stdio::piped() to handle data movement with zero overhead.
  • Fail Fast: If a dependency is missing, the program alerts immediately with a context-aware error (using anyhow).

🤝 Contributing

  1. Fork it.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

Author: Cux
Technical University of Valencia (UPV)

About

10xEfficient Rust application to convert Youtube videos into .mp3 or .mp4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages