Open YouTube (And More) Videos From Your Web Browser With mpv [Firefox, Chrome]

play with mpv handler

mpv-handler is a protocol handler for mpv written in Rust which, accompanied by a browser userscript, allows users to open videos from YouTube, Twitch and Bilibili with mpv.

It works with both Firefox and Chromium-based web browsers on Linux and Microsoft Windows, without making use of any background service.

With everything set up, visiting a video on one of the websites mentioned above, a new button is displayed on the video web page (in the bottom left-hand side corner), allowing you to play that video using mpv, a free and open source media player.

From its settings, you can control the video quality and if you want to pass cookies or not, useful to watch member videos.

Since mpv makes use of youtube-dl to play the videos, and youtube-dl supports hundreds of websites, you can add support for other video sharing websites yourself, by editing the "Play with mpv" user script.

Using this is especially useful if your web browser doesn't support hardware-accelerated video playback. In this case, playing the video in mpv (with hardware-acceleration enabled) should result in smoother playback of high quality videos, as well as lower CPU usage (and thus, less battery draining). Using this also means that you won't get any in-video ads.

Posted by WordPress Guru