Jump to content

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


Recommended Posts

yocker
Posted
1 hour ago, gibman said:

Am I the only one that get a lot of "No frames extracted for OCR analysis" errors in the log (v 1.1.4.0)?
Initially I thought it could be corrupt video files but they seem to playback just fine without any visible corruption.

Also I find I have to restart Emby in order to be able to use the "process selection" for a specific show/episode.
Tried clear queue. Does nothing to remedy this 😕

Once I have used "process selection" I then have to restart if I want to try it again.

Please enable debugging in the plugin:
image.png.14802b72b4a0ed51b4b670bc133a925e.png
And in Emby.
image.thumb.png.3f348e6065289ff20ae2f159e6235642.png
Then send me a log and i will look at it.

mlotek
Posted

hey,

thanks for this plugin. just to make things clear. this does not help me autoskip the credentials right? it simply adds the continue watching and skip to next episode button right?

seanbuff
Posted
1 hour ago, mlotek said:

this does not help me autoskip the credentials right? it simply adds the continue watching and skip to next episode button right?

Correct.

mlotek
Posted

thanks. too bad. another run with plex than. i just don't get it why this is still not implemented into emby. would be a total game changer for some, potential, users like me.

anayway, good work btw.

  • Agree 1
yocker
Posted

New version up, version. 1.2.7.0.
Added text density detection as an option.
Added full library runs as an option.

Fixed doing a single episode run after a full TV Show run sometimes failing.

yocker
Posted

@DarWunI added density detection as discussed.

Sadly the detection method is hit and miss. It find a lot of false positives as any text is counted to the detection number.
@Neminemgave me a good example where a phonebook in the video got detected as end credits with the option.

I can maybe fine tune but for now it is at least there as an option. :) 

  • Like 1
  • Thanks 1
DarWun
Posted
33 minutes ago, yocker said:

@DarWunI added density detection as discussed.

Sadly the detection method is hit and miss. It find a lot of false positives as any text is counted to the detection number.
@Neminemgave me a good example where a phonebook in the video got detected as end credits with the option.

I can maybe fine tune but for now it is at least there as an option. :) 

Thanks @yocker. Another scenario where density detection would probably fail is where there are end title cards on an episode where there is expository text pre-end credits to wrap things up (Quantum leap finale comes to mind). I'll install the new version and do some testing.

I ran across another "quirk" when end credits are being set on an episode that has existing chapter markers. The end credit location was detected properly, and the end-credit flag has been set. But it is set after the final chapter instead of being inserted in between the chapters where it belongs from a time perspective. I don't know if this actually matters as I haven't watched the episode yet to see if the credit skip option is still presented at the right time. But I thought I'd point it out.

image.thumb.png.694bc4295b7d04f8492d9a2e0d557d1c.png

Again, thanks for your work on this plug-in!

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

Thanks @yocker. Another scenario where density detection would probably fail is where there are end title cards on an episode where there is expository text pre-end credits to wrap things up (Quantum leap finale comes to mind). I'll install the new version and do some testing.

I ran across another "quirk" when end credits are being set on an episode that has existing chapter markers. The end credit location was detected properly, and the end-credit flag has been set. But it is set after the final chapter instead of being inserted in between the chapters where it belongs from a time perspective. I don't know if this actually matters as I haven't watched the episode yet to see if the credit skip option is still presented at the right time. But I thought I'd point it out.

image.thumb.png.694bc4295b7d04f8492d9a2e0d557d1c.png

Again, thanks for your work on this plug-in!

Wops, i actually never thought about that.
Will fix it.

yocker
Posted

Reading about what others have done with density settings for other project i think i have found some things that might improve it quite a bit.

Will "borrow" from them or maybe try and implement some similar things. ;)

  • Like 2
Neminem
Posted
1 hour ago, DarWun said:

I ran across another "quirk" when end credits are being set on an episode that has existing chapter markers.

I wonder if that plugin uses date added 🤔 never used it though.

DarWun
Posted
2 hours ago, Neminem said:

I wonder if that plugin uses date added 🤔 never used it though.

I wondered that too. But I noticed that the "Intro Start" and "Intro End" markers have been entered between chapters at the start of the video. Those are shown in the example I provided above. I ripped that episode with the chapters from DVD's back in 2016. And Intro markers were added when intro scanning became a core Emby feature many years later. So I'm fairly certain the plugin isn't displaying the chapters based on date added.

DarWun
Posted
4 hours ago, yocker said:

Reading about what others have done with density settings for other project i think i have found some things that might improve it quite a bit.

Will "borrow" from them or maybe try and implement some similar things. ;)

Hopefully I didn't send you down a rabbit hole with my random thought about using density detection to supplement the OCR of specific terms. It seemed like a good idea on New Years Eve.

yocker
Posted
1 hour ago, DarWun said:

Hopefully I didn't send you down a rabbit hole with my random thought about using density detection to supplement the OCR of specific terms. It seemed like a good idea on New Years Eve.

Don't worry. If it helps the plugin i'm always ready to look into things.
I might actually have found some improvements that work.

They will be in the next version along with a fix for the chapter order (already done with that).

  • Like 1
DarWun
Posted (edited)
6 hours ago, yocker said:

Reading about what others have done with density settings for other project i think i have found some things that might improve it quite a bit.

Will "borrow" from them or maybe try and implement some similar things. ;)

I'm still testing the density detection option that was added. But I'm seeing something in the output file that leads me to believe it may not be a good option on account of Tesseract detecting characters where there are none. Frame 41 from a scan I just completed is a scene from just before the credits start. There is zero text. But Tesseract is reporting there are 43characters in that image: "OCR detected 43 chars: "           __5..3/  _________:./ |  J    \f". I'm not entirely sure how it is coming up with that...maybe from the computer screens in the background?

frame_0041.thumb.png.9cd223141dda6be90c6053739a61a28b.png

image.thumb.png.cd85ea91cf6b904d27d2bcf759bd6211.png

Settings were set to use density detection to supplement OCR (i.e. Enable Character Density Detection "ON", Use as Primary Detection Method "OFF"). No key words were detected, so no end credits were found even though the Character density detection criteria were met. I'll rerun it with Use as Primary Detection Method set to "ON". But the fact that Tesseract is seeing characters in images without text close to the credit start point is likely going to lead to poor results.

I'm also noticing in the logs that " \f" is being appended to character strings. I think that is why every image with no text is still identified as having 4 characters.

 

embyserver.txt

Edited by DarWun
yocker
Posted
20 minutes ago, DarWun said:

I'm still testing the density detection option that was added. But I'm seeing something in the output file that leads me to believe it may not be a good option on account of Tesseract detecting characters where there are none. Frame 41 from a scan I just completed is a scene from just before the credits start. There is zero text. But Tesseract is reporting there are 43characters in that image: "OCR detected 43 chars: "           __5..3/  _________:./ |  J    \f". I'm not entirely sure how it is coming up with that...maybe from the computer screens in the background?

frame_0041.thumb.png.9cd223141dda6be90c6053739a61a28b.png

image.thumb.png.cd85ea91cf6b904d27d2bcf759bd6211.png

Settings were set to use density detection to supplement OCR (i.e. Enable Character Density Detection "ON", Use as Primary Detection Method "OFF"). No key words were detected, so no end credits were found even though the Character density detection criteria were met. I'll rerun it with Use as Primary Detection Method set to "ON". But the fact that Tesseract is seeing characters in images without text close to the credit start point is likely going to lead to poor results.

I'm also noticing in the logs that " \f" is being appended to character strings. I think that is why every image with no text is still identified as having 4 characters.

 

embyserver.txt 2.75 MB · 0 downloads

You can try the extra options in this version and see if it helps.

To others.. This is not a release version.

EmbyCredits.dll

yocker
Posted

Also looks like it's taking some JSON and using that to detect with.
I need to filter that.

DarWun
Posted
17 minutes ago, DarWun said:

I'm still testing the density detection option that was added. But I'm seeing something in the output file that leads me to believe it may not be a good option on account of Tesseract detecting characters where there are none. Frame 41 from a scan I just completed is a scene from just before the credits start. There is zero text. But Tesseract is reporting there are 43characters in that image: "OCR detected 43 chars: "           __5..3/  _________:./ |  J    \f". I'm not entirely sure how it is coming up with that...maybe from the computer screens in the background?

.
.

.

Settings were set to use density detection to supplement OCR (i.e. Enable Character Density Detection "ON", Use as Primary Detection Method "OFF"). No key words were detected, so no end credits were found even though the Character density detection criteria were met. I'll rerun it with Use as Primary Detection Method set to "ON". But the fact that Tesseract is seeing characters in images without text close to the credit start point is likely going to lead to poor results.

I'm also noticing in the logs that " \f" is being appended to character strings. I think that is why every image with no text is still identified as having 4 characters.

 

embyserver.txt 2.75 MB · 0 downloads

I just reran the end credit scan for this episode with "Use as Primary Detection Method" set to "ON" for character density detection. Success! End credits detected. But they are set at the time based on the final image that triggered the detection instead of the first.

End credits start at 42:04 with the following title card:

Screenshot2026-01-02182007.thumb.png.0f5e1502be38f67fb5497d81180aafe7.png

That image is not actually extracted by the plugin so tesseract does not scan it. That explains why OCR recognition of the specific words "Executive Story Editor" I manually added to the list did not work.

The first credit image extracted and scanned is at 42:05:Screenshot2026-01-02181935.thumb.png.4337937b006577f71aba1a93c1d58b7e.png

The plugin determines there are 48 characters in that image and starts the "Density Detection Countdown" clock:image.thumb.png.06eb5b8c260c7238b52206150ab56cfa.png

There are three "high density" images detected past that point, with the final being at 42:09. So the plugin concludes that credits have been detected:

image.thumb.png.e4ab88d0d997733ddab5d455a1b16128.png

The end credit marker is set at 42:09 based on the last image detected.

image.thumb.png.5d003bf43dd25fa2b9c2423605ba5a9c.png

Shouldn't it actually be set at 42:05 which was the first image detected in the credit sequence?

Full log attached.

embyserver (1).txt

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

You can try the extra options in this version and see if it helps.

To others.. This is not a release version.

EmbyCredits.dll 462 kB · 0 downloads

Thanks. I'll update to this version and do some more test runs.

Edited by DarWun
yocker
Posted (edited)
9 minutes ago, DarWun said:

Shouldn't it actually be set at 42:05 which was the first image detected in the credit sequence?

Depends on the confidence.

I will add the filter though so it doesn't try and detect some of the info i send it plus what looks like "white spaces"

Edited by yocker
  • Like 1
yocker
Posted

@DarWunThis version should filter that text and white spaces.

EmbyCredits.dll

  • Thanks 1
yocker
Posted

New version (v1.3.0.0) up on yocksers/EmbyCredits Github.

Added:

  1. More density detection options.

Fixed:

  1. Density detection should no longer search for part of the command it self sendt to it as well as unwanted "white spaces".
  2. Skipping files that already has credit time stamps should now correctly skip files with credit markers not made by the plugin as well.
  • Like 2
yocker
Posted

Another ( :D ) version up (v1.3.1.0)

Added.

  1. Ability to run detection on a season.

Changed:

  1. Episode dropdown menu is now separated by seasons making it easier to navigate the menu.

Fixed:

  1. Progress bar not working properly when parallel processing what activated.
  2. Plugin will no longer scan TV show specials.

Download at yocksers/EmbyCredits Github

  • Like 1
DarWun
Posted
20 hours ago, yocker said:

Fixed:

  1. Progress bar not working properly when parallel processing what activated.
  2. Plugin will no longer scan TV show specials.

The ability to run detection on a season is something I'm happy to see. But I'm curious as to why scanning of TV show specials was removed. Most of the specials in my library are episodic content with end credits no different than episodes in the seasons. I would like to be able to scan that content to detect end credits. I understand that it doesn't make sense to detect end credits in non-episodic specials like blooper reels, making of videos, etc. But for episodic specials it would be reasonable to include them in the scan. Doctor Who Christmas specials would be one instance where end credit detection would be nice to have.

DarWun
Posted
On 1/2/2026 at 11:18 AM, yocker said:

Wops, i actually never thought about that.
Will fix it.

I forgot to post back that that this was fixed in v 1.3.0.0 and beyond. Thanks!

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

The ability to run detection on a season is something I'm happy to see. But I'm curious as to why scanning of TV show specials was removed. Most of the specials in my library are episodic content with end credits no different than episodes in the seasons. I would like to be able to scan that content to detect end credits. I understand that it doesn't make sense to detect end credits in non-episodic specials like blooper reels, making of videos, etc. But for episodic specials it would be reasonable to include them in the scan. Doctor Who Christmas specials would be one instance where end credit detection would be nice to have.

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.

Edited by yocker
  • 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...