A URL protocol handler (mpv://
) for the mpv or mpv.net media players on Windows. This tool is designed to be used with the OpenList web application to open video links in mpv or mpv.net player.
mpv://
Protocol: Handlesmpv://
URLs to open videos in mpv or mpv.net.- Easy Setup: Simple command-line installation and uninstallation.
- Configurable: The path to
mpv.exe
ormpvnet.exe
is configurable. - Logging: Optional logging for troubleshooting.
- Custom User-Agent: Allows setting custom User-Agents for specific URL paths.
-
Download: Go to the Releases page and download the latest
mpv-handler.exe
. -
Place Executable: Move
mpv-handler.exe
to a permanent location on your computer (e.g., inside your mpv or mpv.net folder). -
Register Protocol: Open a Command Prompt or PowerShell as an administrator in the directory where you placed the executable and run the following command. Remember to replace the path with the actual path to your
mpv.exe
ormpvnet.exe
..\mpv-handler.exe --install "C:\path\to\your\mpv.exe"
If successful, you will see the message "Protocol installed and mpv path saved." A configuration file named
mpv-handler.ini
will also be created in the same directory.
Once installed, simply click the mpv
icon on the OpenList web video playback page, and it will automatically call the player to play the current video.
To remove the URL protocol from your system, open a Command Prompt or PowerShell as an administrator in the tool's directory and run:
.\mpv-handler.exe --uninstall
The tool uses a configuration file named mpv-handler.ini
, located in the same directory as the executable.
[mpv-handler]
mpvPath = C:\path\to\your\mpv.exe
enableLog = false
logPath = mpv-handler.log
[UserAgents]
aaa/bbb = "pan.baidu.com"
bbb/ccc = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0"
mpvPath
: Path to mpv.exe or mpvnet.exeenableLog
: Set to true to enable logginglogPath
: Path for the log file
You can specify a custom User-Agent for video sources under specific paths.
The key is a path prefix that will be matched against the part of the URL after /d/
. For example, for the URL https://.../d/aaa/bbb/ccc
, the path used for matching is aaa
or aaa/bbb/ccc
.
This project is licensed under the GNU General Public License v2.0. See the LICENSE file for details.