dexeonify/mpv-config

MPV.net ModerX and thumbnailer

Closed this issue · 20 comments

whats the best way to set this up based on my install discussed before?

Check out #1. Thumbnailer.lua does not work that well in mpv.net, so you will have to use mpv_thumbnail_script. The .zip file there is outdated, but I guess I can make a new one with the latest changes to the thumbnail script and OSC.

That be great together we can make mpg functional I love that it has a context menu is a more Windows centric version of MPV sometimes I think that both MPV and MPV net fantastic but lack average user functionality because it is made by a certain type of user base

Here's the updated files:
mpv_thumbnail_script-modernx.zip

You can read more about how to configure the thumbnail script here.

Since you are using my fork, there are a few things you need to note:

  • You have to install my icon font as I used a different font than the original MordenX
  • Rename mordenx to modernx in your input.conf
     Del     script-binding mordenx/visibility           #menu: View > Toggle OSC Visibility
    
    to
     Del     script-binding modernx/visibility           #menu: View > Toggle OSC Visibility
    
  • I used mpv's own logo as the idle icon, so it should not conflict with mpv.net's logo.

@dexeonify thumbnails are working despite instructions

You meant not working? Anything printed in the console?

how do i pull that up?

Right click -> View -> Show Console or press `

No errors there. By default, the thumbnails are autogenerated so it should be obvious when you hover the OSC. Is there a mpv_thumbnail_script_server.lua file together with modernx.lua in the scripts folder?

mpv_thumbnail_script.conf is in opts with osc.conf

mpv_thumbnail_script_server.lua is in scripts

From what I gather after reading through related issues in mpv.net's issue tracker, you have to add mpv into PATH (yes the official mpv, not mpv.net). Modifying the code to use mpvnet doesn't work. Either that, or use ffmpeg, which you have to add to the PATH as well. It's a little bit faster too.

The weirdest of all is that it doesn't error out when it's failing. What's up with that?

@dexeonify how do i set that?

Ah, mpv_thumbnail_script by default only show thumbnails for videos shorter than 1 hour. You did say you were playing a movie, so it should be more than 1 hour long.

Open mpv_thumbnail_script.conf and try changing autogenerate_max_duration in seconds, like 7200 for 2 hours.

# Only automatically thumbnail videos shorter than this (in seconds)
# You will have to press T (or your own keybind) to enable the thumbnail previews
# Set to 0 to disable the check, ie. thumbnail videos no matter how long they are
# Defaults to 3600 (one hour)
autogenerate_max_duration=3600

To install FFmpeg:

  1. Download a FFmpeg build. I can recommend Gyan.dev's build: ffmpeg-git-essentials.7z.
  2. Extract ffmpeg.exe inside the bin/ folder with 7-zip. ffplay.exe and ffprobe.exe are nice to have but isn't needed for the thumbnail generation.
  3. Place ffmpeg.exe somewhere, like C:\ffmpeg.exe.
  4. Add ffmpeg into PATH.
    1. Start menu > Edit the system environment variables > Enviromment variables > System variables
    2. Select the entry with "Path", then click Edit...
    3. Click New, then Browse... and choose the folder you put ffmpeg.exe in.

Go back to mpv_thumbnail_script.conf and disable prefer_mpv:

# Use mpv to generate thumbnail even if ffmpeg is found in PATH
# ffmpeg is slightly faster than mpv but lacks support for ordered chapters in MKVs,
# which can break the resulting thumbnails. You have been warned.
# Defaults to yes (don't use ffmpeg)
prefer_mpv=no

Edit: If you play AV1 videos, I recommend you to install ffmpeg-git-full.7z as it contains libdav1d. libdav1d is much faster than the default libaom-av1 in decoding AV1, which in turn mean faster thumbnails generation.

where do i got to add thr path i dont see rt menu > Edit the system environment variables > Enviromment variables > System variables

You have to type it out in windows search...

@dexeonify never gone this system deep before what are we actaully setting up by doing this

Yep. Adding to PATH allows you to run an executable from anywhere, so you don't have to type C:\ffmpeg.exe every time, just ffmpeg. In case you think ffmpeg is a virus, no, it's just a program to convert/filter video and audio files. It's a quite popular CLI tool, like mpv.

Also, did you verify if changing autogenerate_max_duration fixes it? I did a cursory search and found that the movie is slightly more than 2 hours long, so 7200 seconds is not enough. Just set it to 0 for testing.