Jump to content

Plugin: EmbyCredits, detect end credits and add auto skip.


Recommended Posts

Posted

It was not meant to be rude, nor to suggest that Neminem is rude. But statements like that can come across as implying that others aren’t quite competent just because they ask for help.

I completely agree that you shouldn’t build anything extra into the plugin. However, it would be helpful to provide information, or point to where one can find information, on how to install the additional components that are needed.

  • Like 1
Posted

Sorry about coming of cross, but in the plugin there is this section with links and description.

image.png.78a26a7d391bce4d4dbf0b8ff9d5dd7d.png

  • Like 1
  • Thanks 1
Posted
5 minutes ago, PeteGul said:

It was not meant to be rude, nor to suggest that Neminem is rude. But statements like that can come across as implying that others aren’t quite competent just because they ask for help.

I completely agree that you shouldn’t build anything extra into the plugin. However, it would be helpful to provide information, or point to where one can find information, on how to install the additional components that are needed.

As Neminem said i have placed instructions in the plugin.
That said, maybe i should make a guide for it with pictures. I know how hard it can be to install something new like for example Docker, it can be a pain. :(  

  • Like 1
  • Thanks 1
Posted
7 hours ago, yocker said:

Also, been working all night on this (don't feel bad for me! ;) ) and have improved the detection so it streams the images instead of extracting them all at the same time.
That will improve the speed of the plugin a lot.

@gibmanI also changed some more paths and removed some reliance on series ID.
While it was not meant to fix any problems it might actually fix the one you are having.
So if you can try this version that would be great.

EmbyCredits.dll 303.5 kB · 2 downloads

I tested this build ver. 1.1.2.0
Restarted the emby service.

When opening the "credits detector" plugin it was busy processing my library.

Anyways. I tried to cancel it which did take a while before it came into effect.

Now I was able to test the "process selection" feature.

I started by choosing "The Chief of War" series, episode one.
When clicking process selection it just said cancelled immediately.

2025-12-27 19.37.14.871 Debug Plugin: Queued episode: The Chief of War
2025-12-27 19.37.14.871 Info Plugin: ProcessQueue started. Queue count: 1670
2025-12-27 19.37.14.871 Info Plugin: ProcessQueue: acquired semaphore, starting processing
2025-12-27 19.37.14.871 Info Plugin: Processing cancelled

 

.. Like the previous cancel state was still in effect.

I then tried the same TV show again but instead of choosing one EP I selected "all episodes".

I then started to process the episodes, but it also seemed to process all other adjacent TV shows in my lib :(

The attached log contains info about the "The Chief of War" show + all episodes processing.

emby.log

Posted

Maybe not related to this plugin but how do I make the emby client consider the "credits" chapter for those episodes that have this chapter defined ?
It does not render the "next episode" button at the expected marker ??

I tried forcefully refreshing meta data on the TV show. Did not help.

VLCplayer does detect the credits chapter at the correct spot.

But Emby only seems to show the "next episode" button during playback once the episode is almost done.

I have enabled "Show up next preview" in the client.

Posted
1 hour ago, gibman said:

I tested this build ver. 1.1.2.0
Restarted the emby service.

When opening the "credits detector" plugin it was busy processing my library.

Anyways. I tried to cancel it which did take a while before it came into effect.

Now I was able to test the "process selection" feature.

I started by choosing "The Chief of War" series, episode one.
When clicking process selection it just said cancelled immediately.

2025-12-27 19.37.14.871 Debug Plugin: Queued episode: The Chief of War
2025-12-27 19.37.14.871 Info Plugin: ProcessQueue started. Queue count: 1670
2025-12-27 19.37.14.871 Info Plugin: ProcessQueue: acquired semaphore, starting processing
2025-12-27 19.37.14.871 Info Plugin: Processing cancelled

 

.. Like the previous cancel state was still in effect.

I then tried the same TV show again but instead of choosing one EP I selected "all episodes".

I then started to process the episodes, but it also seemed to process all other adjacent TV shows in my lib :(

The attached log contains info about the "The Chief of War" show + all episodes processing.

emby.log 892.4 kB · 0 downloads

Thank you! Will look into it now.

Posted
1 hour ago, gibman said:

Maybe not related to this plugin but how do I make the emby client consider the "credits" chapter for those episodes that have this chapter defined ?
It does not render the "next episode" button at the expected marker ??

I tried forcefully refreshing meta data on the TV show. Did not help.

VLCplayer does detect the credits chapter at the correct spot.

But Emby only seems to show the "next episode" button during playback once the episode is almost done.

I have enabled "Show up next preview" in the client.

I think Emby should respect the time stamp per default, embarrassingly i actually don't know since mine has always just worked with them.

Posted (edited)

@gibmanTry this one and see if it helped.
Don't worry if the settings page has changed a little, i have made some changes since last version.

It should automatically clear the queue and if it for some strange reason fails to do that then there is a button for it.
I also fixed a small bug that should fix your problem with not being able to have one episode detected at a time.
 

 

EmbyCredits.dll

Edited by yocker
Posted

Are there any plans for this to provide markers for movie credit skip?

  • Like 1
Posted (edited)

So far I have not been able to get this plug-in to work. OCR API has been confirmed. 

image.png.d2fc0432aa95c76e7c582d6e63482fdf.png

image.png.8073427e9257c96aba1a531dd20b75ec.png

What do I need to provide to help troubleshoot?

Edited by DarWun
Posted
1 hour ago, DarWun said:

So far I have not been able to get this plug-in to work. OCR API has been confirmed. 

image.png.d2fc0432aa95c76e7c582d6e63482fdf.png

image.png.8073427e9257c96aba1a531dd20b75ec.png

What do I need to provide to help troubleshoot?



Enable logging in the plug and debugging in Emby logs.
Do a detect run and send me the log.

Posted (edited)

I have made a metric ton of changes that should hopefully fix all the problems.
If not then i have added a "Dry run with debugging" button, what is does is make it easier to save a log from the plugin.
When you press it, it will do detections with the settings you have entered, when done it will send you a log file to download. Place that file somewhere and then upload it here for me to go through.

Also added a reset to default button.
When you have problems please press that and then save, this will reset the settings to default and ensure no setting you made is what is cause the problems.

Made a lot of changes under the hood for the plugin to be more cross platform and system compatible.

Really sorry for the problems you guys are having but i'm working mostly blind here as it's all working for me and the faster i get logs the faster this can be fixed.
The plugin is IMO awesome and i use it my self a lot, so i'm very sad to see it not working for you guys!

I have now tested on Windows, Linux and Unraid all without problems, that is of cause not to say no problems will happen on other peoples systems.

 

EmbyCredits.dll

Edited by yocker
Posted
12 hours ago, DarWun said:

Are there any plans for this to provide markers for movie credit skip?

In the future maybe.
It would require different settings than for TV shows because movies tend to have much longer credits. So i need to add those settings.

I will look into it when the bug causing some people to have problems is ironed out.

  • Like 1
Posted (edited)

Just a heads up.
It seems the tesseract server that this plugin was made to work with did not have a clean up function and did not clean up any used images.
Because of this a lot of images were left behind taking up space.

I went through the docker container and added a clean up function so that won't happen.
Sadly because the container isn't mine i can't just update the code but have to push my own docker container.
So i strongly advice anyone reading this to change the docker to yock1/embycreditocr instead!!!

The guide has been updated to reflect this.

I'm sorry for this, but i was recommend that container and never thought more about it until @Neminemdiscovered the problem (many, many thanks!!).

I REPEAT:
Please use yock1/embycreditocr as docker container instead.

Edited by yocker
  • Like 2
Posted (edited)
17 hours ago, yocker said:



Enable logging in the plug and debugging in Emby logs.
Do a detect run and send me the log.

I'll provide logs shortly. But I know why the plugin didn't seem to be working for me. I'm fairly certain it was due to the default settings for "Search Start Position (% fallback) OCR Search Start" (default 65%) and "Max Analysis Duration (seconds) Max Duration" (default 600). I took a look at the images in the working folder, and I noticed that the final image scan was not a credit image. It was from a few minutes before the end credits.

The default settings are not providing enough time for credits to appear. For a 43minute long episode, the scan starts at 28 minutes (0.65x43). OCR Images are captured for 10 minutes past that point based on the Max Analysis Duration setting of 600seconds. The end credits for most 43minute long episodes in my library show up past that point. I increased the Max Analysis Duration to 4980seconds. Now end credits are being detected for the one series I have tested.

As to why I chose 4980seconds for the Max Analysis Duration, the Max Analysis Duration setting description says "Set to 0 for unlimited". Unfortunately I was unable to do that. I would set it to "0" and click save. After doing so the setting reverted to 600 instead of remaining 0.

Edited by DarWun
  • Thanks 1
Posted
1 hour ago, DarWun said:

I'll provide logs shortly. But I know why the plugin didn't seem to be working for me. I'm fairly certain it was due to the default settings for "Search Start Position (% fallback) OCR Search Start" (default 65%) and "Max Analysis Duration (seconds) Max Duration" (default 600). I took a look at the images in the working folder, and I noticed that the final image scan was not a credit image. It was from a few minutes before the end credits.

The default settings are not providing enough time for credits to appear. For a 43minute long episode, the scan starts at 28 minutes (0.65x43). OCR Images are captured for 10 minutes past that point based on the Max Analysis Duration setting of 600seconds. The end credits for most 43minute long episodes in my library show up past that point. I increased the Max Analysis Duration to 4980seconds. Now end credits are being detected for the one series I have tested.

As to why I chose 4980seconds for the Max Analysis Duration, the Max Analysis Duration setting description says "Set to 0 for unlimited". Unfortunately I was unable to do that. I would set it to "0" and click save. After doing so the setting reverted to 600 instead of remaining 0.

Thank you for reporting back, nice to hear it's working for you now! :) 

Just in case, please read the post above yours if you havn't already.
I suggest changing the docker container to 
yock1/embycreditocr

Posted (edited)
1 hour ago, yocker said:

Thank you for reporting back, nice to hear it's working for you now! :) 

Just in case, please read the post above yours if you havn't already.
I suggest changing the docker container to 
yock1/embycreditocr

Thanks! I did read that post. I'll follow the new instructions to change the container as soon as the scan that is currently in progress finishes.

Edited by DarWun
  • Like 1
Posted

been running 1.1.4.0 + "yock1/embycreditocr"

It seems to run for several days on my series collection.

around 60 episodes.

mins from end: 4
FPS: 0.75

It would be nice if it kept track of those episodes that did not yield a successful marker detection.
No reason to try and re-process them again and again.

Only if the user would change any of the plugin settings then it should reconsider all old failed episodes again.

Other than that it seems to be pretty solid here :)

Great work.

Posted

Btw. Is the OCR word(s) defined in the plugin settings a contains or an exact comparison? I guess it's case insensitive though.

This could be more clear in the description of the plugin settings.

Maybe you could improve the algorithm it by looking at any available .srt subtitle files.

Then maybe start scanning after the last subtitle rendered?

I guess this can easily fail as well for those subtitles that contains some dummy message at the very end.

But this could be remedied by some setting that prevents considering last minute subtitles.

Another approach to maybe make the algorithm more fool proof or faster could be to look at the OCR images in reverse order.

 

Posted

@gibmancan you try a dry run with debug enabled.

And disable these, remember to push save.

image.png.168f8fd945feb7df2f75370c9d1c79ba.png

image.png.552804d70bbc0ccb769e8b7dbfbd7fb8.png

After that supply debugging logs.

  • Like 1
Posted

After that do the same thing with these enabled.

image.png.78ac7327de62846179b6a92c69789f2b.png

And supply debugging logs.

  • Like 1
Posted
2 hours ago, gibman said:

been running 1.1.4.0 + "yock1/embycreditocr"

It seems to run for several days on my series collection.

around 60 episodes.

mins from end: 4
FPS: 0.75

It would be nice if it kept track of those episodes that did not yield a successful marker detection.
No reason to try and re-process them again and again.

Only if the user would change any of the plugin settings then it should reconsider all old failed episodes again.

Other than that it seems to be pretty solid here :)

Great work.

It shows a little log window of failed episodes just like with the successful once.

Posted (edited)
1 hour ago, gibman said:

Btw. Is the OCR word(s) defined in the plugin settings a contains or an exact comparison? I guess it's case insensitive though.

This could be more clear in the description of the plugin settings.

Maybe you could improve the algorithm it by looking at any available .srt subtitle files.

Then maybe start scanning after the last subtitle rendered?

I guess this can easily fail as well for those subtitles that contains some dummy message at the very end.

But this could be remedied by some setting that prevents considering last minute subtitles.

Another approach to maybe make the algorithm more fool proof or faster could be to look at the OCR images in reverse order.

 

The words are case insensitive. I will add that to the description in the next version.
Using srt files as you suggested sadly won't work, in many srt files the writer of the subtitles and other stuff often shows up later as you mentioned your self.

The lastest version (version 1.1.5.0) of the plugin streams the images right as they are extracted instead of extracting all images and send sending them.
This makes it a lot faster.
Tested the whole season of Cyberpunk in under 20 seconds for me.

Making it look at reverse order could work but it would most likely end up with the same result as instead of the first 2 matches (by default) it would just have to look for the last one.
That could actually make it slower in some cases.

As the OCR is rather precise in the detection of words, if you want it to be faster i suggest you try setting it to only look for one word, disable episode comparison and episode fallback.
I use that my self and it is very fast with the detection that way.
You can also press the "reset to default" button and then save, those are my recommended settings that work best for me.

Best advice i can give if it fails some detections is to add some more keyboard to look for.
I have added the once i could think off but i bet more could be added.

Many thanks for the suggestions, i appreciate all suggestions a lot!! :)

Edit: I forgot.

If you have any problems please do as Neminem suggested and do a dry run with debugging and send the log.

 

Edited by yocker
  • Thanks 1
Posted
1 hour ago, yocker said:

It shows a little log window of failed episodes just like with the successful once.

Yeah I saw that. Quite useful.

But what do you think of my suggestion in my previous post ?

Keeping track of failed episodes and avoid re-processing those in the future unless the user forces it by clicking on some button in the plugin. Or if a setting in the plugin has changed then one could seem it would be a good thing to try and re process old failed episodes.

  • Thanks 1
Posted
1 minute ago, gibman said:

Yeah I saw that. Quite useful.

But what do you think of my suggestion in my previous post ?

Keeping track of failed episodes and avoid re-processing those in the future unless the user forces it by clicking on some button in the plugin. Or if a setting in the plugin has changed then one could seem it would be a good thing to try and re process old failed episodes.

Sorry i misunderstood you.

Not a bad idea, i have to think of some user friendly way of implementing it.
I will look into it as soon as i come up with a good way of having it work for people.

Many thanks for the suggestion, for sure one i will look into!

  • Like 1
  • Thanks 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...