MoojMidge / service.upnext

GNU General Public License v2.0
19 stars 5 forks source link

Clarity of the different "advanced" options #17

Closed humdedum1 closed 1 year ago

humdedum1 commented 1 year ago

Just wondering what the different detector options entail and what to tweak to try and dial in the detection of credits.

Some are fairly obvious, some aren't, making it tricky to try and dial things in. It works out of the box with a lot of endings, but a few that don't.

Been going at it trial and error style at an anime show, just to make it as hard as possible. Sadly the logs are swimming with the ListItem warnings Kodi 20 brought along.

humdedum1 commented 1 year ago

Figured I'd write them out a bit.

Detection window - X sec/hr of run time. This one felt obvious, but I might be wrong. I assume starts detection at X mark of seconds into runtime of video. e.g 300 secs into video.

Thread limit - assume cpu threads. Could be work threads? Data limit - size of data it grabs in chunks to analyze per frame of video. Resize method - zero clue, but really curious.

Similarity threshold - how large a percentage grabbed chunk of data is... To itself?

Significance limit - really no clue again. Same with the remaining options.

The descriptions might be a lot clearer to someone significantly more knowledgable about data processing than me though.

MoojMidge commented 1 year ago

There is help text for the settings, but if you are using an older skin, it may not actually be visible in the settings dialog. Try with the default skin, Estuary, or check if the skin you are using has been updated.

I have updated the help text to expand on the descriptions.

The detector used to use more complicated methods for detecting end-credits, but it was just too slow, so I started simplifying the filters and image processing. As a result the default settings should be suitable for most typical end-credits, but are intended to avoid false positives over matching more complex credits.

Anime can be very difficult to deal with, because of the type of end sequences found in them, but you can try adjusting the following settings to see if it improves things. Adjusting most of the other settings won't help, or will just make the detector worse.

Detector data limit Amount of image data processed, per frame of video, by resizing the captured video frame using the selected detector resize method. Increasing the data limit requires increased processing and can disrupt playback on slower devices.

Detector additional filtering Enables additional image processing and filtering to significantly improve end credit detection. Can disrupt playback on slower devices.

Detector resize method Image resizing method used to reduce amount of image data captured per video frame. Methods are ordered by speed/accuracy, with 1 being the fastest/least accurate and 6 being the slowest/most accurate. Increasing the accuracy does not necessarily improve detection.

See here for some more info on resizing if you are interested.

Detector similarity threshold End credits will be matched if the percentage similarity of captured image data, compared to previously captured data or typical representations of end credits, exceeds this threshold. Lowering this value will allow faster moving end credits to be matched, but may result in false-positive matches.

Detector significance limit End credits will not be matched if the percentage of the captured image data that is identified as being visually significant exceeds this limit. Increasing this value will allow more complex end credits (e.g. credits shown over a non-blank or moving background) to be matched, but may result in false-positive matches.

Detector match threshold Minimum number of matches required for end credits to be detected

Detector mismatch limit Maximum number of mismatches before end credit match count is reset

humdedum1 commented 1 year ago

That's actually quite a bit clearer than the descriptions I can read in the settings, thanks a bunch. Guess I was just missing some little things to put it all together.

Also yeah, I chose anime for that reason specifically. It's consistently inconsistent in all things, make it work with that and it'll handle virtually anything.

Thanks for going above and beyond on this personal fork of yours!

MoojMidge commented 1 year ago

Did you have any success with changing any of those settings?

humdedum1 commented 1 year ago

Did you have any success with changing any of those settings?

Yeah, seems to work for most things just fine.