Configuring MPV

Written by abe <abe@dismail.de>
Last modification on

[Return]

MPV is the best player

MPV (on GNU/Linux) is undoubtedly the most extensible media player ever made, it works from the terminal, it plays almost anything you throw at thanks to the ffmpeg team's work it's easily configurable, it's actively developed and has a myriad of extensions in every language under the sun (Lua, Python, C, JavaScript and more)

MPV for Everything

MPV is so great you can (and should) use it for everything with it's powerful extensions making it do anything and the robust configuration making it do exactly what you want, MPV uses yt-dlp to play online media from a wide variety of supported platforms including but not limited to YouTube, Vimeo, PeerTube, Odysee, BitChute etc... this already makes it better because the quality of the player and possibly the UI is no longer a factor in your use of a video sharing website this also has the effect of blocking non integrated ads so the at least the platform doesn't make money off your time and view and at most you watch what idiots watch without pushing them in the algorithm or giving them partner money.

MPV for More

Why stop there? The above mentioned features were just what comes by default and they are not all what mpv has offer.

You see; mpv has extensions!

First we can add mpv_sponsorblock to skip in-video sponsorships, which don't help creators anyway since views through yt-dlp don't count.

It's worth mentioning the multiple other implementations of the sponsorblock api like sponsorblock-mpv-local that uses shell and mpvsponsorblockminimal which uses the mpv-native lua.

show_chapters.lua helps you view chapters and their names and their time at the bottom corner

mdmenu.lua is neat a collection of lua scripts that use dmenu - a suckless option selector - to pick playlist items, media stream and video chapters instead of the unusable native on-screen-text and keyboard shortcut combination.

If you have a bad internet connection you probably hate that mpv defaults to the highest video quality video option so you can use ytdlautoformat to set the default quality for websites and youtube-quality to change the quality on the spot.

Next, there is a videoclip which does what's on the can, it helps you easily create video and audio clips with a few key presses that are saved through AVC1+AAC or VP9+Opus.

If you use mpris and playerctld then you will need mpv-mpris (written in C) after make(1)ing the script, you can just run playerctl -p mpv play-pause to pause mpv from CLI.

Lastly, if you have an unstable computer or an unstable attention span, you might want to try autosave.lua writes your progress every minute instead of using the shift+q key-bind to exit the player and save your progress as is supported natively.