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:
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.Text processing on the Command Line - sharing my tools
Text processing on the command line - sharing my tools Introduction I'm quite fond of the command-line and spend a larger chunk of my life in a terminal emulator than I dare admit. I try to embrace the unix philosophy of using tools that "do one thing…
via Proycon's website July 7, 2024Linux phones are not automatically secure
A common point in the Linux community is that escaping the walled garden of ecosystems like Android or iOS is already a means to higher security. Having no contact with Google or Apple servers ever again, nor cloud providers ever snooping on your private …
via TuxPhones - Linux phones, tablets and portable devices January 25, 2023Generated by openring