rechigo 364 Posted January 10 Posted January 10 (edited) 45 minutes ago, yocker said: Please enable debug logging in both plugin and emby and upload the log here So I think I know what the issue is... I was reading through the code and see the LibraryManager ItemAdded event is attached in the Start function in CreditsDetectionService. I am not seeing any logic to attach to ItemAdded event when the configuration is saved, so it appears to not take affect until a server restart. I performed a server restart and see the log message that auto-detection is enabled Edited January 10 by rechigo
yocker 1247 Posted January 10 Author Posted January 10 10 minutes ago, rechigo said: So I think I know what the issue is... I was reading through the code and see the LibraryManager ItemAdded event is attached in the Start function in CreditsDetectionService. I am not seeing any logic to attach to ItemAdded event when the configuration is saved, so it appears to not take affect until a server restart. I performed a server restart and see the log message that auto-detection is enabled Well look at it tomorrow. Thanks for reporting it! 1
yocker 1247 Posted January 11 Author Posted January 11 1 hour ago, rechigo said: So I think I know what the issue is... I was reading through the code and see the LibraryManager ItemAdded event is attached in the Start function in CreditsDetectionService. I am not seeing any logic to attach to ItemAdded event when the configuration is saved, so it appears to not take affect until a server restart. I performed a server restart and see the log message that auto-detection is enabled Just got home from a christmas dinner and checked, you are correct. I will fix it tomorrow when i'm... More my self. 1 1
yocker 1247 Posted January 11 Author Posted January 11 Should be fixed in this version. EmbyCredits.dll
yocker 1247 Posted January 16 Author Posted January 16 @ebr @Luke Have you changed how scan library and metadata refresh works? It seems to remove all chapter markers not of the normal chapter type now so that a new intro skip detection (and indeed this plugin) has to run detections again. I don't recall it being that way before. 1 2
Neminem 1518 Posted January 17 Posted January 17 I guess users of this plugin should do a daily or at least a weekly "Export Credits Backup". Just so that if s&%t happens then you have a backup to import.
TeamB 2438 Posted January 17 Posted January 17 19 hours ago, yocker said: @ebr @Luke Have you changed how scan library and metadata refresh works? It seems to remove all chapter markers not of the normal chapter type now so that a new intro skip detection (and indeed this plugin) has to run detections again. I don't recall it being that way before. I thought it had always done this, I remember ages ago when I was working the the ChapterAPI plugin that a metadata refresh would wipe all custom chapter points. At the time I asked for a lock chapters flag but here we are years later still having the same discussion. 1
rbjtech 5284 Posted January 17 Posted January 17 19 hours ago, yocker said: @ebr @Luke Have you changed how scan library and metadata refresh works? It seems to remove all chapter markers not of the normal chapter type now so that a new intro skip detection (and indeed this plugin) has to run detections again. I don't recall it being that way before. For Metadata Refresh - I can understand that and agree with the logic - as a forced metadata refresh implies its a new source so could possibly have the Intro/credit data in a different location. However, for a Library Scan - that is a very poor decision if true. I'm not sure it is though, as I add media all the time and do an API called Library refresh after a pre-processing batch and nothing appears to have lost Intro/Credit data. I haven't done a manual scan though. @Luke Please could you confirm the status here please ?
yocker 1247 Posted January 17 Author Posted January 17 2 minutes ago, rbjtech said: For Metadata Refresh - I can understand that and agree with the logic - as a forced metadata refresh implies its a new source so could possibly have the Intro/credit data in a different location. However, for a Library Scan - that is a very poor decision if true. I'm not sure it is though, as I add media all the time and do an API called Library refresh after a pre-processing batch and nothing appears to have lost Intro/Credit data. I haven't done a manual scan though. @Luke Please could you confirm the status here please ? For metadata it should IMO only do it if set to replace all metadata, not only look for missing.
rbjtech 5284 Posted January 17 Posted January 17 (edited) 5 minutes ago, yocker said: For metadata it should IMO only do it if set to replace all metadata, not only look for missing. Sure - agreed, that's what I meant by a forced metadata refresh - if just looking for missing then don't remove it - the same logic as any other metadata infact. Are you saying it removes it even on the 'missing only' option ? Edited January 17 by rbjtech
yocker 1247 Posted January 17 Author Posted January 17 (edited) 42 minutes ago, rbjtech said: Sure - agreed, that's what I meant by a forced metadata refresh - if just looking for missing then don't remove it - the same logic as any other metadata infact. Are you saying it removes it even on the 'missing only' option ? It does. The update to Emby also seems to have removed chapter types from some videos so detections before the update are no longer detected some times. This had a lucky side effect of discovering a bug in the plugin though so not all bad. Edited January 17 by yocker 1
yocker 1247 Posted January 17 Author Posted January 17 New version up on yocksers/EmbyCredits Github. Added: 1. Option to make the plugin wait for intro detector if it's running and resume afterwards, this will decrease the amount of CPU being used at one time. 2. Confidence Score Display - The plugin will now show the confidence score when a detection has been finished on a video. 3 . Batch Validation UI - Show side-by-side comparison of all episodes in a season with timestamps for quick validation 4. Error Recovery - Better handling of temporary OCR service outages with automatic retry queues - Retry 5 times and fail. 5. Quick add season markers - This will add the chosen time stamp from the video and add it to all other videos in a seaon that does not have time stamps. Changed: 1. Changed the UI slightly. Fixed: 1. Fixed bug where some chapters got seen as credit skip chapters because of naming. As always, please report any ideas or bugs to me and i will look at them. 1
yocker 1247 Posted January 17 Author Posted January 17 Well.. The plugin should run as it should.. At least until the next Emby update. 1
sydlexius 297 Posted January 17 Posted January 17 @yockerI really like this plugin! Thanks for all of your work! I have a couple of suggestions to make. The first is that you might want to consider configuring your plugin so that it shows up on the "Manage Server" side menu. The other is to allow for values higher than "10" for number of concurrent threads. If you're concerned about someone potentially nuking their server, you could always check for the number of logical CPUs and give a warning (or block) if the value entered exceeds that threshold. 2
yocker 1247 Posted January 17 Author Posted January 17 2 minutes ago, sydlexius said: @yockerI really like this plugin! Thanks for all of your work! I have a couple of suggestions to make. The first is that you might want to consider configuring your plugin so that it shows up on the "Manage Server" side menu. The other is to allow for values higher than "10" for number of concurrent threads. If you're concerned about someone potentially nuking their server, you could always check for the number of logical CPUs and give a warning (or block) if the value entered exceeds that threshold. I can certainly look into it. You are right of my fear of people "nuking their servers". The detection is two fold, the ffmpeg image extracting and then the tesseract detection so quite a bit going on. I will make it possible to increase it and maybe, maybe!!, add another possibility for % of CPU. Best would be if the tesseract would be made GPU capable but that is beyond me to do that. Thank you for the suggestions! 1
rechigo 364 Posted January 20 Posted January 20 Would it be possible to implement saving backups to a path automatically via a scheduled task and let the user set how many backups to retain? Also I agree that this plugin should be accessible from the side menu in the server page
yocker 1247 Posted January 20 Author Posted January 20 4 hours ago, rechigo said: Would it be possible to implement saving backups to a path automatically via a scheduled task and let the user set how many backups to retain? This has already been requested and on my todo list. 2
yocker 1247 Posted January 20 Author Posted January 20 New version up (v1.5.1.0) on yocksers/EmbyCredits Github. Added: Scheduled task for backups. Settings can now be accessed via the Emby side bar. 2
yocker 1247 Posted January 20 Author Posted January 20 (edited) Next on the todo list: Add some hardware acceleration for the image extraction. I sadly can't do anything about the tesseract as that is beyond me. Edit: Might as well reveal that i actually have been working on that for some time. Nothing worth keeping that a secret. I'm in the middle of adding settings for FFmpeg thread limits and custom commands. Should be done soon.. Ish... Edited January 20 by yocker
rechigo 364 Posted January 20 Posted January 20 33 minutes ago, yocker said: Next on the todo list: Add some hardware acceleration for the image extraction. I sadly can't do anything about the tesseract as that is beyond me. Edit: Might as well reveal that i actually have been working on that for some time. Nothing worth keeping that a secret. I'm in the middle of adding settings for FFmpeg thread limits and custom commands. Should be done soon.. Ish... Thanks for getting this out so quick! How much of the processing is actually image extraction and how much is tesseract? Like what's the split, like 60/40? I notice embyserver always uses more cpu than tesseract when processing
yocker 1247 Posted January 20 Author Posted January 20 (edited) 31 minutes ago, rechigo said: Thanks for getting this out so quick! How much of the processing is actually image extraction and how much is tesseract? Like what's the split, like 60/40? I notice embyserver always uses more cpu than tesseract when processing I haven't measured it, but the extraction takes what ever you can give it if a limit is not set. Hwaccel should help a great deal. I actually maxed out a 4090 with it Edited January 20 by yocker 1
sydlexius 297 Posted January 20 Posted January 20 @yockerHave you considered leveraging some sort of Computer Vision (e.g. OpenCV) solution for the bulk of detection, backed by OCR when you don't get above-threshold results? 1
yocker 1247 Posted January 21 Author Posted January 21 Good news everyone! (Finally got to say that). I found a version of the tesseract with GPU support so have edited it slightly to add the clean up function and uploaded it. It will now support Intel, AMD and Nvidia GPUs. https://hub.docker.com/repository/docker/yock1/embycreditocr-gpu/general Still working on the GPU support in the plugin, will need a break after this as i'm starting to see code on the walls and i'm not sure if i'm not imagining it or if i actually drew it for real. 1
yocker 1247 Posted January 21 Author Posted January 21 (edited) 6 hours ago, sydlexius said: @yockerHave you considered leveraging some sort of Computer Vision (e.g. OpenCV) solution for the bulk of detection, backed by OCR when you don't get above-threshold results? As far i a understand OpenCV it wouldn't be a good fit. It's at most on par with tesseract for text recognition for much more GPU usage. Only benefit i can think off, scrolling text recognition or looking for special things in scenes. Tesseract can already recognize scrolling text if trained correctly. Something that could maybe be fun to use it for would be chapter creation for videos without chapters. Not something i want to make but still.. Good suggestion though and please correct me if i wrong about it because i must admit my knowledge is limited about OpenCV. Edited January 21 by yocker 1
rechigo 364 Posted January 21 Posted January 21 I have a few shows with zero credits detected but I suspect those shows don't have a distinct credits scene... perhaps just a few actor/producer names rotating on the bottom of the screen while the episode finishes up. I'm going to try and tweak the settings and play around once hardware image acceleration is available. Does the detection scheduled task process every episode with missing credits every time, or does it mark the episodes it can't detect credits for so they don't get processed every time the task runs?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now