Ashyni / mpv-scripts

dynamic-crop.lua script for mpv player/lib.
MIT License
81 stars 4 forks source link

Movie lagging for minutes, every time dark scene appears. #9

Closed Marctraider closed 2 years ago

Marctraider commented 2 years ago

Movie lagging for minutes, every time dark scene appears.

I'm not sure it this can be fixed without using only a one-shot approach.

Edit: nvm, ill play around with script settings.

Thanks!

memehammad commented 2 years ago

I'm having the same issue, how did you fix this?

Marctraider commented 2 years ago

I didn't, other than set the script to 'one-shot'.

Only problem here is that jellyfin lags as long as dark scenes appear until the script has 'settled' on the desired cropping. But after that, everything works in order and the script remains dormant.

But until the movie intro's and dark scenes have passed, jellyfin player is basically unusable with high system usage.

memehammad commented 2 years ago

Alright thank you for your help, I'm trying to watch a movie that keeps switching between 21:9 and 1,43:1 so I guess I'll just use Edge and ultrawidify for that one.

Ashyni commented 2 years ago

Hello, assuming the client is Jellyfin Media Player, from my testing you need to tick UseOpenGL in JMP with the script to have good performance, make sure Deinterlace is unchecked and HardwareDecoding on disabled or copy.

Increase the script option detect_skip= help reduce the impact caused by the limit change in dark scene, a value of 6 or 12 looks good. Don't forget it's a frame number, a 24fps video with 12 is ~0.5sec of reaction, so already a big slow-down. I have updated the default from 1 to 2. Sadly, i can't make it auto adjust reliably with the video fps or frame drop.

You can also update the mpv.dll used by JMP with this one from mpv-dev-xxxx.zip at https://sourceforge.net/projects/mpv-player-windows/files/libmpv/, rename the current mpv.dll to mpv_bak.dll and copy/rename the new mpv-2.dll to mpv.dll and optionally "logLevel": "disable" in jellyfinmediaplayer.conf to reduce the spamming log caused by cropdetect filter.

Also, an update to QT6.2 could probably help JMP performance, but no idea if it's planned.