akiirui/mpv-handler
Sobre
A protocol handler for mpv. Use mpv and yt-dlp to play video and music from the websites.
Design e mídiaCrescimento medido de estrelas
- em 24 h
- -1
- em 7 dias
- -2
- em 15 dias
- -3
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
Originalmpv handler
A protocol handler for mpv, written by Rust.
Use mpv and yt-dlp to play video and music from the websites.
Please use it with userscript:
Breaking changes
v0.4.0
To avoid conflicts with the mpv:// protocol provided by mpv.
mpv://...
mpv protocol. This is used for starting mpv from URL handler. The protocol is stripped and the rest is passed to the player as a normal open argument. Only safe network protocols are allowed to be opened this way.
Scheme mpv:// and mpv-debug:// are deprecated, use mpv-handler:// and mpv-handler-debug://.
Require manual intervention
Windows
Run handler-uninstall.bat to uninstall deprecated protocol, and run handler-install.bat to install new procotol.
Linux
If you installed manually, please repeat the manual installation process.
Protocol

Scheme
mpv-handler: Run mpv-handler without console windowmpv-handler-debug: Run mpv-handler with console window to view outputs and errors
Plugins
play: Use mpv player to play video
Encoded Data
Use URL-safe base64 to encode the URL or TITLE.
Replace / to _, + to - and remove padding =.
Example (JavaScript):
let data = btoa("https://www.youtube.com/watch?v=Ggkn2f5e-IU");
let safe = data.replace(/\//g, "_").replace(/\+/g, "-").replace(/\=/g, "");
Parameters (Optional)
cookies = [ www.domain.com.txt ]
profile = [ default, low-latency, etc... ]
quality = [ 2160p, 1440p, 1080p, 720p, 480p, 360p ]
v_codec = [ av01, vp9, h265, h264 ]
v_title = [ Encoded Title ]
subfile = [ Encoded URL ]
startat = [ Seconds (float) ]
referrer = [ Encoded URL ]
Installation
Linux
Arch Linux
Manual installation
Download latest Linux release
Unzip the archive
Copy
mpv-handlerto$HOME/.local/binCopy
mpv-handler.desktopto$HOME/.local/share/applications/Copy
mpv-handler-debug.desktopto$HOME/.local/share/applications/Set executable permission for binary
$ chmod +x $HOME/.local/bin/mpv-handler
Register xdg-mime (thanks for the linuxuprising and muse90673#122)
$ xdg-mime default mpv-handler.desktop x-scheme-handler/mpv-handler $ xdg-mime default mpv-handler-debug.desktop x-scheme-handler/mpv-handler-debug $ update-desktop-database $HOME/.local/share/applications/
Add
$HOME/.local/binto your environment variablePATHOptional: Copy
config.tomlto$HOME/.config/mpv-handler/config.tomland configure
macOS
- Install mpv and yt-dlp (with Homebrew, run
brew install mpv yt-dlp). - Unzip the macOS release, move
mpv-handler.appto Applications and open it once to register both URL schemes.
If macOS says Apple could not verify mpv-handler
Click Done. If you trust the download, go to System Settings → Privacy & Security. Under Security, click Open Anyway next to mpv-handler and confirm. If the button is missing, double-click the app in Finder and check the settings again. Apple’s instructions
The first time you open a debug link, macOS may ask to let mpv-handler control Terminal. Click Allow to see playback logs. Regular playback does not need this permission.
The app reads ~/.config/mpv-handler/config.toml and ~/.config/mpv-handler/cookies/, just like Linux. An absolute XDG_CONFIG_HOME in the app's environment overrides ~/.config.
To uninstall, move mpv-handler.app from ~/Applications or /Applications to the Trash. Your configuration and cookies stay in place.
To build for your Mac’s architecture, run cargo build --release --locked && sh share/macos/bundle.sh target/release/mpv-handler mpv-handler.app in the repository root. The release workflow builds the universal app.
Windows
Windows users need to install manually.
Manual installation
- Download latest Windows release
- Unzip the archive to the directory you want
- Run
handler-install.batto register protocol handler - Edit
config.tomland setmpvandytdlpath
Configuration
mpv = "/usr/bin/mpv"
# Optional, Type: String
# The path of mpv executable binary
# Default value:
# - Linux/macOS: mpv
# - Windows: mpv.com
ytdl = "/usr/bin/yt-dlp"
# Optional, Type: String
# The path of yt-dlp executable binary
proxy = "http://example.com:8080"
# Optional, Type: String
# HTTP(S) proxy server address
# For Windows users:
# - The path can be "C:\\folder\\some.exe" or "C:/folder/some.exe"
# - The path target is an executable binary file, not a directory
Explore projetos relacionados
Carregando…