Jump to content

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


Recommended Posts

yocker
Posted

New version up (1.3.4.0) on yocksers/EmbyCredits Github.

Fixed:
1. Backup and import should now work as intended.

Hopefully the last little bug squashed.

DarWun
Posted
2 hours ago, yocker said:

I hate to remove features, trust me.
I had to remove specials because they were more trouble than they were worth, 5 minute specials, specials with end credit, only text specials and so on..
They caused havoc with the schedule task which only looks for if shows have end credits or not and should there for skip based on that.

I might put the option back in at one point when i made some kind of solution to it but for now there won't be detection on specials. Sorry! :( 

For now i will focus on making the detection as precise as possible though i think it's very close now. (Your density idea helped a lot!).
There will always be some fails like how intro skip also fails on some episodes.

Understood. I figured that was your reasoning. A random thought...exclude specials from the scheduled task. But allow manual scans that can be initiated by the user on an episode by episode basis.

yocker
Posted
21 minutes ago, DarWun said:

Understood. I figured that was your reasoning. A random thought...exclude specials from the scheduled task. But allow manual scans that can be initiated by the user on an episode by episode basis.

I fear people will be confused by the many failed detections they will see with specials.
Maybe i can add a big warning or something.. I will look into it. 

  • Like 1
DarWun
Posted
1 hour ago, yocker said:

I fear people will be confused by the many failed detections they will see with specials.
Maybe i can add a big warning or something.. I will look into it. 

Don't waste any time on it on my account. Get the core plugin features working, and then circle back to the other stuff (like special scanning 😉 ) after. You've done a lot of good work on this plugin. And it is appreciated!

Having said the above, I'm starting to realize end credit skipping is not as big of a deal as I thought it was for the tv show content in my library. Credits for most episodes are less than a minute in length. And it is just as easy to hit the skip to end of episode option on my remote once credits start as it is to hit the skip credits option when it presents.

I'm going to keep using the plugin and providing feedback as, to be honest, it is very cool!!!

  • Thanks 1
frankythedog
Posted (edited)
1 hour ago, DarWun said:

Don't waste any time on it on my account. Get the core plugin features working, and then circle back to the other stuff (like special scanning  ) after. You've done a lot of good work on this plugin. And it is appreciated!

Having said the above, I'm starting to realize end credit skipping is not as big of a deal as I thought it was for the tv show content in my library. Credits for most episodes are less than a minute in length. And it is just as easy to hit the skip to end of episode option on my remote once credits start as it is to hit the skip credits option when it presents.

I'm going to keep using the plugin and providing feedback as, to be honest, it is very cool!!!

Indeed, very cool and could be very useful for Netflix credits that last longer than 3 minutes.

Also, speaking of minor or secondary things, don't forget about Samba sharing.

But well done and thanks on the work already done.

Edited by frankythedog
  • Like 1
yocker
Posted
6 hours ago, frankythedog said:

Indeed, very cool and could be very useful for Netflix credits that last longer than 3 minutes.

Also, speaking of minor or secondary things, don't forget about Samba sharing.

But well done and thanks on the work already done.

The plugin supports SMB. :) 

Happy to hear you like the plugin! 😃 

frankythedog
Posted
3 hours ago, yocker said:

The plugin supports SMB. :) 

Happy to hear you like the plugin! 😃 

Unfortunately, not for me at least.

I test each new release and until now, I always get the same error message when the path is a Samba share..

 

image.png.8f19199e1b48ab67a12e75426c6398a6.png

credits-detection-debug-2026-01-05T13-04-02.log

Neminem
Posted

It seams to work for me now, just setup a test with SMB share.

image.png.596373012893b1ca26c4c04e1d41b827.png

image.png.d1c2f476ad25f04544d8ba3225bacff9.png 

  • Thanks 1
yocker
Posted
6 hours ago, frankythedog said:

Unfortunately, not for me at least.

I test each new release and until now, I always get the same error message when the path is a Samba share..

 

image.png.8f19199e1b48ab67a12e75426c6398a6.png

credits-detection-debug-2026-01-05T13-04-02.log 1.94 kB · 0 downloads

Lets try again.
As @Neminemfound out the version i gave you had a bug.
It was all reverse and smb now worked but direct didn't.

The API i used didn't work as i though.

Anyway.. Here is a version that (hopefully, this time for sure, i bet it does, it HAS to) work! ;) 

EmbyCredits.dll

frankythedog
Posted
28 minutes ago, yocker said:

Lets try again.
As @Neminemfound out the version i gave you had a bug.
It was all reverse and smb now worked but direct didn't.

The API i used didn't work as i though.

Anyway.. Here is a version that (hopefully, this time for sure, i bet it does, it HAS to) work! ;) 

EmbyCredits.dll 481.5 kB · 1 download

Yes!

I can confirm that this version works with Samba shares now.

Anyway, thank you for your availability and for responding so quickly to feedback.

Now I can play around with these markers and home automation.

  • Thanks 1
DarWun
Posted (edited)

I don't know if this is an issue with v1.3.4.0 of the plugin or just a limitation of Tesseract. But I have an  number of episode scans that are failing credit detection even though there are clearly displayed key words in the credit title cards.

image.png.cfa5508847d0efa6c2824b29da2fae89.png

Example 1 - Alias S01E12 - Frame 45:

frame_0045.png.bbe793b1feef7fb958612cf920fb2446.png

Keyword "Featuring" is clearly displayed. What Tesseract is seeing according to the log:

image.thumb.png.e77820989720ed98cf0f6a3f231a7fd3.png

Example 2 - Alias S01E12- Frame 46:

frame_0046.png.cccbfe7325dc9527e25f7a097bc399b0.png

Keywords Co-Producer and Associate Producer are clearly displayed. What Tesseract is seeing according to the log:

image.png.89ce4cd18a839e7c80177b1b3aae2b63.png

Credit detection was successful for most of the 104 episodes in the series. There were only a handful where the OCR detection failed based on keywords not being recognized even though they are clearly visible in the frame.

Edited to add: I used OCR extraction in the Windows snipping tool on Frame 45. This is what it detected:

FEATURING

RANDY HALL
LAWRENCE LOWE

SECURITY AGENT #1
SECURITY AGENT #2

How Tesseract is coming up with "L LU LI R T LU N3 BT IE 7 \f" for that same frame, I have no idea.

 

 

Edited by DarWun
  • Like 1
yocker
Posted

@DarWun It seems the tesseract doesn't like the fonts used in that show.
I threw the pictures you posted directly into it and it just gave a bunch of gibberish.

You can test it your self by going to http://ip-of-tesseract:8884 or what ever you configured the port to.
There you can give it single images to work with.

  • Like 1
yocker
Posted
4 hours ago, frankythedog said:

Yes!

I can confirm that this version works with Samba shares now.

Anyway, thank you for your availability and for responding so quickly to feedback.

Now I can play around with these markers and home automation.

No problem and thank you for reporting the problem. :) 

Hope you will enjoy the plugin!

DarWun
Posted (edited)
8 minutes ago, yocker said:

@DarWun It seems the tesseract doesn't like the fonts used in that show.
I threw the pictures you posted directly into it and it just gave a bunch of gibberish.

You can test it your self by going to http://ip-of-tesseract:8884 or what ever you configured the port to.
There you can give it single images to work with.

Thanks! I figured that was the case. What is strange to me is that OCR recognition works with that font for 100 episodes in the series. But for some reason on a handful it is returning gibberish on frames that would have been identical in the other episodes where OCR was successful. Also, other OCR methods I used have no issue with the images. It surprises me that Tesseract does.

Fringe case I guess. Everything else has been working well on my testing.

Edited by DarWun
  • Like 1
yocker
Posted

@DarWunMight be noise in the picture or something. Only guess i have as i don't know precisely how Tesseract works. :(
There might be some better training data for it out there that works better that you can add/replace in it.

  • Like 1
DarWun
Posted
3 minutes ago, yocker said:

@DarWunMight be noise in the picture or something. Only guess i have as i don't know precisely how Tesseract works. :(
There might be some better training data for it out there that works better that you can add/replace in it.

I think the fallback to image Density Detection as the primary method will provide a good work around. My initial scan with that option enabled failed. But I think that was due to the new image consistency and temporal consistency options that were added. I'll fine tune (or disable) those settings and post back later with my results.

  • Like 1
DarWun
Posted
1 hour ago, yocker said:

@DarWun It seems the tesseract doesn't like the fonts used in that show.
I threw the pictures you posted directly into it and it just gave a bunch of gibberish.

You can test it your self by going to http://ip-of-tesseract:8884 or what ever you configured the port to.
There you can give it single images to work with.

I've done a bit of googling, and found a number of posts about Tesseract having issues with fonts with "jagged edges". The Alias end credit font may be one of those problem fonts. I found reference to python scripts for edge smoothing that are supposed to fix that issue so that Tesseract scans the text properly. I haven't found those scripts yet. I'll post back if I find anything that might be useful for improving the accuracy of the OCR for this plugin.

yocker
Posted

New version up (v1.4.0.0) on yocksers/EmbyCredits github.

Added:

  1. Notifications via Emby Webhooks. Email, PushOver, Discord and so on.

Changed:

  1. Added a few more keywords as default.

Fixed:

  1. Small bug with windows pathing for automatic detection.
  2. Bug where in rare cases extra items were put into the queue.
  • Like 2
DarWun
Posted
23 hours ago, yocker said:

@DarWun It seems the tesseract doesn't like the fonts used in that show.
I threw the pictures you posted directly into it and it just gave a bunch of gibberish.

You can test it your self by going to http://ip-of-tesseract:8884 or what ever you configured the port to.
There you can give it single images to work with.

This is strange. As you identified, when feeding the image into Tesseract at http://ip-of-tesseract:8884 installed on my Synology NAS where Emby resides Tesseract does indeed spit out a bunch of gibberish.

image.thumb.png.dace5b1ed9240075f64b46b98380a2d7.png

But when I fed that same image into Tesseract that is installed on my PC, it was able to recognize the text without an issue. 

image.png.eb45683beb90ea0d61a5b958a8342c59.png

 

yocker
Posted
11 minutes ago, DarWun said:

This is strange. As you identified, when feeding the image into Tesseract at http://ip-of-tesseract:8884 installed on my Synology NAS where Emby resides Tesseract does indeed spit out a bunch of gibberish.

image.thumb.png.dace5b1ed9240075f64b46b98380a2d7.png

But when I fed that same image into Tesseract that is installed on my PC, it was able to recognize the text without an issue. 

image.png.eb45683beb90ea0d61a5b958a8342c59.png

 

You can try and switch their training data.

DarWun
Posted
22 minutes ago, yocker said:

You can try and switch their training data.

I'm just trying to figure out how to do that 😉 . The training data file on my PC is the default one installed with Tesseract v5.5.0. I haven't managed to figure out where the training data file is located on my NAS.

yocker
Posted
4 hours ago, DarWun said:

I'm just trying to figure out how to do that 😉 . The training data file on my PC is the default one installed with Tesseract v5.5.0. I haven't managed to figure out where the training data file is located on my NAS.

You might need to make your own docker image.

  • Thanks 1
yocker
Posted (edited)

Heres a beta for those who dare.

Added:
Changes made to the View Time Makers function.
1. Mass edit season episodes with missing time stamps.

2. Run scan on episodes with missing time stamps.

3. Import and export individual TV show time stamps.
This is made so people can share their time stamps and maybe avoid long detection runs.

Todo:
1. Add function to easier import and export individual TV shows in one easy go to make sharing time stamps easier.
2. Fix the CSS to actually work with light mode so people can finally read the text.

Important: THIS IS A BETA!! There might be bugs, i would very much appreciate it if you report them!

EmbyCredits.dll

Edited by yocker
  • Like 2
  • Thanks 1
rbjtech
Posted

Not sure how I missed this - but well done @yocker

I remember trying Tesserac ocr when we did the original Introskip/credit skip plugin - we didn't have much success.  It 'worked' but it was very slow vs using alternative credit methods such as ffmpeg black-frame detection or ffmpeg scenes detection - this was about 3 years ago so maybe it's gotten a lot faster (or cpu's have haha).

I'm going to try this over the weekend - but we really need the ability to skip the actual credit (the original Introskip plugin had the option as it had control over the emby session.  The Emby API allow you to jump to the next item on command (as no doubt you are aware), thus skipping the credits.. BUT this could so easily be done on the client, the same way they give you the option to skip or bring up the button now using the IntroStart/End marker, they just need to do the same with the CreditStart marker ..

yocker
Posted (edited)
23 minutes ago, rbjtech said:

Not sure how I missed this - but well done @yocker

I remember trying Tesserac ocr when we did the original Introskip/credit skip plugin - we didn't have much success.  It 'worked' but it was very slow vs using alternative credit methods such as ffmpeg black-frame detection or ffmpeg scenes detection - this was about 3 years ago so maybe it's gotten a lot faster (or cpu's have haha).

I'm going to try this over the weekend - but we really need the ability to skip the actual credit (the original Introskip plugin had the option as it had control over the emby session.  The Emby API allow you to jump to the next item on command (as no doubt you are aware), thus skipping the credits.. BUT this could so easily be done on the client, the same way they give you the option to skip or bring up the button now using the IntroStart/End marker, they just need to do the same with the CreditStart marker ..

I might have misunderstood you and if that's the case then i'm sorry.

Emby does indeed support skipping the credits.
I put a fake credit marker in an old BlackAdder episode at the 10 min mark and when viewing it i got:
image.png.6c12d04a4578e08ce1aa0032a501b7f6.png
At precisely that mark.

It might be a little misleading in the settings of Emby as the option is just called Intro Skip.

Edited by yocker

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...