Chrome extension and Firefox add-on that adds context menu option to play youtube videos with mpv (or other external player).
Install the AUR package,
systemd unit files
In order to install the server with systemd, you will need to copy
Then you can install it with:
$ systemctl --user <enable|start> youtube-mpv.service
Note: these unit files assume
ytdl_server.py is installed at
/opt/youtube-mpv-git/ytdl_server.py. You will need to amend the paths if you
have installed it elsewhere.
make sure you don't run this script as root (without sudo)
**Note: ** for playlist support add
Client side (browser):
- tick Developer mode
- Load unpacked extension...
- Choose chrome directory of this project.
- Navigate to script's directory.
Change port, host or player, player options
General (mpv) player options should be set (usually) in
~/.config/mpv/config. Specific options like provided
--no-terminal should be put in
OPTS variable and
separated with space ie:
--no-terminal --screen 1.
Receive native notifications on errors
ytdl_config.py to set the
NOTIFY_COMMAND to a command, such as
notify-send on Linux to provide native notifications when a video cannot be
How does it work
Whenever 'Play with mpv' is selected in browser,
sent to listening server. Server checks if url is
supported, extracts video url and starts player.