Discord Rich Presence for MPV Media Player with automatic anime metadata support.
- Overview
- Features
- Requirements
- Quick Start
- Installation
- Configuration
- MPV Setup
- MyAnimeList Sync
- Stremio MPV Bridge
- Screenshots
- Releases
- Contributing
MPV Discord RPC is a tool that integrates your MPV Media Player with Discord, displaying what you're watching in real-time. The main highlight is automatic anime detection from filenames, fetching detailed metadata (covers, official titles) using the MyAnimeList API.
Core Features
- Automatic anime detection from filenames
- Metadata fetching via Jikan API (MyAnimeList)
- Anime cover display in Discord Rich Presence
- Local caching to avoid repeated API requests
- Privacy mode to hide media details
Integration Features
- MyAnimeList Sync: Automatically update your watch progress
- Stremio MPV Bridge: Open Stremio Web streams directly in MPV
- Smart auto-playlist support
- Player compatibility for Anime (Kitsu)
Note: Cover display currently works only for anime. Configure this in your
.envfile.
- Node.js 22 or higher
- MPV Media Player
- Discord Desktop
Python is no longer required if you use the cloud-based GuessIt API! The parser now supports three modes:
- βοΈ Cloud API (recommended) - No Python needed, works on all platforms
- π» Local CLI - Requires
pip install guessit(Python 3.12+) - π€ Regex Fallback - Always available, basic parsing only
New users: Use the cloud API by setting
GUESSIT_API_URLin your.envfile. See GuessIt API Setup below.
Existing users: Your local
guessitinstallation still works as a fallback.
# Clone and install Node dependencies only
git clone https://github.com/gabszap/mpv-rpc.git && cd mpv-rpc
npm install
# Configure environment
cp .env.example .env
# Edit .env and set: GUESSIT_API_URL=https://your-api.vercel.app/api/parse
# Add IPC server to MPV configuration
echo 'input-ipc-server=\\.\pipe\mpv' >> "%APPDATA%/mpv/mpv.conf" # Windows
echo 'input-ipc-server=/tmp/mpv-socket' >> ~/.config/mpv/mpv.conf # Linux
# Build and run
npm run dev# Clone and install dependencies (including Python guessit)
git clone https://github.com/gabszap/mpv-rpc.git && cd mpv-rpc
pip install guessit && npm install
# Configure environment
cp .env.example .env
# Add IPC server to MPV configuration
echo 'input-ipc-server=\\.\pipe\mpv' >> "%APPDATA%/mpv/mpv.conf" # Windows
echo 'input-ipc-server=/tmp/mpv-socket' >> ~/.config/mpv/mpv.conf # Linux
# Build and run
npm run devgit clone https://github.com/gabszap/mpv-rpc.git
cd mpv-rpcnpm installOnly needed if you want to use local CLI instead of cloud API:
pip install guessitnpm run buildNo Python? No problem! You can now use a cloud-based GuessIt API instead of installing Python locally.
You have two options for using the cloud API:
Use our already-deployed API - no setup required!
-
Simply add to your
.envfile:USE_GUESSIT_API=true GUESSIT_API_URL=https://guessit-api.vercel.app/api/parse
-
Done! Start mpv-rpc and it will use our cloud API.
Privacy Notice:
- The API code is open source and doesn't collect or store any user data
- The API only receives filenames and returns parsed metadata - nothing is saved by our code
- We have no reason to collect your data, and we don't want to
This is a free public API hosted on Vercel. While we strive to keep it running, for maximum privacy or heavy usage you may want to deploy your own (Option B).
The project includes a ready-to-deploy Vercel API in the guessit-api/ folder:
-
Deploy the API (one-time setup):
cd guessit-api npm i -g vercel # Install Vercel CLI if you haven't vercel # Follow the prompts to deploy
-
Copy the deployed URL (e.g.,
https://your-project.vercel.app/api/parse) -
Configure mpv-rpc to use it:
cd .. cp .env.example .env # Edit .env and add: # USE_GUESSIT_API=true # GUESSIT_API_URL=https://your-project.vercel.app/api/parse
The parser automatically tries these methods in order:
- Cloud API - If
GUESSIT_API_URLis set - Local CLI - If
guessitis installed locally - Regex Fallback - Basic pattern matching (always works)
- β No Python installation required
- β Works identically on Windows, Linux, and macOS
- β Always uses latest guessit version
- β Intelligent caching (no repeated calls for same filename)
- β Zero local dependencies except Node.js
Copy the example environment file and adjust settings:
cp .env.example .envEnvironment values are loaded automatically via dotenv from .env at startup.
| Option | Description | Default |
|---|---|---|
SHOW_COVER |
Display anime cover image | true |
PRIVACY_MODE |
Hide all media details | false |
HIDE_IDLING |
Hide status when MPV is idle | false |
SHOW_TITLE |
Use anime title as activity name | true |
TITLE_LANG |
Preferred title language (english, romaji, none) |
none |
METADATA_PROVIDER |
Metadata source (jikan, anilist, kitsu, tvdb) |
jikan |
TVDB_API_KEY |
TheTVDB API key (required when using tvdb, optional for fallbacks) |
(empty) |
TVDB_LANG |
Preferred TheTVDB language code for episode metadata | eng |
USE_GUESSIT_API |
Use cloud API for filename parsing | true |
GUESSIT_API_URL |
URL of your GuessIt API endpoint | (empty) |
MAL_SYNC |
Enable MyAnimeList synchronization | false |
MAL_CLIENT_ID |
MyAnimeList API Client ID | (empty) |
MAL_SYNC_THRESHOLD |
Percentage watched to trigger sync (0-100) | 90 |
DISCORD_RPC |
Enable Discord Rich Presence | true |
MPV must be started with the IPC server enabled.
Add to your mpv.conf:
# Windows
input-ipc-server=\\.\pipe\mpv
# Linux
input-ipc-server=/tmp/mpv-socket# Windows
mpv --input-ipc-server=\\.\pipe\mpv <file>
# Linux
mpv --input-ipc-server=/tmp/mpv-socket <file>Start the application:
npm startOr build and run in one command:
npm run devNote: After making changes to the code, run
npm run buildornpm run devto rebuild.
The application will:
- Connect to Discord
- Monitor for MPV instances (with auto-reconnection)
- Update your Discord status in real-time
- Sync progress to MyAnimeList (if enabled and authenticated)
Automatically sync your watch progress to MyAnimeList. Requires one-time authentication.
For detailed setup instructions, see the MAL Sync Setup Guide.
Integrate Stremio Web with MPV to open streams directly in the player with smart playlist support.
Features:
- Full playback support for Kitsu content
- Enhanced series title and episode identification from Stremio
For setup instructions, see the Stremio MPV Bridge Guide.
-
IPC Connection: Connects to MPV via named pipe/Unix socket to get real-time playback data (title, position, duration, pause state)
-
Filename Parsing: Intelligently extracts series title, season, and episode from filenames using:
- βοΈ Cloud API (optional, no Python required)
- π» Local GuessIt CLI (if installed)
- π€ Regex Fallback (always available)
-
Metadata Fetching: If anime is detected, queries the Jikan API for cover images, translated titles, and episode data
-
Rich Presence: Formats and sends data to Discord with progress bars and state icons
Smart Caching: The parser caches results to avoid repeated API calls for the same filename, improving performance and reducing server load.
| Romaji | English | Filename |
|---|---|---|
![]() |
![]() |
![]() |
| showCover | showTitleAsPresence |
|---|---|
![]() |
![]() |
Enhance your MPV experience with these useful scripts from Eisa01/mpv-scripts:
| Script | Description |
|---|---|
| SmartSkip | Automatically skip intros, outros, and silence |
| SmartCopyPaste | Copy/paste video paths, URLs, and timestamps |
- @xhayper/discord-rpc - Discord RPC Client
- axios - HTTP Client
- dotenv -
.envloader - guessit - Filename parser
- Jikan - Unofficial MyAnimeList API
- AniList - AniList API
- Kitsu - Kitsu API
- PreMiD - Assets reference
Releases are automated with semantic-release on pushes to main, with two independent streams:
- Root app (
mpv-rpc)- Tag format:
mpv-rpc-v${version} - Changelog:
CHANGELOG.md - Includes commits that touch non-bridge paths.
- Tag format:
- Bridge app (
stremio-mpv-bridge)- Tag format:
bridge-v${version} - Changelog:
stremio-mpv-bridge/CHANGELOG.md - Syncs
stremio-mpv-bridge/package.jsonandstremio-mpv.user.js@versionin the same release commit. - Includes commits that touch
stremio-mpv-bridge/**.
- Tag format:
Versioning and release notes are generated from Conventional Commits.
- Do not run
npm versionmanually for project releases. - For local
semantic-releaseruns, use Node.js >= 20.8.1 (workflows use Node 22). - Local release helpers (dotenv-powered):
- Root:
npm run release:dry:root,npm run release:root - Bridge:
npm run release:dry:bridge,npm run release:bridge - Legacy aliases:
npm run release:dry(root dry-run),npm run release:local(root release) - For local runs, keep
GH_TOKEN(orGITHUB_TOKEN) in.env.
- Root:
Contributions are welcome. Feel free to open issues and pull requests.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Completed:
- Linux support (Unix sockets)
- Configuration via
.envfile - AniList API support
- Kitsu API support
- MAL sync (mark as watched)
- Guessit Cloud API - No Python required!
Planned:
- Metadata for movies and TV series (TMDb/OMDb)
- System tray (run in background)
- Graphical interface (GUI) for configuration
- Mini Mode (show only filename without metadata fetch)
- Usage statistics dashboard
- Trakt.tv integration (auto-scrobble)
MIT License - see the project files for details.




