marzzzello / mpv_thumbnail_script

A Lua script to show preview thumbnails in mpv's OSC seekbar, sans external dependencies (fork)
GNU General Public License v3.0
270 stars 20 forks source link

Add hwdec option #21

Closed NicolaSmaniotto closed 2 years ago

NicolaSmaniotto commented 2 years ago

This adds the option for the user to choose a value for the --hwdec= parameter for mpv subcalls.

The default is kept "no", as it currently is.

From my testing, it can be enabled without issues because mpv is able to gracefully fall back to software decoding.

I personally set it to auto-safe, and it almost halves the time to generate the thumbnails (of course, for encoders supported by my processor).

marzzzello commented 2 years ago

Thanks! It seems to make no difference for my CPU though (i7-7500U)

NicolaSmaniotto commented 2 years ago

It seems to make no difference for my CPU though (i7-7500U)

This is strange, do you see the hardware decoder when pressing I?

Like this: Screenshot_20220706_091911

marzzzello commented 2 years ago

Yes, it also shows vaapi. The duration for thumbnail generation stays the same. I'm on mpv 0.34.1-4 on Arch Linux. Log doesn't show anything useful.

NicolaSmaniotto commented 2 years ago

I see. Maybe your processor is already powerful enough to move the bottleneck elsewhere.

My 4th gen i5 certainly needs the help.

Have a nice day :)