the-database / mpv-upscale-2x_animejanai

Real-time anime upscaling to 4k in mpv with Real-ESRGAN compact models
Other
362 stars 6 forks source link

Slow seek performance #22

Open Shashank066 opened 1 year ago

Shashank066 commented 1 year ago

Works great but can anything be done to improve the seek performance. Running a 4090 + i7 12700k. Are the buffers to be filled the cause of pause on seek? If so, can they be reduced.

the-database commented 1 year ago

I wrote a plugin to help with this, but it's still a work in progress and doesn't work perfectly yet. This Lua script disables upscaling with the model during seek and then restores upscaling when you're done seeking. Download this file:

https://raw.githubusercontent.com/the-database/mpv-upscale-2x_animejanai/main/scripts/fast-seek.lua

and place it at this location: mpv-upscale-2x_animejanai\portable_config\scripts

Let me know how it works for you.

Shashank066 commented 1 year ago

It does fix the seek time with some downsides. There is a tiny stutter when the upscale profile kicks in along with the noticeable sharpness change of profile switch. The vapoursynth filter osd msg on the top left is better hidden. If I send multiple seeks at once,the upscaling profile fails to apply some times.