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

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

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.

history-bookmark.lua

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

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.

autosave.lua

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!

Footnotes:

1

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.

What if We Replace Guns and Bullets with Bows and Arrows?

The bicycle and the bow are both highly efficient, human-powered technologies that could substitute for two very harmful alternatives: the car and the firearm. Why do we promote one but not the other?

via LOW←TECH MAGAZINE December 2, 2022

I shall toil at a reduced volume

Over the last nine years I have written 300,000 words for this blog on the topics which are important to me. I am not certain that I have much left to say. I can keep revisiting these topics for years, each time adding a couple more years of wisdom and impro…

via Drew DeVault's blog December 1, 2022

GNOME Shell is one step closer to Linux phones

Our first post ever on this website was about the GNOME Project "getting ready" to adapt their environment to the growing demand of responsive, mobile-friendly Linux devices. That was back in 2019, before libhandy (Gtk mobile library) was consider…

via TuxPhones - Linux phones, tablets and portable devices November 15, 2022

Generated by openring