Ditch plex/jellyfin/kodi (or worse Netflix)! My favorite mpv scripts

Published 2022-01-09 on Anjan's Homepage

mpv is my favorite video player. It has a lot of user scripts written in a variety of programming languages. Many people install jellyfin, plex, or kodi to emulate a netflix-like experience. Here’s how I am able to emulate a netflix-like experience with mpv using user scripts:


skiptofade.lua skips til a black screen appears. This allows you to skip intros to shows very easily by pressing a keybinding. The default keybinding to run this macro is b.


nextfile.lua allows you to open the next or previous file from the directory the video currently open. As such, when an episode finishes, you can press shift+RIGHT to go to the next episode.


When you close a video, history-bookmark.lua will save a .mpv.history file in the directory from which the video is located. Next time you open any file in that directory with mpv, history-bookmark.lua will prompt you to continue the last episode you watched from that directory. Pressing ENTER will jump to the last episode you watched in that directory, pressing n or doing nothing will resume the episode you originally opened. After adding save-position-on-quit to your mpv.conf and setting up a nfs share to share your media directory, you are able to sync your media watching history across devices.


webm.lua allows you to easily make webms using clips of stuff you are viewing via mpv. Press Shift+w to open up the onscreen instructions and activate the script’s keybindings. This script allows you to easily share funny clips of shows you are watching with your friends. webm.lua is the easiest webm generator I have used.


Putting save-position-on-quit in your mpv.conf only updates your “watch later” data when mpv closes. autosave.lua is a simple script that periodically updates your “watch later” data. It’s very useful in case mpv crashes, Xorg/wayland crashes, etc.

Firefox: openwith

mpv is the best video player and I always want to use it to watch videos. I use invidious to look browse videos without youtube’s bloated and privacy invading ui 1. The Firefox plugin: Open with allows you to easily open links with another browser. I have add “mpv” as an application I want to open links with so that I can take advantage of all the scripts above whenever I’m watching a video on the internet.

Opening videos with mpv is even easier in qutebrowser.

Remember to install yt-dlp, the successor to youtube-dl so that you can use mpv with most websites that serve video.

What are your favorite mpv scripts? Feel free to leave a comment in my public inbox!



You can setup links from youtube to automatically redirect to invidious using this plugin for Firefox or modifying this script for qutebrowser. If you are using the qutebrowser script, remember to load redirectors.py in your config.py using according to the logic here.

Have a comment on one of my posts? Start a discussion in my public inbox by sending an email to ~anjan/public-inbox@lists.sr.ht [mailing list etiquette]

Articles from blogs I follow around the net

These articles/blogs do not represent my own opinions or views.

The Revenge of the Hot Water Bottle

Imagine a personal heating system that works indoors as well as outdoors, can be taken anywhere, requires little energy, and is independent of any infrastructure. It exists – and is hundreds of years old.

via LOW←TECH MAGAZINE January 20, 2022

Help Chile write free software values, privacy, and digital sovereignty into their constitution

For those out of the loop, a group which included myself up until recently,1 Chile is in the midst of a revolution. They’re fighting against the increased cost of living, privatization of essential services, and worsening inequality — problems facing everyon…

via Drew DeVault's blog January 19, 2022

Generated by openring