Skip to content

A high-performance Rust TUI orchestrating yt-dlp for asynchronous media acquisition and mpv for seamless, high-fidelity terminal video playback

License

Notifications You must be signed in to change notification settings

mojahid8238/Rataplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎬 Rataplay

Rataplay is a premium, high-performance Terminal User Interface (TUI) for searching, playing, and downloading videos. Built with Rust and inspired by GopherTube, it provides a sleek, modern experience for media consumption directly from your terminal.

rataplay Demo

✨ Features

  • 🔍 Instant Search: Direct search from CLI or via the interactive TUI.
  • 🖼️ Visual Excellence: High-quality thumbnails with specialized support for Kitty and WezTerm graphics protocols.
  • 📺 Versatile Playback:
    • External: Play videos in an external mpv window with any prefered quality.
    • In-Terminal: Specialized "Watch in Terminal" mode using mpv's TCT output.
    • Audio Only: High-fidelity audio streams for background listening.
  • 📥 Background Downloads: Multi-threaded downloads with real-time speed, progress, and ETA tracking. Re-download in any quality video from downloads panel.
  • 📂 Local Management: Browse, play, and manage your downloaded files directly within the app.
  • 🖱️ Mouse Support: Navigate search results, manage downloads, and interact with the UI seamlessly using your mouse.
  • 🛠️ Custom Execution Paths: Override default system paths for critical dependencies like mpv, yt-dlp, ffmpeg, and deno.
  • 📝 Logging System: Robust logging system with configurable file paths and levels for easier debugging.
  • 🍪 Cookie Integration: Authenticate with YouTube using browser cookies or exported files (Netscape/JSON) to access restricted content.
  • 🔄 Hot Reload System: Configuration changes (themes, paths, logging, etc.) are applied instantly without restarting the app.
  • 🎛️ Full Playback Control: Play/Pause, Seek (5s/30s), and Progress tracking via IPC sockets.
  • 🎹 System Media Controls: Native support for Play/Pause, Next/Prev, and Stop via system media keys (MPRIS/SMTC).
  • Async Core: Powered by Tokio for a zero-latency, non-blocking UI.
  • 🎨 Toggle Themes and Animations easily with commands or from settings menu
  • Refine visuals with custom download progress style

🛠️ Prerequisites

Rataplay relies on the following tools:

  1. yt-dlp: For metadata extraction and streaming. (Rataplay checks for updates on startup).
  2. mpv: For all playback features.

🚀 Installation

From Source

cargo install --git https://github.com/mojahid8238/Rataplay.git

Note: Ensure that ~/.cargo/bin is in your PATH to run the executable from any directory.

From AUR (Arch Linux)

paru -S rataplay

🎮 Usage

Launching

  • Interactive Mode: rataplay
  • Direct Search: rataplay "lofi hip hop"
  • Direct URL: rataplay https://www.youtube.com/watch?v=...

CLI Options

  • -v, --version: Print version information.
  • -h, --help: Show the custom help screen.

Config File

  • You can change the settings or your preferences from ~/.config/rataplay/config.toml. See config.toml demo here.

Keybindings

General & Results

Key Action
/ or s Focus Search Input
j / k or arrow Navigate Results
Directly play any video from search results
Enter Open Action Menu
d Toggle Downloads & Local Files Panel
Space Select for Batch Actions (Playlists)
b or Backsp Go Back
q Quit
ctrl+s open settings
ctrl+t Change Themes
ctrl+a Change Greeting screen Animation

Playback Control (Active)

Key Action
p / Space Toggle Play/Pause
/ Seek -5s / +5s
[ / ] Seek -30s / +30s
x Stop Playback

Downloads Panel

Key Action
j / k Navigate between Active Tasks and Local Files
p Pause/Resume/Restart Download
x Cancel Download / Delete Local File
c Cleanup Garbage (.part files)
d Delete Selected Downloads
b / Backsp Go Back / Close Panel
Enter Action Menu for Local Files

🎨 Recommended Terminals

For sharp, pixel-perfect thumbnails:

  • Kitty (Native protocol)
  • WezTerm (Native protocol)
  • Konsole (Sixel support)

📜 License

GPL 3.0 License - See LICENSE for details.

About

A high-performance Rust TUI orchestrating yt-dlp for asynchronous media acquisition and mpv for seamless, high-fidelity terminal video playback

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published