Jump to content

Show Intro Skip Option (Plugin)


Liquidfire88

Recommended Posts

1 hour ago, stevehoffman203 said:

Thanks, I'm doing that now.  I'm not sure what constitutes a large library, but I have around 2000 episodes total.

I'd love to see that log. 😃

One thing I can mention is, when ffmpeg is collecting fingerprint data it will use available resources to do so.

However, if other processes start, and need resources, ffmpeg will tend to take what is left over. It won't hog the cpu time... even if it looks like it is.

It is important to let the scan finish. The task it self is not a quick one. It will take time to process the library. 

You can stop the task, and start it again at a later date. The task will pickup from where it left off.

I've run mine late at night when the server is not in use. 

 

The progress of the task is calculated by series. 👍

If a series has many seasons with many episodes, then you may not see the progress bar move for some time.

 

 @rbjtech should we mention how the task progress is calculated in the wiki?  It might help explain the scope of the task. On par with  a first-time emby library scan,  w/ large libraries (very long). Even in the future,  the fingerprinting task probably won't change... at least not too drastically.

 

 

 

Link to comment
Share on other sites

1 hour ago, stevehoffman203 said:

Thanks, I'm doing that now.  I'm not sure what constitutes a large library, but I have around 2000 episodes total.

I have almost 10,000 episodes and it takes pretty much 2 full days to complete the process from beginning to end.  I have a moderately decent server with a core i7-4790K CPU and a 6 disk drive array that has about 500MB/s sustained I/O capability.  The overall process is both disk and CPU intensive.  So I'm not sure how long you let it sit at 83%, but it can sometimes appear "stuck" when it's not.  Patience is key for the initial scan.  But the logs will give us the true picture of what is happening.

  • Like 1
Link to comment
Share on other sites

Painkiller8818
7 hours ago, stevehoffman203 said:

Fingerprinting, everything runs fine until it gets to 83%.  It seems to freeze there.

You need to let it run.

I also had this on my machine and i also thought it stucks, but it doesn't.

CPU goes down to almost 0% and also the Disk is doing nothing, but after some time (even after hours) it goes up to 100% again.

This happens for the first detection or when you add really a lot of new stuff.

Please just let it run.

Link to comment
Share on other sites

8 hours ago, chef said:

 @rbjtech should we mention how the task progress is calculated in the wiki?  It might help explain the scope of the task. On par with  a first-time emby library scan,  w/ large libraries (very long). Even in the future,  the fingerprinting task probably won't change... at least not too drastically.

I can add this no problem - but is there an opportunity to just use the Episode count to calculate the % instead of the Show/Series count ?

edit - done.

https://github.com/chefbennyj1/Emby.IntroSkip.Release/wiki/2.-First-Time-Setup

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

15 hours ago, Weevillo said:

Sadly not, these are all anime. I can still reference some if you really want to test this out more extensively, I trust that you doing it by yourself would work better than me being in the mix.

 

But isn't it more odd that it somehow does this repeatedly at the beginning? Do you guys start scanning the first episode of a series/season? Because if so then if that's the source of the intro theme and all the following episodes gets their intro correctly detected shouldn't it be able to perhaps then "correct" itself (if you programmed it to do so)? Like double check just the first episode. I don't know, it just feels strangely peculiar that it's happening 95% of them time on the first episode and I've only seen one or two cases where it put the intro randomly in the middle section of an episode. Maybe this is unique to anime? That's why I proposed a while back for "profiles", where the plugin will act differently depending on a type of show's established episode structure. In this case, perhaps, it would've meant that the plugin should assume that there's a lower chance for an intro on the first episode, since that's almost always the case with anime (especially modern ones). On the other side outro detection is on point more or less, and I've got a show where the intro plays along some scenery shots/background noise and the plugin still managed to pick up 70% of the intros which is impressive, but kinda ironic how it manages that and not ordinary intros.

 

Of course, if there already exists an intro-marked chapter (as you mentioned) there would be no need to tamper with chapters. And if the plugin has detected the intro length it's just a breeze for it to find some strings among the chapters like "OP" and cut down significantly on detection time while maintaining accuracy. You seem to be making the point though that the plugin will always create chapters, and I don't know if regular media never/scarcely includes chapters, but assuming any tampering with chapters would be needed to be taken into account isn't necessary.

Oh and I briefly tested the auto skip function, and the option to have a manual button will surely elevate this plugin. The client (Shield/Android TV) only reports the playback position to the server once every 2-4 seconds and that seems to delay the activation of auto skip by equally as much. I've set delay in the plugin to 0. Don't know if it's possible to ramp up the communication between client and server, but if so then more powerful systems should be able to handle it? I'm kinda talking outside my area of expertise though, so I leave this up to you to answer😅.

Glad to be helping out!

Thanks for the detailed response.

I believe @chef has explained how the comparisons work - in summary, we need a minimum of 2 episodes to do any comparison - so the ep1 will not be looked at until ep2 is available (in the case of a brand new show) - but if you have them all in that season when you run Introskip - then it makes no difference as every episode will be compared to all other episodes in that season.

I'll take the chapters conversation offline with the introskip team - for 99.9% of the shows I have (non of them Anime) they do not use any form of bespoke Chapters, yet alone Intro and Credit - but if Anime does, then I think we may be able to utilise that to our advantage as you say.

The Manual button is on the horizon, but as this requires Core development work (non-Plugin), we don't have any confirmed or committed dates but we do have very positive engagement with the Core Dev team to get it added.

The Auto-Skip control is server side - ie the client position has nothing to do with the trigger points.   So if the playback on the server hits a trigger point, then it should in that microsecond send a 'new position' to the client.  We have found that as the Introskip is extremely accurate, the skip can be seamless and other than the 'message' (if you opt to have that) you may not actually know it has been skipped at all... :)     

You can check and playback the actual 'Intro' identified in the Plugin itself by clicking on the poster for that Episode. 

Edited by rbjtech
Link to comment
Share on other sites

embyL0VER
1 hour ago, rbjtech said:

You can check and playback the actual 'Intro' identified in the Plugin itself by clicking on the poster for that Episode. 

This option seems not to work for me. Using the "Edge" Browser if I click on that poster a player popup opens but didn't play anything, just showing a gray background. Any hint why this happens?

Link to comment
Share on other sites

14 minutes ago, embyL0VER said:

This option seems not to work for me. Using the "Edge" Browser if I click on that poster a player popup opens but didn't play anything, just showing a gray background. Any hint why this happens?

Attempt to play the video and on the video itself, right click, then go down to 'Inspect' - it will show the source in the browser debug mode.  If it can't get to this http link, then that's why it is not playing.  A screenshot of the debug mode would help.

Edited by rbjtech
  • Agree 1
  • Thanks 1
Link to comment
Share on other sites

15 minutes ago, embyL0VER said:

This option seems not to work for me. Using the "Edge" Browser if I click on that poster a player popup opens but didn't play anything, just showing a gray background. Any hint why this happens?

This option might not make it into the next release. It's hard to code properly. It would be nice to keep, but not if we can't get the stream to start nicely. Unfortunately.

Link to comment
Share on other sites

Let's see if we can get the progress to be calculated at an episode level.

 

Link to comment
Share on other sites

1 hour ago, rbjtech said:

then it makes no difference as every episode will be compared to all other episodes in that season.

Hmm, yet there's a tendency by the plugin to fail detecting the first episode correctly. I'll attach some pictures to give a sample.

166691059_Screenshot2022-01-26140136.thumb.png.41e75edf23d7663945a025b1e7e05add.pngHere's a show airing right now, the first episode should not have intro time stamps, the other two episodes are correctly detected.

 

1831315240_Screenshot2022-01-26140208.thumb.png.9cf8fd65df4fa3620edc5abb68f517d6.png

Another show airing, where I manually turned of the intro detection since it was also a false positive.

 

305897679_Screenshot2022-01-26140511.thumb.png.b35d485ab196217d62bdf1ad8869091e.png

A show that's aired in two parts with two different intros, the second intro of the second part's first episode was detected correctly, but here the first episode's a false positive (episode 3 as well for some reason).

775892210_Screenshot2022-01-26140312.thumb.png.979eee51eda299cff315eab23416730a.png

Here's a show that aired back in 2017 and comes from a blue-ray source, in contrast to the 3 aforementioned shows that have a TV source. Same issue on the first episode, and to boot it also got episode 5 wrong by 1:10 mins. You've obviously designed the plugin to be able to deal with different intros in a show, but could this be a consequence of how you programmed that behavior? In other words: Does the plugin think that episode 1 and 5 here have similar intros and therefore said "Well, I found two audio signatures that matches, they must be intros"? It would make sense in this case, since this show has a philosophical quote at the beginning of every episode accompanied by a distinct church bell sound, but that's not the case in any other show I posses. I don't know how much these SS helps, I was hoping to paint a clearer picture at least. 

1 hour ago, rbjtech said:

I'll take the chapters conversation offline with the introskip team - for 99.9% of the shows I have (non of them Anime) they do not use any form of bespoke Chapters, yet alone Intro and Credit - but if Anime does, then I think we may be able to utilise that to our advantage as you say.

Thanks! You'll see chapters in anime more often than you won't, especially intro/outro ones since that's a huge part of the "anime experience".

 

1 hour ago, rbjtech said:

The Auto-Skip control is server side - ie the client position has nothing to do with the trigger points.   So if the playback on the server hits a trigger point, then it should in that microsecond send a 'new position' to the client.  We have found that as the Introskip is extremely accurate, the skip can be seamless and other than the 'message' (if you opt to have that) you may not actually know it has been skipped at all... :) 

I can't report the same, for me it seems that the client and server is heavily out of sync (heavily as in <5 seconds, but that's still significant). Did you test the plugin with a beta version running on your respective clients? FYI I've tested this with the latest server beta and the official Shield/Android TV release. When I check the control panel it reports the timestamps something like "...2:40...2:42...2:43...2:46...2:47...". I can't make out if this is the client or server lagging after, though. All in all this result in the plugin skipping the intro about 5 seconds in.

 

1 hour ago, rbjtech said:

The Manual button is on the horizon, but as this requires Core development work (non-Plugin), we don't have any confirmed or committed dates but we do have very positive engagement with the Core Dev team to get it added.

Does it look like it''ll be added to the next stable release of the server?

As always thanks for the engagement with the community😄

Link to comment
Share on other sites

32 minutes ago, chef said:

This option might not make it into the next release. It's hard to code properly. It would be nice to keep, but not if we can't get the stream to start nicely. Unfortunately.

It works rather nicely on Firefox (and it might work better in general, my browser is somewhat "heavily" modified outside what the ordinary user would do, which has broken some things).

  • Thanks 1
Link to comment
Share on other sites

For auto skips syncing issues, there are other ways to handle it.

When playback starts we can handle our own timeout, which would sync on PlaybackprogressEvents, instead of relying on the progress to send the command.

This would make auto skip exact, but it would also create a task for the server to handle. Probabaly worth trying.

Once the intro is skipped the task is abandoned.

It would need to be tested. 

I'm pretty sure that eventually, once we integrate the button, auto skip would become its own plugin.

  • Like 1
Link to comment
Share on other sites

stevehoffman203
11 hours ago, datanet said:

I have almost 10,000 episodes and it takes pretty much 2 full days to complete the process from beginning to end.  I have a moderately decent server with a core i7-4790K CPU and a 6 disk drive array that has about 500MB/s sustained I/O capability.  The overall process is both disk and CPU intensive.  So I'm not sure how long you let it sit at 83%, but it can sometimes appear "stuck" when it's not.  Patience is key for the initial scan.  But the logs will give us the true picture of what is happening.

Thanks for the help.  I did find a blinky episode in a crap series that I had to I just trashed that whole folder.  I did see that it was hanging on that episode.  I'm running it again now and will just sit back and let it do it's thing.

Link to comment
Share on other sites

1 hour ago, Weevillo said:

It works rather nicely on Firefox (and it might work better in general, my browser is somewhat "heavily" modified outside what the ordinary user would do, which has broken some things).

It works just fine for me in Edge and Chrome ;) - The function is heavily dependent on the configuration of browser however, so it may be totally out of our control as you say. 

If the OP can post the Browser Debug - and it contains the correct http URL - but doesn't work, then there is not a lot we can realistically do ... 🤔

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Weevillo said:

Hmm, yet there's a tendency by the plugin to fail detecting the first episode correctly. I'll attach some pictures to give a sample.

166691059_Screenshot2022-01-26140136.thumb.png.41e75edf23d7663945a025b1e7e05add.pngHere's a show airing right now, the first episode should not have intro time stamps, the other two episodes are correctly detected.

 

1831315240_Screenshot2022-01-26140208.thumb.png.9cf8fd65df4fa3620edc5abb68f517d6.png

Another show airing, where I manually turned of the intro detection since it was also a false positive.

 

305897679_Screenshot2022-01-26140511.thumb.png.b35d485ab196217d62bdf1ad8869091e.png

A show that's aired in two parts with two different intros, the second intro of the second part's first episode was detected correctly, but here the first episode's a false positive (episode 3 as well for some reason).

775892210_Screenshot2022-01-26140312.thumb.png.979eee51eda299cff315eab23416730a.png

Here's a show that aired back in 2017 and comes from a blue-ray source, in contrast to the 3 aforementioned shows that have a TV source. Same issue on the first episode, and to boot it also got episode 5 wrong by 1:10 mins. You've obviously designed the plugin to be able to deal with different intros in a show, but could this be a consequence of how you programmed that behavior? In other words: Does the plugin think that episode 1 and 5 here have similar intros and therefore said "Well, I found two audio signatures that matches, they must be intros"? It would make sense in this case, since this show has a philosophical quote at the beginning of every episode accompanied by a distinct church bell sound, but that's not the case in any other show I posses. I don't know how much these SS helps, I was hoping to paint a clearer picture at least. 

Thanks! You'll see chapters in anime more often than you won't, especially intro/outro ones since that's a huge part of the "anime experience".

 

I can't report the same, for me it seems that the client and server is heavily out of sync (heavily as in <5 seconds, but that's still significant). Did you test the plugin with a beta version running on your respective clients? FYI I've tested this with the latest server beta and the official Shield/Android TV release. When I check the control panel it reports the timestamps something like "...2:40...2:42...2:43...2:46...2:47...". I can't make out if this is the client or server lagging after, though. All in all this result in the plugin skipping the intro about 5 seconds in.

 

Does it look like it''ll be added to the next stable release of the server?

As always thanks for the engagement with the community😄

It would be interesting to match a Debug log to one of the above examples.

For each Episode 'analysed' - it will show exactly what it did and what episodes it compared against  - finishing with a summary of the results.

For you - It does seem like Episode 1 is not playing by the 'rules' of the other episodes - and tbh I'm not sure why - a log will certainly help us find out ;)

 

Link to comment
Share on other sites

16 minutes ago, rbjtech said:

It would be interesting to match a Debug log to one of the above examples.

For each Episode 'analysed' - it will show exactly what it did and what episodes it compared against  - finishing with a summary of the results.

For you - It does seem like Episode 1 is not playing by the 'rules' of the other episodes - and tbh I'm not sure why - a log will certainly help us find out ;)

 

Should I clear one of the seasons I showcased, rerun the thing while dubug is enabled and then come back with the log (if I've understood it correctly)? If it doesn't yield the same results it'd certainly be interesting🤔

Link to comment
Share on other sites

6 minutes ago, Weevillo said:

Should I clear one of the seasons I showcased, rerun the thing while dubug is enabled and then come back with the log (if I've understood it correctly)? If it doesn't yield the same results it'd certainly be interesting🤔

Exactly - that would be useful.

At the moment, the .bin files are not removed - so it is actually going to re-calculate exactly the same as it did before (or should !)

thanks !

  • Like 1
Link to comment
Share on other sites

fillidill

Hi guys,
Just tried version IntroSkip_v0.0.1.74 on the latest Emby beta for the first time.
I can't seem to choose a user to enable the auto skip feature. Is that possible to do right now or am I doing something wrong? The dropdown is completely empty for me. 

Link to comment
Share on other sites

16 minutes ago, fillidill said:

Hi guys,
Just tried version IntroSkip_v0.0.1.74 on the latest Emby beta for the first time.
I can't seem to choose a user to enable the auto skip feature. Is that possible to do right now or am I doing something wrong? The dropdown is completely empty for me. 

Do you only have one user? If so try creating a second one. This solved the problem for me on my test server. 

  • Like 1
Link to comment
Share on other sites

35 minutes ago, fillidill said:

Hi guys,
Just tried version IntroSkip_v0.0.1.74 on the latest Emby beta for the first time.
I can't seem to choose a user to enable the auto skip feature. Is that possible to do right now or am I doing something wrong? The dropdown is completely empty for me. 

 

17 minutes ago, Spooky83 said:

Do you only have one user? If so try creating a second one. This solved the problem for me on my test server. 

Oh! I will fix that.

Link to comment
Share on other sites

embyL0VER
3 hours ago, rbjtech said:

Attempt to play the video and on the video itself, right click, then go down to 'Inspect' - it will show the source in the browser debug mode.  If it can't get to this http link, then that's why it is not playing.  A screenshot of the debug mode would help.

Thank you very much for the hint. I followed your suggestion and have figured out what the problem was.

<video style="width:100%; height:100%" preload="metadata" autoplay="autoplay" webkit-playsinline="" playsinline="" crossorigin="anonymous" controls="" src="http://xxx.xxx.xxx.xxx:8096/emby/Videos/32884/stream.mp4?....I SHORTENED THE LINK HERE......,TranscodeReasons=AudioCodecNotSupported,DirectPlayError&amp;allowVideoStreamCopy=false</video>

This showed me that the player would have to transcode the stream but I had transcoding disabled for my user. After enabling it, video plays fine.

  • Like 1
Link to comment
Share on other sites

1 minute ago, chef said:

 

Oh! I will fix that.

I think I already mentioned that in the DMs yesterday. 

  • Thanks 1
Link to comment
Share on other sites

@rbjtechAlright, hope this helps. I've added one show or so since I last ran the plugin so it did the intros for those ones as well. But the one you should be looking for is "Classroom of the Elite", that's the one I reset (yielded the same results as expected).

IntroSkipServerLog.txt

  • Thanks 1
Link to comment
Share on other sites

8 minutes ago, Weevillo said:

@rbjtechAlright, hope this helps. I've added one show or so since I last ran the plugin so it did the intros for those ones as well. But the one you should be looking for is "Classroom of the Elite", that's the one I reset (yielded the same results as expected).

 

ok - so I've filtered the log so it just shows everything to do with 'Classroom of the Elite'

classroom-filter.txt

As you say, S1E1 is showing the exact same IntroStart/End as the other episode but you are saying that is not the case - it has no Intro at all - have I understood you correctly ?

Link to comment
Share on other sites

6 minutes ago, rbjtech said:

it has no Intro at all - have I understood you correctly ?

Right, for this particular show the first episode lacks an intro, as do all the shows in the screenshots I sent earlier which suffer from the same "problem".

Link to comment
Share on other sites

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