A modern, media player built with Tauri, React, and MPV. Designed with video and music playback in mind.
An experimental project exploring Rust FFI and dynamic library by creating a modern GUI wrapper for MPV. This project explores interfacing with C libraries in Rust while building a practical media player application with a clean, modern interface using Tauri and React.
Currently available for Windows only.
- 🎵 Advanced media playback using MPV
- 📱 Modern UI with shadcn/ui components
- 🎨 Beautiful design with Tailwind CSS
- 📋 Playlist management with drag-and-drop support
- 🎮 Hardware-accelerated video playback
- 📁 Support for various media formats
- Frontend: React + TypeScript
- UI Components: shadcn/ui (based on Radix UI)
- Styling: Tailwind CSS
- State Management: Nanostores
- Backend: Tauri (Rust)
- Media Engine: MPV (via FFI)
- Database: SQLite with Drizzle ORM and migrations with Drizzle Kit
- Build Tool: Vite
- Windows 10 or later
- Download the latest release from the Releases page
- Run the installer
- Follow the installation wizard
If you want to contribute or build from source:
-
Prerequisites:
- Node.js (v20 or higher)
- Rust (latest stable)
- Cargo (Rust package manager)
- Git
-
Clone and setup:
git clone https://github.com/newish0/tauri-media-player.git cd tauri-media-player pnpm install -
Ensure the dynamic library files are in
src-tauri\lib\(i.e.src-tauri\lib\mpv\libmpv-2.dllexists) -
Start development server:
pnpm run tauri dev
-
Build for production:
pnpm run tauri build
This project uses Rust FFI (Foreign Function Interface) to integrate with MPV player. Here's how it works:
-
MPV Integration: The application uses
libmpvthrough Rust's FFI capabilities. This allows direct communication with MPV's C API from Rust code. -
Architecture:
- Rust side: Uses
libloadingto dynamically load MPV libraries - FFI bindings: Custom safe wrappers around unsafe MPV functions
- Event handling: Async event loop for MPV events in Rust
- Windows management: MPV is mounted onto a child application window controlled by a proxy HTML element.
- Rust side: Uses
This project is licensed under the GPL-2.0 license - see the LICENSE file for details.