Skip to content
Chrome extension that adds context menu option to play youtube (and other youtube-dl supported) videos with mpv.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

ytdl server

Chrome extension and Firefox add-on that adds context menu option to play youtube videos with mpv (or other external player).


  1. Chrome like/Firefox browser.
  2. python2 or python3
  3. youtube_dl module
  4. mpv or similar


Server side:

Arch Linux

Install the AUR package, youtube-mpv-git.

systemd unit files

In order to install the server with systemd, you will need to copy

  • youtube-mpv.service to /etc/systemd/user/youtube-mpv.service

Then you can install it with:

$ systemctl --user <enable|start> youtube-mpv.service

Note: these unit files assume is installed at /opt/youtube-mpv-git/ 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 ytdl-raw-options=yes-playlist= to your mpv.conf file.

Client side (browser):

  1. chrome://extensions/
  2. tick Developer mode
  3. Load unpacked extension...
  4. Choose chrome directory of this project.


  1. Navigate to script's directory.
  2. Run python


Change port, host or player, player options

Modify file.

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

Modify to set the NOTIFY_COMMAND to a command, such as notify-send on Linux to provide native notifications when a video cannot be found.

How does it work

Whenever 'Play with mpv' is selected in browser, url<youtube_url> is sent to listening server. Server checks if url is supported, extracts video url and starts player.


agiz, dcrystalj, ihavenoface, jamietanna



You can’t perform that action at this time.