Jump to content

Plugin - Chapter Editor (ChapterApi)


TeamB

Recommended Posts

TeamB

yeah but the index number should be prepended to the episode name, that is why I was asking for a screen shot, so I can see which request sis not doing that correctly.

Link to comment
Share on other sites

crusher11
1 hour ago, TeamB said:

yeah but the index number should be prepended to the episode name

Not sure what this means. Or how a screenshot would help. It's just the same list I already typed out.

  • Confused 1
Link to comment
Share on other sites

rbjtech
3 minutes ago, crusher11 said:

Not sure what this means. Or how a screenshot would help. It's just the same list I already typed out.

If you are unsure of what TeamB is asking - then why not provide the screenshot he asked for ?   

I don't get why you always seem to argue when people are trying to help you ?

  • Agree 1
Link to comment
Share on other sites

TeamB
23 minutes ago, crusher11 said:

Not sure what this means. Or how a screenshot would help. It's just the same list I already typed out.

if you dont want to post a screen shot here in the thread then PM it to me.

A screen shot will help me identify what you are seeing, it could be a bug that is causing this or it could be an issue with the data or it could be working as expected. A screen shot will help me identify which it is. Or it wont and we will have to dig beeper 🙂

The list you typed out does not make any sense to me though, there are no episode index numbers. this is what mine looks like:

image.png.2610402e48bd2d2e04c2791fa5a17c23.png

notice the numbers 01 02 03 etc, these should be added to all episode names to allow sorting to work correctly.

Edited by TeamB
Link to comment
Share on other sites

crusher11

Yes, that's what I'm seeing. I just typed it out in the order in which they appear. So in terms of what's actually displayed, it's:

1101 - [Episode Title]
1102 - [Episode Title]
1107 - [Episode Title]
1113 - [Episode Title]
1203  - [Episode Title]
1302  - [Episode Title]
1305 - [Episode Title]
1313 - [Episode Title]
602 - [Episode Title]
604 - [Episode Title]
801 - [Episode Title]
802 - [Episode Title]
803 - [Episode Title]
918 - [Episode Title]

Link to comment
Share on other sites

TeamB

this one looks nothing like the last one you typed out, which one is correct?

why are you episode numbers so high?

Edited by TeamB
Link to comment
Share on other sites

crusher11
2 hours ago, TeamB said:

this one looks nothing like the last one you typed out, which one is correct?

How does it look nothing like the last one? They're the same episode numbers in the same order. My previous list was just to show you which order they were in, the second list was to format it how the plugin formats it.

 

2 hours ago, TeamB said:

why are you episode numbers so high?

Sports. So take the NFL, for example. One episode is the sixth game played in week nine, so it's episode 901. The fourth game of week 12 would be episode 1204. Etc. Gets even longer for sports that aren't week-based, like the NBA, where episode 22041608 is the 8th game played on the 16th of April 2022.

Link to comment
Share on other sites

Cheesegeezer
13 minutes ago, crusher11 said:

How does it look nothing like the last one? They're the same episode numbers in the same order. My previous list was just to show you which order they were in, the second list was to format it how the plugin formats it.

 

Sports. So take the NFL, for example. One episode is the sixth game played in week nine, so it's episode 901. The fourth game of week 12 would be episode 1204. Etc. Gets even longer for sports that aren't week-based, like the NBA, where episode 22041608 is the 8th game played on the 16th of April 2022.

The guys is trying to help you and fix your issues but you’re not helping. He physically wants to see how it appears in the plugin and if you don’t want to share that publicly then he requested you PM him the screenshots.

it’s quite simple. 

Link to comment
Share on other sites

rbjtech
12 minutes ago, crusher11 said:

How does it look nothing like the last one? They're the same episode numbers in the same order. My previous list was just to show you which order they were in, the second list was to format it how the plugin formats it.

 

Sports. So take the NFL, for example. One episode is the sixth game played in week nine, so it's episode 901. The fourth game of week 12 would be episode 1204. Etc. Gets even longer for sports that aren't week-based, like the NBA, where episode 22041608 is the 8th game played on the 16th of April 2022.

and these appear as the correct Season and Episode metadata in emby ?

image.png.65237ae9dbd544e44832e85fc0cd1e0e.png

I'm a little confused myself - how does emby know what season and episode these are ?

1101 - [Episode Title]
1102 - [Episode Title]
1107 - [Episode Title]
1113 - [Episode Title]

if you had - s11e01, s11e02 - I would understand ...

?

 

Link to comment
Share on other sites

rbjtech

ok - so now we have a screen capture - it all starts to make sense.

I added a fake episode (1002) to my specials (crossover episodes to other shows) below - and it now appears at the top, rather than the bottom as it should - suggesting your theory on the number of digits being a factor.

 

image.thumb.png.c2f04a3738f082943b335ad6e8917fc6.png

 

Link to comment
Share on other sites

roaku

I would guess that the sorting is currently lexical instead of natural.

Link to comment
Share on other sites

fbrassin

Hello, i don't know if it has already been asked.

I have the Series "The Big Bang Theory" with intro detected.

When i press button "Extract Intro Chromaprint" i ahve a file called error.txt with this inside.

"Error extracting chromaprint data 1 (856264)"

 

What could it be?

I'd like to upload same series json to themeservice.azurewebsites.net but i don't know exactly how.

Link to comment
Share on other sites

rbjtech

So I've started to have a more serious play with this - and have used my previously uploaded fingerprint file to re-detect 'Band of Brothers' using the ThemeService.

All appeared to work ok - the emby hidden chapters have been written.

The one part I'm a little unsure of, and maybe this is just an expectation thing, is how I link the ThemeService to the Intro detection process.

Currently - I had to 'download' the JSON, save it, and then use that as the input for 'Choose File' below.

As you know the 'Show' and if required the 'Season' and even the individual episode if required - would it not be better to search the ThemeService (using the provider Id's for an exact hit) and get a list of possible matches ?  I then select one (top ranked or whatever) and it then downloads that for me when I run the job ? 

My apologies if that's on the list to do next 🤣 - but that would make this very very cool.

Thanks for all the efforts on this !

image.png.29f7d1b5151e6131309302aeb73584c0.png

Link to comment
Share on other sites

rbjtech
1 hour ago, fbrassin said:

Hello, i don't know if it has already been asked.

I have the Series "The Big Bang Theory" with intro detected.

When i press button "Extract Intro Chromaprint" i ahve a file called error.txt with this inside.

"Error extracting chromaprint data 1 (856264)"

 

What could it be?

I'd like to upload same series json to themeservice.azurewebsites.net but i don't know exactly how.

Take a look here.

You'll also need a github account to upload the FP json.

https://themeservice.azurewebsites.net/Home/AddTheme

Edited by rbjtech
Link to comment
Share on other sites

rbjtech

@TeamB

A few observations / thoughts while uploading FP jsons.

a) Is there a way to specify a range of episodes where the FP is applicable ?

As an example - I've just uploaded the FP json for House of the Dragons - but it will only be applicable for Episodes 2-10 because Episode 1 does not have the Intro.

I've added as a season FP - and Episode 1 is ignored because I have specified Emby to do so, but it's technically incorrect.

Would it be better if I could specify all the episodes - maybe via a csv list (2,3,4..) or maybe via another method '2-10' ?

b) Is there a way to list the latest (from a time perspective) 'IntroEnd' per Show/Season on the summary report page ?   This would be really helpful to see how long the FP length should be.  10 minutes is usually ok, but some new shows need more than that, but a lot need 5 mins only for example.

c) Maybe have a optional user comments field to explain further if required.  'This works with Game of Thrones S01E01' .. for example.

--

I've started using this now - as it's ultra fast !  It did all 12 seasons of the Big Bang Theory in 16 mins (279 episodes..!)

I'm gonna give it the ultimate test shortly - Game of Thrones Season 1 .. haha

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

8 minutes ago, rbjtech said:

I've started using this now - as it's ultra fast !  It did all 12 seasons of the Big Bang Theory in 16 mins (279 episodes..!)

Yes, it's lightning fast.

Really impressive piece of work there.

Edited by neik
Link to comment
Share on other sites

What images should be shown when ticking the "Show Images" checkbox?
I don't see any difference when ticking the checkbox...

Edit:
To keep the overview of the already processed series/seasons it would be good to have some sort of flag "already checked" or some sort of button.

Edited by neik
Link to comment
Share on other sites

TeamB
7 hours ago, crusher11 said:

It's not that complicated....

 

And yes, they all show up correctly in the metadata editor.

Screenshot 2022-08-29 22.30.10.png

Screenshot 2022-08-29 22.32.22.png

Ok i see what is happening now, the sorting is textual on the name, i prepend the index number to force sort in the correct index order but only add one zero padding thus with high index numbers the ordering is by the first digit which is all sorts of wrong in situation like this. I will add proper index sorting.

  • Like 1
Link to comment
Share on other sites

TeamB
6 hours ago, fbrassin said:

Hello, i don't know if it has already been asked.

I have the Series "The Big Bang Theory" with intro detected.

When i press button "Extract Intro Chromaprint" i ahve a file called error.txt with this inside.

"Error extracting chromaprint data 1 (856264)"

 

What could it be?

I'd like to upload same series json to themeservice.azurewebsites.net but i don't know exactly how.

Looks like someone uploaded big bang for you

https://themeservice.azurewebsites.net/Home/ShowItemInfo/44

Return code 1 is a generic failed code form ffmpeg, I dont think anything will be in the logs but it wont hurt to check. I am currently not logging the stdio Err channel so at the moment it is hard to know what exactly is happening.

The emby log will have the actual command that was run to extract the chromaprint data, you could run that command on the machine emby is running on too see what happens.

 

Edited by TeamB
Link to comment
Share on other sites

TeamB
5 hours ago, rbjtech said:

So I've started to have a more serious play with this - and have used my previously uploaded fingerprint file to re-detect 'Band of Brothers' using the ThemeService.

All appeared to work ok - the emby hidden chapters have been written.

The one part I'm a little unsure of, and maybe this is just an expectation thing, is how I link the ThemeService to the Intro detection process.

Currently - I had to 'download' the JSON, save it, and then use that as the input for 'Choose File' below.

As you know the 'Show' and if required the 'Season' and even the individual episode if required - would it not be better to search the ThemeService (using the provider Id's for an exact hit) and get a list of possible matches ?  I then select one (top ranked or whatever) and it then downloads that for me when I run the job ? 

My apologies if that's on the list to do next 🤣 - but that would make this very very cool.

Thanks for all the efforts on this !

image.png.29f7d1b5151e6131309302aeb73584c0.png

yes I admit it is a little confusing at the moment, it is automated but it is not clear.

On the options page in the plugin there is a way you can "download" all the data from the service to use in auto matching.

To do this go to the options page and hit the "download into data" button, it should nto take long, a few seconds. Then hit the "Reload intro data" button.

This downloads the intro data from the Theme Service web site and saves it locally in the directory specified in the settings at the top of the page. It is just a zip of all the intro data. You can also drop json intro data file in that directly is you just want to test some for automation.

You should now see you have something like this below the buttons: Loaded Intro Data 21 series 26 items

At the moment the download has to be done manually using the button, the intro data is auto loaded when Emby starts or when you hit the above Reload button.

Once you have the DB loaded on the Intro Detect page in the form you can skip adding a json file and just select your Series season episode. The system will then use IMDB ideas to select the correct intro data from the downloaded Theme Service site to detect the intros.

Also once you have the DB downloaded and loaded you can have the plugin process new episodes automatically by chekcing the process added items, this will do a detection and add chapters for any new episode added to the system.

TLDR:-
 - On the options page download and load the intro DB data
 - On the detection form dont use the file selector, the IMDB for the series will be used to select intro detection items from the downloaded data.

 

 

  • Thanks 1
Link to comment
Share on other sites

TeamB
4 hours ago, rbjtech said:

a) Is there a way to specify a range of episodes where the FP is applicable ?

no, I was going to use more 1:1 matching trying to match seasons and episodes to and have some complex matching system but in the end there were a lot of edge cases and as the code and logic got more and more complex I scrapped it.

I ended up using a simple approach and logic.

 - assume all episodes have something that need to be detected
 - try to "detect" all intro info cp items for the whole show

Example:

Game of thrones is a great example here, in its first season it has 3 different intro music variations (perhaps more) you actually need 3 chromaprint intro detection items to detect the intros correctly. This is because the music is different in most of the episodes of the first season, the second season is also different but from what I can tell it is all the same so one intro info is fine. And then the next 5 seasons are all the same. This means you need 5 or so intro detection info items. This got complex fast. SO how to easily fix this, you throw them all at each episode and used the best match.

The detection process on my test system is very quick, the sweep scan I use takes about 33-50 ms per intro for a 10 min window search. This means you can search each episode for the 5 intro detection items in about 200ms or so. While this is obviously not optimal I feel it is the best solution to keep it simple and allow the most flexibility.

4 hours ago, rbjtech said:

I'm gonna give it the ultimate test shortly - Game of Thrones Season 1 .. haha

I did have all the intros for GOT in Theme Service at one point but removed them for some reason, probably when I was testing. But for this system I needed 5 or so intro detection items to get full coverage.

Another tricky thing with GOT was that some intros had the HBO fuzzy logo at the start and some did not, I had to create the intro detection items without the HBO logo to get the best matches.

 

  • Thanks 1
Link to comment
Share on other sites

TeamB
1 hour ago, neik said:

What images should be shown when ticking the "Show Images" checkbox?
I don't see any difference when ticking the checkbox...

This is the image the Emby extracts for the chapters, you need to have this enabled in Emby and have run the extract chapter images to be able to see images.

1 hour ago, neik said:

To keep the overview of the already processed series/seasons it would be good to have some sort of flag "already checked" or some sort of button.

I am not sure what you mean by overview here.

Link to comment
Share on other sites

TeamB

new version 1.2.0.6

 - fix sorting for episodes with indexes in the hundreds or higher
 - start auto chapter creation at time 00:00:00 so first chapter is at the very beginning of the episode
 - try to reword the detection job form to show the intro info file is optional if you have the Theme Service data loaded
 - dont include virtual (un-aired) episodes in lists of episodes

Link to comment
Share on other sites

rbjtech
11 hours ago, TeamB said:

no, I was going to use more 1:1 matching trying to match seasons and episodes to and have some complex matching system but in the end there were a lot of edge cases and as the code and logic got more and more complex I scrapped it.

I ended up using a simple approach and logic.

 - assume all episodes have something that need to be detected
 - try to "detect" all intro info cp items for the whole show

Example:

Game of thrones is a great example here, in its first season it has 3 different intro music variations (perhaps more) you actually need 3 chromaprint intro detection items to detect the intros correctly. This is because the music is different in most of the episodes of the first season, the second season is also different but from what I can tell it is all the same so one intro info is fine. And then the next 5 seasons are all the same. This means you need 5 or so intro detection info items. This got complex fast. SO how to easily fix this, you throw them all at each episode and used the best match.

The detection process on my test system is very quick, the sweep scan I use takes about 33-50 ms per intro for a 10 min window search. This means you can search each episode for the 5 intro detection items in about 200ms or so. While this is obviously not optimal I feel it is the best solution to keep it simple and allow the most flexibility.

I did have all the intros for GOT in Theme Service at one point but removed them for some reason, probably when I was testing. But for this system I needed 5 or so intro detection items to get full coverage.

Another tricky thing with GOT was that some intros had the HBO fuzzy logo at the start and some did not, I had to create the intro detection items without the HBO logo to get the best matches.

 

Agreed - and I found out just that yesterday - GoT S1 needs multiple FP's. !     Not sure why we didn't realise that during the Introskip development - no wonder it never matched them all ..

...

So it's basically this - manually using JSON's (selecting the appropriate JSON for each episode) - I can correctly identify GoT in millseconds as you say using -

GoT s1e01.json

GoT s1e02-04.json

GoT s1e05-08.json

GoT s1e09.json

GoT s1e10.json

 

However, trying to save these to the Theme Service,  if I try and re-use a json (lets say s1e02-04) - and just change the episode number - it won;t let me do that.   It just retains the last change.   Is it checking to see if the MD5/FP exists already ?

The only way to upload these (which is what I want to do) is to upload 10 unique FP's ?

...

Perfect identification (HBO stripped out as you say) .. using the above jsons :)

image.thumb.png.8555653f0d818d72616a44039865597c.png

Edited by rbjtech
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...