Jump to content

Plugin - Chapter Editor (ChapterApi)


TeamB

Recommended Posts

Cheesegeezer
20 minutes ago, jaketame said:

Whats the chances of being able to import plex markers if we can get these exported in a format ready for Emby to understand?

Where are the plex markers stored? Nfo file or an external file, i could add these to my Intros Backup and restore plugin.

Can you share examples from plex with me and post them in this thread so as not to mess with this plugins thread

 

Link to comment
Share on other sites

rbjtech
4 hours ago, jaketame said:

Whats the chances of being able to import plex markers if we can get these exported in a format ready for Emby to understand?

So if you use the Introskip backup/restore plugin - then it has the option to write the Introskip markers (ticks) to the episode NFO file.

Therefore, if an external app wants to add it's own markers, then it can simply write to the NFO and then a 'restore' (using the plugin) would import them into emby.

This would not be officially supported - but worth having a play with a test library.

The NFO segment is shown below - it sits in the <episodedetails> section in the episode NFO.

<markers>
    <introstart>1175560925</introstart>
    <introend>2333724542</introend>
    <creditstart>0</creditstart>
  </markers>

@CheesegeezerFYI

  • Thanks 1
Link to comment
Share on other sites

jaketame
11 minutes ago, rbjtech said:

So if you use the Introskip backup/restore plugin - then it has the option to write the Introskip markers (ticks) to the episode NFO file.

Therefore, if an external app wants to add it's own markers, then it can simply write to the NFO and then a 'restore' (using the plugin) would import them into emby.

This would not be officially supported - but worth having a play with a test library.

The NFO segment is shown below - it sits in the <episodedetails> section in the episode NFO.

<markers>
    <introstart>1175560925</introstart>
    <introend>2333724542</introend>
    <creditstart>0</creditstart>
  </markers>

@CheesegeezerFYI

Ooo that’s an interesting idea and if we used tvdb idea for the file name it will make it easier to parse over it all. 

Link to comment
Share on other sites

Cheesegeezer
15 minutes ago, rbjtech said:

So if you use the Introskip backup/restore plugin - then it has the option to write the Introskip markers (ticks) to the episode NFO file.

Therefore, if an external app wants to add it's own markers, then it can simply write to the NFO and then a 'restore' (using the plugin) would import them into emby.

This would not be officially supported - but worth having a play with a test library.

The NFO segment is shown below - it sits in the <episodedetails> section in the episode NFO.

<markers>
    <introstart>1175560925</introstart>
    <introend>2333724542</introend>
    <creditstart>0</creditstart>
  </markers>

@CheesegeezerFYI

Thanks Rich, you also forgot to mention the JSON element for export and import, but i agree the NFO is most portable between systems. 

Link to comment
Share on other sites

  • 3 weeks later...
Khalimerot

Hi, 

I removed the plugin a few month ago because the build in function was working well.

But after a rescan i noticed some episodes have a misrecognized intro, so i reinstalled it to try exporting fingerprint, eventually make a backup of it, and redo a detection trough the plugin and see if i have different results.

Unortunately when i'm trying to export fingerprint or the wav i have errors, fingerprint give me an error.txt and wav export give an empty wave file.

I'm in beta versio 4.8.0.3.4.

Thank you.

Link to comment
Share on other sites

rbjtech
26 minutes ago, Khalimerot said:

Hi, 

I removed the plugin a few month ago because the build in function was working well.

But after a rescan i noticed some episodes have a misrecognized intro, so i reinstalled it to try exporting fingerprint, eventually make a backup of it, and redo a detection trough the plugin and see if i have different results.

Unortunately when i'm trying to export fingerprint or the wav i have errors, fingerprint give me an error.txt and wav export give an empty wave file.

I'm in beta versio 4.8.0.3.4.

Thank you.

The Core and Introskip Plugin fingerprints are totally different - you must use either the Core or the Plugin not both.  Their files are not compatible with each other.

I would raise an issue about the Core mis-detection - it may be caused by the Intro being too deep into the show - the Core uses a very low value of 10 minutes (ie anything after this is ignored) - but this can be changed in a configuration file.

ps - Please raise in the Introskip Plugin post - this is for Chapter API questions ...

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

  • 2 months later...
  • 1 month later...
TeamB
3 hours ago, Nightreaver said:

Happens to me as well - I'm not sure if a log is needed?

Just open the URL: https://themeservice.azurewebsites.net/Home/Search?download=true

That web serive is no longer running, I moved the data that had been colleced and submitted to that service to github, instructions are in the first post on how to use GitHub to get the intro chroma print data:

Sharing intro theme cp data

The sharded intro theme cp data is now hosted on github

https://github.com/faush01/ThemeCpData

To use the hosted data in the auto detection in the ChapterApi plugin you can use the following URL in the "Intro Data External Url" on the options tab of the plugin:

https://github.com/faush01/ThemeCpData/archive/refs/heads/main.zip

Add the url, hit download intro data, hit reload intro data and the intro cp data will be loaded for all the series you have that there are cp data in the shared repository.

If you want to add more the to the shared repo, clone it, add your new into cp json items and do a pull request to have you new items merged in and available to others.

 

Link to comment
Share on other sites

  • 1 month later...
xrbzyyyds

How do I use the first plugin? I thought it would be in.DLL format, but it's not, so I don't know how to use it, thanks!

Link to comment
Share on other sites

GrimReaper
11 minutes ago, xrbzyyyds said:

How do I use the first plugin? I thought it would be in.DLL format, but it's not, so I don't know how to use it, thanks!

Have you checked Plugin Catalogue? 

On 7/15/2022 at 6:39 AM, TeamB said:

I have put together a simple chapter viewer and editor plugin.

The plugin is now in the plugin catalogue

 

Edited by GrimReaper
Link to comment
Share on other sites

  • 2 months later...
ZLuckyTraveler

@TeamB
I'm trying to use the Intro Detect feature and it doesn't seem to work when adding a job. It just fails with this error.
 

Add Job Action Failed
No intro info data available from submitted files or Intro DB


I've left the Info data empty to use the internal data DB. I also tried to perform the action on a show that already has intros detected from the internal Emby intro skip feature, so doesn't make sense to me why it would fail if that data is already available. 

Link to comment
Share on other sites

TeamB

@ZLuckyTravelerYou need to supply the audio fingerprit (chromaprint) info for the intro detection to work, this can be a single intro from one episode of the series or multiple for seires that have varying into theme music across seasons etc.

Go back and read the first post of this threat and for even more background the thread linked to in the first threat to find out more about ther theory of intro detection and how this works and it should become clear what is needed. If you have any specific question about the info in the first post or I have missed something in that info let me know.

Link to comment
Share on other sites

ZLuckyTraveler
1 hour ago, TeamB said:

@ZLuckyTravelerYou need to supply the audio fingerprit (chromaprint) info for the intro detection to work, this can be a single intro from one episode of the series or multiple for seires that have varying into theme music across seasons etc.

Go back and read the first post of this threat and for even more background the thread linked to in the first threat to find out more about ther theory of intro detection and how this works and it should become clear what is needed. If you have any specific question about the info in the first post or I have missed something in that info let me know.

Yes I had read it. As I check there is no way to export the Chromaprint for an already detected intro.. Screenshot included

Also I didn't see anything about being able to automatically generate these audio fingerprints.

So where do you get the Chromaprint Intro info file, you can create one yourself for a series, season or episode by adding chapter info for one episode and then extracting that as a Chromaprint Info file. The new icons on the season summary page lets you extract the info file, if you just want to check you have the chapter offsets correct you can extract the audio of the chapter to play back and confirm it.


As for "creating one" for episodes without one already generated, I do not see how you are suppose to create one.

Unless this means I have to play an episode figure out the exact time stamp it starts the intro and when it ends and then create chapters for it in the "Chapters" tab for that single episode and repeat this process for every season of any tv show I want to generate them for?

If that is the case, I can appreciate the flexibility of the tool and how someone with a smaller library would benefit, but as I have large media collection, it's quiet inefficient when you want to generate intros for even just a few shows which can have numerous seasons.

Screenshot 2023-12-22 at 4.07.42 PM.png

Edited by ZLuckyTraveler
Link to comment
Share on other sites

TeamB
2 hours ago, ZLuckyTraveler said:

Unless this means I have to play an episode figure out the exact time stamp it starts the intro and when it ends and then create chapters for it in the "Chapters" tab for that single episode and repeat this process for every season of any tv show I want to generate them for?

If that is the case, I can appreciate the flexibility of the tool and how someone with a smaller library would benefit, but as I have large media collection, it's quiet inefficient when you want to generate intros for even just a few shows which can have numerous seasons.

yep that’s how it’s done.

-Have a series you want to have intros for
-Manually mark a few intros then use the extract to extract the audio fingerprints for the intros
-Use these to detect the intros in all the other episodes

The extraction of the audio fingerprints for a series should only really need to be done once by one person and they can then share this with others.
This did not work as no one in the community wants to participate in this.
I had set up a web portal so the community could come together and submit audio fingerprints but only a very few participated, and we ended up with a few dozen series. After about 12 months of hosting the web portal I shut it down.

As stated in the first post I then moved all we had collected over to a Git repo that people could submit their shared into theme audio fingerprints by submitting using pull requests:

https://github.com/faush01/ThemeCpData/tree/main/intro_cp_data

and you can use this repo in the setting of the plugin as the main source of audio fingerprints, if the repo contains the shows you are interested in. See the first post for more info.

So you can use this plugin and it will detect intros for you if you set it up correctly however you will need to do some work for that to happen. And like everyone else on this forum your response will probably be "Ain't Nobody Got Time For That" and move on to the fully auto version 🙂

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

ZLuckyTraveler

@TeamB
 

I think that the community contributing would have probably been a little better if there was some kind of setting built into the plugin that users could enable (if wanted) that would automatically contribute the markers they've generated to an online db. Having to create the fingerprint plus then downloading it to local system and uploading elsewhere one by one becomes inefficient or the "laziness" factor starts to come into play. What I'm referring to would be similar to how Plex uses local credit detection that auto adds to their online db.

This is just my suggestion though, and think it would have greater success.  

If I had a smaller library I wouldn't care much, but I have around 15K TV Series alone, and from what I have heard is that intros can change with each season, so it really comes down to doing it per season vs show level for accuracy, so it does become quite impractical for me unfortunately, if you start to think of how many seasons are in each series (400K episodes total).

Fully auto version? Are you referring to the core that is built into Emby through library settings or something else?

Edited by ZLuckyTraveler
Link to comment
Share on other sites

TeamB
1 hour ago, ZLuckyTraveler said:

I think that the community contributing would have probably been a little better if there was some kind of setting built into the plugin that users could enable (if wanted) that would automatically contribute the markers they've generated to an online db. Having to create the fingerprint plus then downloading it to local system and uploading elsewhere one by one becomes inefficient or the "laziness" factor starts to come into play. What I'm referring to would be similar to how Plex uses local credit detection that auto adds to their online db.

This is just my suggestion though, and think it would have greater success.  

not sure, yes the intergration could have been tighter but it was a fine line as the Emby team are very cautious about copywright and when we first started playing with audio fingerprints there was a lot of confusion about what they were and if they would be considered copyrigh etc so it was not encoraged to have the addon do the actual upload to the web portal.

regardless there was only about 3 users that showsed any interest so I dont think it would have taken off at all, users just want all the things with none of the effort.

1 hour ago, ZLuckyTraveler said:

and from what I have heard is that intros can change with each season

haha its even worse than that, some shows have different into music in a single season, the one that comes to mind that was problamatic with audio fingerprinting is Game of Thrones season 1 the first 3 episodes, they are all a bit different, not that you can hear it but an audio fingerprint for the theme music has issues with a match. If you look at the Git repo

https://github.com/faush01/ThemeCpData/tree/main/intro_cp_data/game of thrones

you can see it needed multiple for the first season, this plugin can handel that, the auto detection ones will have issues.

1 hour ago, ZLuckyTraveler said:

Fully auto version? Are you referring to the core that is built into Emby through library settings or something else?

yep

Link to comment
Share on other sites

rbjtech

It was a real shame this method did not take off as once you had a 'good' fingerprint - it worked beautifully and was very fast.  It still had to 'find' the audio passage to match (ie get the timings) but it didn't have the create the fingerprint for each episode in the first place.

re the copyright/caution - I get that - but I was under the impression that the actual fingerprint was a series of binary metadata - there was no way to actually 'recreate' the intro audio from it - and thus if you removed the actual metadata that it was show x, season y - it would be effectively useless ?

tbh I'm still using our original Introskip Plugin - as the emby core plugin is a barebones implementation only - relying on ChapterAPI to even make edits ... 🤔

Edited by rbjtech
Link to comment
Share on other sites

TeamB
7 hours ago, rbjtech said:

the copyright/caution - I get that - but I was under the impression that the actual fingerprint was a series of binary metadata - there was no way to actually 'recreate' the intro audio from it - and thus if you removed the actual metadata that it was show x, season y - it would be effectively useless

yes correct, the audio fingerprint (chromaprint), from what i remember, is based on frequency distribution over short time span buckets that are then converted to integers to allow compare. there is no original audio data in the audio fingerprint. its the same technique that the auto song detection systems like picard use.

 

  • Thanks 1
Link to comment
Share on other sites

7 hours ago, rbjtech said:

It was a real shame this method did not take off as once you had a 'good' fingerprint - it worked beautifully and was very fast.  It still had to 'find' the audio passage to match (ie get the timings) but it didn't have the create the fingerprint for each episode in the first place.

Definitely!

Currently also using the plugin, but would definitely be down to go down this road again.

Just thinking out load but those fingerprint would probably be stored best at TVDB or the likes.

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