/play-with-mpv

WebExtension and python server that allows you to play videos in webpages with MPV instead

Primary LanguageJavaScriptThe UnlicenseUnlicense

Play with MPV

WebExtension and python server that allows you to play videos in webpages with MPV instead.
Works on hundreds of sites thanks to yt-dlp, and even torrents if you install peerflix.

Installation

  1. Install MPV
  2. Install Python 3.10+ and pip
  3. Install the chrome or firefox extension
  4. Run pip install git+git://github.com/mkody/play-with-mpv --user
  5. Start server by running play-with-mpv

(optional) Install fair-use extension.
(optional) Install peerflix to stream torrents.
(optional) Install mkchromecast pip install git+git://github.com/muammar/mkchromecast --user and this extension.
(recommended) Install yt-dlp through your package manager for frequent updates.

Usage

Right-click this link and select "Play with MPV". MPV should popup and start playing the video. (Ctrl+Space also works)

screenshot

Autostart

  • Linux: cp {/usr,~/.local}/share/applications/mkody.play-with-mpv.desktop ~/.config/autostart
  • MacOS: instructions
  • Windows instructions

Protips

MPV is highly configurable, this is just how I like to use it.

To start in the corner, have no border, and stay on top: edit ~/.config/mpv/mpv.conf

ontop=yes
border=no
window-scale=0.4
geometry=100%:100%

In order to resize the window without borders, add keybinds: edit ~/.config/mpv/input.conf

` cycle border
ALT+UP add window-scale 0.05
ALT+DOWN add window-scale -0.05