My personal mpv config.
Note
Releases of the modernx script are in a seperate repository - see here https://github.com/zydezu/ModernX/releases.
Use git clone https://github.com/zydezu/mpvconfig mpv, and place it in the relevant directory. This will be typically located at \%APPDATA%\mpv\ on Windows and ~/.config/mpv/ on Linux/MacOS.
Flatpak Instructions (from #21)
Use mkdir -p ~/.var/app/io.mpv.Mpv/config to make the mpv configuration directory for the first time
cd ~/.var/app/io.mpv.Mpv/config
git clone https://github.com/zydezu/mpvconfig mpv to clone the config files as mpv/
flatpak override --user io.mpv.Mpv --filesystem=host, needed for mpv flatpak to access host filesystem, so screenshots and lyric downloads can be saved
See the Files section in mpv's manual for more information.
For files with 5.1 or 7.1 surround sound, you may need to set Audio enhancements to Off in the windows sound settings to hear all the audio channels properly.
Please note that many of these scripts have been slightly modified from their initial repositories. Compare the scripts to find the modifications.
| Script and description | Keybinds |
|---|---|
| autoloop loops files by default that are smaller than a set duration | None |
| autolyrics tries to download lyrics and display them for said file | Alt+m - Request lyrics from musixmatch then netease if that fails Alt+n - Request lyrics only from netease Alt+o - Set lyrics start point to the current timestamp (if lyrics need to be synced) |
| copypaste Copy and paste file paths, URLs and timestamps | Ctrl+c - Copy file path or URL to clipboard Ctrl+v - Paste file path or URL and play it o - Open file location or URL in browser |
| detectdualsubs Detects if there are two existing subtitles, one being an original script and the other being a translation (eg: English and Japanese subtitles) and displays them both on screen | Ctrl+x - Toggle dual subs on or off |
| loadaudiotracks Allows multiple audio tracks to be selected and played together | Ctrl+z - Toggle another audio track |
| modernx a modern OSC for mpv with many additional features | z - Cycle through audio tracks x - Cycle through subtitle tracks p - Pin or unpin the window Tab - Show chapter list Ctrl+s - Shuffle the current playlist For more: See repository |
| mpvcut allows clipping a segment of a video | z - Mark start segment z (again) - Clip the video Shift+z - Cancel the clip a - Change mode (copy, encode, compress) |
| screenshotfolder saves screenshots to a designated folder | s - Take a screenshot |
| selectformat allows you to change the quality of internet videos on the fly | Ctrl+f - Open format menu Use up and down to choose a resolution, and fold and unfold selections with the arrow keys to see more codec options |
| sponsorblock a fully-featured port of SponsorBlock for mpv | See repository |
| thumbfast show thumbnails when hovering the progress bar | None |
| input.conf an input configuration file | - - Decrease subtitle font size + - Increase subtitle font size Scroll wheel - Change volume |
- FIX: reduce autofit size
- FEAT: add the ability to change codecs using a keybind in
mpvcut.lua - FIX: add the encoding type to files made by
mpvcut.lua - FEAT: add the webp option to
mpvcut.lua
- Tweak
input.conf
- FIX: fix screenshotting (unpack) on different systems
- FIX: fix zydezu/ModernX#76
- FIX: remove
screenshot-swfrommpv.conf - FIX: rename some variables in
modernX.lua
- FEAT: add a new option:
show_skip_message, tosponsorblock.lua
- FIX: fixed YouTube shorts breaking
modernx.lua - FIX: fix comments download path in
modernx.lua
- FIX: use
table.unpack()instead ofunpack()inscreenshotfolder.lua
- FIX: add watch-later-options-remove=sub-pos to mpv.conf
- FIX: add version numbers to modernx.lua
- FEAT: add screenshotting to clipboard, based on code from https://github.com/ObserverOfTime/mpv-scripts/blob/master/clipshot.lua in
screenshotfolder.lua - FIX: screenshot text showing up on the UI even if
show_messageis false inscreenshotfolder.lua
- FIX: fix
autolyrics.luacrashing if no lyrics are found
- FIX: fix pictures directory on linux
- FIX: improve downloading in
autolyrics.luaby using lrclib.net
- FIX: move the mpv folder from
~~desktopto~/Pictures - FIX: add more crf options to
mpvcut.lua
- FIX: improve
livechat.lua
- FIX: add
unc2url.luaand make various changes to playing network files
- FIX: remove
disablehwforp010.lua
- FIX: add
disablehwforp010.lua
- FIX: adjust crf values in
mpvcut.lua
- FEAT: add
av1_animated_crfas an option inmpvcut.luathat controls the quality for animated avif clips
- FIX: added #26 double click to fullscreen
- FIX: small text changes
- FIX: fix silly error
- FIX: change autocreate-playlist to same
- FIX: fix #23
- FIX: add some basic image viewing options
- FIX: edit quality parameters
- FIX:
mpvcut.luanow encodes/compresses the right audio track, and no longer compresses it
- FIX: fix a typo
- FEAT: added the ability to clip as
.gifor.avifinmpvcut.lua, you can choose which with thegif_encoding_typeoption
- FIX: optimise
screenshotfolder.lua
- FIX: fix performance issues
- FIX: improve cutting in
mpvcut.lua
- FIX: fixed window positions shifting when advancing through a playlist
- FIX: fix
mpvcut.luanot respecting theencoding_typeoption when encoding a clip
- FIX: add back
sponsorblock.lua - FIX: remove millisecond workaround in
autolyrics.lua
- FIX: stop
thumbfast.luathrowing errors
- FIX: make seeking faster for longer videos
- FEAT: add the options
show_top_markandshow_bottom_marktomodernx.lua
- FEAT: add
livechat.lua
- FIX: fix HDR tonemapping on
thumbfast.lualooking weird - FIX: update
thumbfast.luato upstream
- FEAT: added
updatechecker.lua, you can disable it by changing theupdate_checkeroption
- FEAT: added
encoding_typeas an option tompvcut.lua, the supported options areh264,h265andav1.h265is the default - FIX: force
mpvcut.luato encode/compress files as.mp4
- FIX:
Ctrl+xnow toggles dual subtitles indetectdualsubs.luainstead of only forcing them on - FIX:
mpvcut.luanow usesato select cuts,Shift+ato cycle cut modes andCtrl+ato cancel - FIX:
modernx.luanow useszandxto cycle through audio and subtitle tracks respectively - FEAT: added
loadaudiotracks.luato allow multiple audio tracks to be played at the same time
- FEAT: add
copy_youtube_timestampas an option tocopypaste.lua, that copies YouTube links with the current timestamp to be pasted
- FIX: refine shuffling playlist in
modernx.lua, you can now shuffle a playlist withCtrl+sor by right-clicking the play/pause button - FIX:
autolyrics.luaandmpvcut.luafailing to create directories on linux
- Optimised code
- FIX: fix splitUTF8 in
modernx.lua, splitting CJK characters in the clickable description properly - FEAT: create autosubfontchange.lua, which changes the subtitle font depending on the language detected in the subtitles
- FIX: you can now left click the screen to pause
- FIX: remove whitespace in
modernx.lua - FIX: implement zydezu/ModernX#68
- FIX: implement zydezu/ModernX#69, adding
osc_keep_with_cursor,seekbar_between_timersandseekbar_heightas options inmodernx.lua - FIX: fix zydezu/ModernX#67
- FIX: implement #18, adding
save_location,time_stamp_formatandsave_based_on_chapter_nameas options inscreenshotfolder.lua - FIX: implement zydezu/ModernX#66, adding
fade_transparency_strengthandwindow_fade_transparency_strengthas options tomodernx, this also removes the optiontitlebarbox
- FEAT: add the option
removeuuidtosponsorblock.lua
- FIX: don't run netease automatically when Alt+m is pressed in
autolyrics.luaas it seems to be unreliable - FIX: use
mp.inputinautolyrics.luaand fix filenames
- FIX: artist not showing in description in
modernx.lua
- FIX: crash when changing video with no internet in
modernx.lua - FIX: re-order artists in
autolyrics.luaandmodernx.lua - FIX: improve metadata description in
modernx.lua
- FEAT: added short_saved_message as an option in
screenshotfolder.lua - FIX: add
sub-use-margins
- FEAT: add keybinding for shuffling playlist in input.conf
- FIX: audio/tracklist indicator not showing selected track correctly in
modernx.lua - FIX: changes to Japanese lyric detection in
autolyrics.lua
- FEAT: set subtitles to a non-forced sub track as defined by --slang, in
detectdualsubs.lua
- FIX: sponsorblock segments not rendering properly in modernx
- FIX: fix some subtitles not showing up on YouTube videos
- FIX: ytdl formats not being respected in modernx.lua
- FIX: crop text properly on title bar
- FIX: add edge date case
- FEATURE: added coloured segments on the progress bar, like on Youtube with SponsorBlock to
modernx.lua- NOTE: requires a custom version of sponsorblock.lua https://github.com/zydezu/mpvconfig/blob/main/scripts/sponsorblock.lua - This adds the following options:
show_sponsorblock_segments,add_sponsorblock_chapters,sponsorblock_sponsor_color,sponsorblock_intro_color,sponsorblock_outro_color,sponsorblock_interaction_color,sponsorblock_selfpromo_colorandsponsorblock_filler_color - Fix
seekbar_cache_colortomodernx.lua - Added
progress_bar_heighttomodernx.lua - FIX: fix thumbnail border clipping through text weird
- FEAT:
modernx.luanow sets the tick rate to the monitors refresh rate - FIX: fix state.title_bar not being respected after pinning

- REFACTOR: organise options in mpv.conf
- FIX: add script-binding keybindings to input.conf
- FIX: title and description text is now cropped properly and doesn't run off screen
- FIX: change some mpv.conf settings
- UPDATE: bring
selectformat.luaup-to-date with https://github.com/koonix/mpv-selectformat - REFACTOR: refactor all scripts
- FEAT: create
detectdualsubs.luathat detects if there are two existing subtitles, one being an original script and the other being a translation (eg: English and Japanese subtitles) and displays them both on screen
- FIX: fix modernx.lua crashing if playing a live radio (m3u8 file)
- Re-add
key_bindingsinmodernx.lua - Fixed some options not being read correctly in modernx.conf files
- Fix lyric formatting
- Add
strip_artistsandchinese_to_kanji_pathoptions toautolyrics.lua
- Improve code in all scripts
- Seperate parts of
autoloop.luaintocopypaste.lua - Fix making web cache clips (clipping web videos) in
mpvcut.lua - Remove
autoload.luaasautocreate-playlistinmpv.confreplicates it's functionality
- Adjust default
compresssizevalue inmpvcut.luato 9.50MB
- Set
mpvcut.luadefault compress size target to 9.00MB (THANKS DISCORD >~<0) - Added
AOTFShinGoProMedium.otfto the fonts folder as it is used inmpv.conf - Improved descriptions
- Add fallback for chapters with no names in
modernx.luato prevent a crash - Add buffer indicator on
modernx.lua
- Changed code comments in
mpv.conf - Rename 'localsavetofolder' to 'savetodirectory' in
mpvcut.luato describe the option better
- Add various options and features from https://github.com/Samillion/ModernZ
- Reorganised user_opts
- Changed hover effect on buttons
- Fix file size displaying a wrong value
- Downloads and file size estimations now respect
mpv.conf'sytdl-formatoption if set - Added chapter display next to the time
- Added more sizing and color options
- Order formats in
selectformat.luaby bitrate modernx.luafixes to comment parsingmodernx.luanew icons
- Implement zydezu/ModernX#58
- Implement zydezu/ModernX#59
- Add
dynamictimeformatoption tomodernx.lua
- Fix the 2K rendering profile (don't include only audio files with large album art in the condition)
- Change subtitles styling
- Change subtitles styling
- Better logging for
autolyrics.lua
- Implement zydezu/ModernX#50
- Implement zydezu/ModernX#51
- Implement zydezu/ModernX#54
- Implement zydezu/ModernX#45
- Changed some configs
- Added an option for a screenshot button to
modernx.luazydezu/ModernX#40 - Update
screenshotfolder.luato not include file extensions in folder directories - Improved YouTube comment parsing and viewing in
modernx.lua
- Fixed bitrate calculations in
mpvcut.lua - Fixed
mpvcut.luabreaking when 'compressing' audio files
- Fix zydezu/ModernX#36, reverting the keyframe change (button functions are swapped)
- Fix zydezu/ModernX#35
- Fixed thumbnail being behind OSC text
- Added
selectformat.lua, allowing you to change the quality of internet videos on the fly mpvcut.luanow stops overwriting previously cut files- Fixed
autoloopnot staying disabled over a playlist of files - Implement https://github.com/dexeonify/mpv-config/commit/583faf0
- In modernx,
shift+left clickon the seekbar now scrubs to the exact position, whilstleft clicknow scrubs to the keyframe position (faster)
- Prevent downloading comments if the option is disabled on web videos in
modernx.lua - Stopped auto downloading lyrics on songs in
autolyrics.lua - Fixed album artist not registering in
autolyrics.lua - Fixed trying to save lyric files with "/" or "" in their names in
autolyrics.lua - In
modernx.luaalbum artists and artists (from the file metadata) and now displayed separately, instead of where previously 'artist' would override 'album artist'
- Fix crashing when no comments are loaded
- Fix downloading comments for more various YouTube links, like
https://www.youtube.com/watch?v=Pbb40i1khlc&list=WL&index=3
- Round file size to 1dp
- Fix downloading comments for YouTube links with
?=
- Removed cmd flickering when opening downloaded file
- Add 'o' binding to
autoloop.luato open the file location or url in web browser - Tweaked wording on YouTube description
- Fixed title not loading on videos fetched from a URL
- Added commas to view, comments, like and dislike counts
- Fix some old YouTube descriptions breaking line breaking
- Made '...' in descriptions make grammatical sense
- Changed default download settings to improve speed and keep the file size approximation accurate
- Fix for zydezu/ModernX#28
- Add note about colour formats in the config, how they should be in the format: BBGGRR http://www.tcax.org/docs/ass-specs.htm
- Improved the comment parsing
- All YouTube videos should load comments correctly
- Added pages to comments to not lag out player by rendering them all at once
- Changed some file approximation tooltip
- Changed window title loading conditions
- Added pasting functionality to mpv, you can use Ctrl+V (or the equivalent paste command) to open file paths and URLs, or navigate to timestamps
- Pressing Ctrl+C will copy the path or URL of the currently playing video
- Fixed
autoload.luaadding out of order playlists when directly accessing a file path - YouTube expanded descriptions automatically refresh when more information is loaded
- Increased chapter/playlist list size (limited_list function)
- Stopped descriptions beginning with 'A' breaking
- Made descriptions load and display faster
- Simplified video descriptions shown under the title - full details can still be seen by clicking
- Tweaked formatting on audio only metadata (By: Artist - Album -> Artist | Album)
- Improved zydezu/ModernX#22
- Added
dontsaveonaudiotoautoloop.lua, which doesn't save the current position on audio files
- Changed tick rate
- Made description font sizes consistent between videos
- Added
descriptionfontsizeto modernx - Changed default font size in modernx
- Enable thumbfast on YouTube videos (enabling the
networkoption)
| New font v2 | New font | Old font |
|---|---|---|
![]() |
![]() |
![]() |
- Update default font settings
- Tweaked
dynamictitlein ModernX to be cleaner - Added
automatickeyframemodeandautomatickeyframelimitto modernx, resolving zydezu/ModernX#23
- Try to fix zydezu/ModernX#14
- Fixed zydezu/ModernX#25
- Fixed a crash that sometimes occured when changing videos in a playlist
- Fixed playtime showing '-00:00' for a short time upon file load
- Cleaned up debug messages in the terminal
- Fixed persistentprogresstoggle changes not showing without mouse movement or OSC showing
- Removed 'NA' showing up in audio/subtitle tooltips
- Improved
cacheloadingon autolyrics.lua
- Fixed thumbnail chapters not showing, resolving zydezu/ModernX#21
- Cut scripts I don't use for faster file opening times
- Fixed downloading not working on a playlist of videos
- Removed debug code
- Fix yt descriptions with % crashing modernx
- Fix command message placement in modernx
- Made description splitting consistent between online and local videos
- Added the ability to toggle the persistent progress bar, with the
bkey, ifpersistentprogresstoggleis enabled
- Merged zydezu/ModernX#10, fixing some formatting in
modernx - Merged zydezu/ModernX#11, updaing the audio/subtitle icons in
modernx - Fix reply icon
- Merged zydezu/ModernX#12, adding the option
keybindingstomodernx
- Added
showfilesize, fixing zydezu/ModernX#7 - Fixed persistentprogress handle bar size, zydezu/ModernX#8
- Fixed #13
- Fixed description text positioning
- Fix zydezu/ModernX#6
- Made switching between web videos in playlists in
modernxmore seamless, instantly clearing the description - Improved the description string splitting functions in
modernx
- Added
downloadpathinmodernx, fixing zydezu/ModernX#4 - Fixed CJK characters in video description and uploader name, fixing [#12]
- Added an experimental toggle to view comments of a video (very unstable)
- Fixed fetching dislikes via the YouTube Dislike API in
modernxand screenshotting inscreenshotfolder.luawhen viewing YouTube short 'share' links, along with thedynamictitleoption - Updated dislike formatting and error checking
- Altered the default yt-dlp settings in modernx.lua to make it work better on more video players, these change be changed with
ytdlpQuality - Added the
updatetitleyoutubestatsoption in modernx.lua, which when enabled, updates the window/OSC title bar with YouTube video stats (views, likes, dislikes) - Implemented cyl0/ModernX#59
- Added the
persistentprogressheightoption to modernx.lua, as part of this issue
- Fixed CJK characters not showing in screenshot folder and file names
- Implemented
persistentprogressandpersistentbufferin modernx.lua
- Fixed issue: Seekbarhandle does not hit the end position
- mpvcut fixed cache saving for certain web videos with specific characters in media names
- screenshotfolder CJK fix... again
- autolyrics now loads previously downloaded subtitles instantly, the script is smarter with what to download, using the new option
cacheloading - In autolyrics filenames are now closer to the track's name, also CJK filenames fix
- Stopped a crash when switching subtitles at the same time another external track added
- Added the ability to choose a directory to save clips in (required for web video cache saving), using
savedirectory - Implemented saving clips from web videos, using the cache in mpvcut.lua based off https://github.com/Sagnac/streamsave
- Stopped autolyrics.lua crashing when
downloadforallis disabled
- Fix a bug with calculating file size
- Fixed some dates crashing modernx.lua
- Added the
dontsavedurationoption to autoloop.lua, which doesn't save the position of videos under the specified length, but also doesn't loop them - perfect for short videos under a minute or so - Opening the downloaded file's folder now works for other operating systems (this needs testing)
- Enabled
autolyrics.luafunctionality for YouTube videos, and .lrc files can now be saved to a specified path - Fixed
autolyrics.luaon unix systems
- Fixed this issue - [modernx 0.2.3] The OSC doesn't hide #7... this is because I forgot to finish writing this line...
if (not (state.paused and user_opts.donttimeoutonpause)) then
hide_osc()
end- Fixed screenshotting playing YouTube videos screenshotfolder
- Fixed quality menu for ytdl:// playing videos
- Edited video info formatting
- When playing YouTube videos, information like views, likes and dislikes are added to the window title
- modernx.lua properly respects the
raisesubswithoscoption
- Fixed a bug with
user_opts.dynamictitlein modernx.lua not properly updating the title when switching video in a playlist - Made changes to autolyrics.lua, specifically improving the
options.downloadforallfeature - Updated qualitymenu.lua from its repository to 4.1.1 - 2023-Oct-22
- Adapted lrc.lua, to automatically download lyrics for songs (with metadata)
- The description now doesn't prevent you from clicking buttons
- The description closes properly when navigating files in a playlist
- Tweaked metadata formatting
- Fixed a crash in modernx.lua, where some date metadata could cause a crash
- Fixed description line breaks not working in description metadata of some old youtube videos
- Added the
donttimeoutonpauseoption, which when enabled, doesn't hide the osc whilst hovering over it, when paused. - Changed filename formats when cutting a video
- Fixed error loading modernx.lua with mpv v0.37.0-7
- Made
user_opts.titlefunction properly - Tweaked some messages
- Tweaked some config scripts
- Videos that auto loop ignore
save-position-on-quit, so always play from the start, this option can be configured inscript-opts/autoloop.confasplayfromstart=false(to disable) - Replaced mpvcut.lua with a heavily modified one from https://github.com/familyfriendlymikey/mpv-cut, that should provide faster compression
- More consistant code
- Added a dislike counter (under the description) for supported YouTube videos
- Made improvements to the formatting of the description/clickable description - especially with web videos
- Additionally date formatting is now an option
user_opts.dateformat
- Added the keybind CTRL/Shift + left/right to jump to the previous/next chapters
- Changed compact mode key bindings, right clicking now goes to the previous/next chapter, shift clicking now jumps backward/forwards a minute
- Made OSC timing out smarter
- Fixed the issue: Mute button not working as expected #5
- Fixed a crash when pressing Shift on the playlist buttons
- Fixed virtual title bar when toggling border/pinning
- Added shadertoggle.lua
- Fixed a bug that would crash the ModernX OSC
- Fixed a small download bug
- Fixed UI not scaling properly on mpv.net
- Fixed download location on unix systems
- Added more keybinds (X and C for cycling audio and caption tracks)
- Fixed long metadata lag
- Fixed subtitles sometimes showing in the wrong position when toggling window pinning or fullscreen
- OSC shows up when using keybinds (Shift + < or Shift + >) to change playlist items
- Fixed a crash when dragging the seekbar quickly to the end, and the next video immidiately playing
- Added an option to change the font size of the time text
- Screenshotting now renders subtitles at the correct position, even when OSC is showing
- Pressing
Pwill now pin the window - Changed download filename formatting
- Removed some unused settings,
- Improved the
dynamictitlesetting as it now incorporates file metadata
- Bug fixes
- Fixed m3u files crashing
modernx.lua
- Fixed long descriptions lagging the player
- Added a scrolling description box
- Added an approximate download size to the download button
- Revamped settings
- Tweaked description error handling
- Fixed pasting some links
- Updated the autoload script
- Fixed broken icons on some systems
- Fixed some bugs
- Changed screenshot and download file destinations
- Fixed some bugs
- Added a download icon on web videos
- Updated some scripts
- Fixed subtitle positioning when OSC is shown on different resolutions
- Added an option for round icons
- Slightly tweaked settings
- Added an osc message on screenshot
- Slightly changed file path and duplicate screenshots
- Optimised code
- Increased OSC message duration
- Tweaked the quality menu
- Quality menu now works with ytdl:// links
- Added a keybind to toggle shaders (temporary)
- Added a dynamic title option to ModernX, change the title depending on if {media-title} and {filename} differ (like with playing urls, audio or some media)
- Taking multiple screenshots in a second (with timestamp) mode on will now save them all without error
- Tweaked some settings
- Tweaked some code
- Tweaked some configuration files
- Revamped 'mpv.conf'
- Created
screenshotfolder.lua, saving screenshots in~~desktop/mpv/[filename] - Created
input.conf, and added the quality menu to it
- Added the 'thumbnailborder' and 'raisesubswithosc' options
- Changed config file
- Changed hover behaviour
- Reduced flickering
- Fixed a debug message showing
- Add window title to borderless and fullscreen mode
- Fixed some bugs with icons
- Added ability to hide pin window button
- Changed some phrasing
- If titlebar isn't showing, OSC will now show when the mouse is at the window buttons
- Tooltips now always stay on the screen
- Pinning the window will remove the border, unpinning will show it
- Right clicking the ontop button will not change border status
- Added
sponsorblock.py
- Added pin window (stay ontop) button
- Lots of bug fixes
- Added compact mode
- Added loop button
- Added more clicking events
- Fixed many bugs
- First fork, added scripts










