Jump to content

Show Intro Skip Option


Liquidfire88

Recommended Posts

TeamB

The best way to check it would be to do an A B comparison between the output from both the python and the c#

@samuelqwe are you able to supply some sample input and output data so @chef can do a direct compare

  • Like 1
Link to comment
Share on other sites

samuelqwe
15 minutes ago, TeamB said:

The best way to check it would be to do an A B comparison between the output from both the python and the c#

@samuelqwe are you able to supply some sample input and output data so @chef can do a direct compare

I can, what exactly do you need @chef?

Just the fingerprints or the video/audio samples?

Also, I am in the process of testing some more and I’ve noticed there are occasionally a few small issues in the findContiguousRegion function that can accidentally extend the intro end time stamp if a few bits fall below the threshold later in the audio comparison, but it should be possible to fix.

Edited by samuelqwe
Link to comment
Share on other sites

13 minutes ago, samuelqwe said:

I can, what exactly do you need @chef?

Just the fingerprints or the video/audio samples?

(Im stuck at work until tonight...)

But I think once I make the appropriate code changes you guy mentioned, I should be able to test both code bases, test the results and make sure both are similar. I do have a python ide installed so I have the command prompt. 

If this works... It's going to be amazing.

 

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

arrayException.thumb.png.5d6df8be1e7291674331caee5bf99e5e.png

 

Hmm... everything works up until it tries to get the best offset. 

The error might actually trace to the "compareFingerprint" function.

Edited by chef
Link to comment
Share on other sites

samuelqwe
1 hour ago, chef said:

arrayException.thumb.png.5d6df8be1e7291674331caee5bf99e5e.png

 

Hmm... everything works up until it tries to get the best offset. 

The error might actually trace to the "compareFingerprint" function.

In compareFingerprint, the score variable is supposed to be a float, because it’s supposed to give a value between 0 and 1. Maybe that’s where the issue is, as it tries casting a float to an int?

EDIT: Along with what I said above, I think figured out the issue. It seems getRange takes two arguments, index and count. But in Python it would be index1 and index2. So in both of the getRanges, the second argument should just be upper

Alternatively, I think you could do something like

f1[a..a+upper]

 based on what I saw online

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

45 minutes ago, samuelqwe said:

In compareFingerprint, the score variable is supposed to be a float, because it’s supposed to give a value between 0 and 1. Maybe that’s where the issue is, as it tries casting a float to an int?

EDIT: Along with what I said above, I think figured out the issue. It seems getRange takes two arguments, index and count. But in Python it would be index1 and index2. So in both of the getRanges, the second argument should just be upper

Alternatively, I think you could do something like



f1[a..a+upper]

 based on what I saw online

Ah right, the total count of the Range...

Thank you.

Edited by chef
Link to comment
Share on other sites

samuelqwe
35 minutes ago, chef said:

So close.. 

 

SoCloseYetSoFar.png

Does that mean fprint1 somehow gets emptied? Because you should at least have a float for seconds per sample

Link to comment
Share on other sites

1 hour ago, samuelqwe said:

Does that mean fprint1 somehow gets emptied? Because you should at least have a float for seconds per sample

Yes, I found it! you are right. It took a moment to follow the data, but  the "secondsPerSample" wasn't calculating properly when dividing 300/ fprint1.

  • Like 1
Link to comment
Share on other sites

samuelqwe
18 minutes ago, chef said:

Sorry, that it isn't quick... There is quite a bit to grasp.

Following the data... after the fingerprints are parsed, it moves into the "getBestOffset" function.

 

getBestOffset.png

Here the index return 0. But, perhaps it should be the length of the output array?

 

I also notice that "y" is equal to 2401, which maybe incorrect. I think I need brackets "(length/2)-1"

There's a lot to wrap your head around, I totally get it. It's pretty complex stuff.

So at the beginning, both diff and y should start with the same values, something like 1200 I think. If it's following the order of operations you shouldn't need the parentheses, but it may be wise to add them just in case.

The index variable should return the position of the largest element in the output list.

Check those two things and let me know if anything changes.

Link to comment
Share on other sites

samuelqwe
20 minutes ago, chef said:

Does "getBestOffset" return a whole number or a float?

It should be a whole number.

You might also want to print the values for abx and output[i] after every iteration of the for loop to see if the values do slide accordingly.

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

crusher11

Psych also includes one-off themed variations of its opening sequence, which would obviously wreak havoc with this method. 

 

Link to comment
Share on other sites

5 hours ago, crusher11 said:

Psych also includes one-off themed variations of its opening sequence, which would obviously wreak havoc with this method. 

 

Do they recap prior episodes in that show?

Link to comment
Share on other sites

Wow, finally. Sorry it took so long. That was some serious science stuff... LOL.

I just have to test these numbers against the python to make sure I science'd  it properly. But at first glance the data looks legit.

C# is really stingy about using doubles, floats and decimals properly. 🤦

fixed.png.5681b8391b39353135509f4b53ccc426.png

Edited by chef
Link to comment
Share on other sites

1 hour ago, crusher11 said:

Rarely. Why?

Just was wondering if we could use the blackdetect and silence detect as an option when the fingerprinting doesn't find a match for intros.

Link to comment
Share on other sites

Oh, Game of Thrones is a bit tricky. Because the episodes have an HBO screen at the very beginning, I think it causes some issues with finger print alignment. 

I encoded 10minutes of audio and fpcalc because the intro doesn't actually start until 7-7.5 minutes into an episode.

 

 

 

 

Link to comment
Share on other sites

samuelqwe
2 minutes ago, chef said:

Oh, Game of Thrones is a bit tricky. Because the episodes have an HBO screen at the very beginning, I think it causes some issues with finger print alignment. 

I encoded 10minutes of audio and fpcalc because the intro doesn't actually start until 7-7.5 minutes into an episode.

 

 

 

 

I suppose that if there are multiple regions with similar audio it might confuse the script and not know which one to pick, but I haven’t tested GoT.

In terms of the length of audio to analyze, I think picking a longer segment for shows with longer episodes could be a good idea, and we could also pick a shorter time for those with shorter episodes.

I’d be interested to see how the script reacts with GoT and other shows and that could have potentially tricky intro situations.

Link to comment
Share on other sites

11 minutes ago, samuelqwe said:

I suppose that if there are multiple regions with similar audio it might confuse the script and not know which one to pick, but I haven’t tested GoT.

In terms of the length of audio to analyze, I think picking a longer segment for shows with longer episodes could be a good idea, and we could also pick a shorter time for those with shorter episodes.

I’d be interested to see how the script reacts with GoT and other shows and that could have potentially tricky intro situations.

I was able to get a perfect match after switching a couple episodes. 

 

proof3.png.3c79f70374a3f5e4dc4a4f595565cdca.png

4 seconds later the episode starts. It's right on.

 

When ever Disney+, Netflix does this they will minus a couple seconds from the "End" so you can see the series logo and stuff which usually ends the intro.

So if we minus 2 seconds from the "commonRegionEnd" it would be a cool feature.

 

 I can see that if there is an issue aligning finger prints the "commonRegions" will be a negative number.

Perhaps there is a way to catch a mis-aligned finger print prior to the completed task. This way, there can be another attempt to align the episode.

 

Edited by chef
Link to comment
Share on other sites

samuelqwe
4 minutes ago, chef said:

I was able to get a perfect match after switching a couple episodes. 

 

proof3.png.3c79f70374a3f5e4dc4a4f595565cdca.png

4 seconds later the episode starts. It's right on.

 

When ever Disney+, Netflix does this they will minus a couple seconds from the "End" so you can see the series logo and stuff which usually ends the intro.

So if we minus 2 seconds from the "commonRegionEnd" it would be a cool feature.

 

 I can see that if there is an issue aligning finger prints the "commonRegions" will be a negative number.

Perhaps there is a way to catch a mis-aligned finger print prior to the completed task. This way, there can be another attempt to align the episode.

 

If it can’t find a suitable region it’ll return -1 -1, and if it returns a region which is too short (I put it at 10 seconds for now) it’ll also get rejected at the end.

As far as taking off a few seconds to show the end of the intro, I was thinking the same, but I think that should be up to whatever is actually doing the skipping to skip to a few seconds before the end of the intro region. This way we can leave the intro region as it is.

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...