Increase ad detector speed

calande

Member
Hello,

I tried the ad detector and I think speed could be increased modifying the algorithm. I have a hard time tweaking the ad detector parameters for it to detect the ads properly. It takes less time when I manually search for ads. What I do is, I manually scroll the timeline to the right, focusing my eyes only at the logo of the TV program (VRD ad detector already allows somehow to select one part of the picture to focus on). Then, I move the timeline quite quickly, and VRD shows all pictures that are separated by maybe 4-5 minutes. When I find a segment where the logo is gone, I come back a bit, until I find the boundary between the end of the first scene and the beginning of the first ad. I go back one frame and add the first flag. I move on quickly until I find the logo again. I come back slowly until I find the second boundary again, I move on 2 frames and add the second flag. Each ad is preceded by one extra frame, and followed by two extra frames to make sure no piece of ad spoils the TV program (especially remaining audio echo in the end of the ad). Done manually is real quick. I think a similar algorithm could be even faster than manually, and more efficient than currently. This is just my humble suggestion, but I am not an expert in algorithms.
 

Dan203

Senior Developer
Staff member
What version are you using. In v6 we have a new algorithm that is both faster and more accurate. It uses the output graph, rather than visually scrubbing the video in the movie window, so it's not interactive, but it's relatively quick and it adds additional features like the ability to look for audio changes as well as video changes.
 

calande

Member
Hi Dan, thank you for the reply. I use version 6.62.6.833. I think I didn't select the appropriate settings for the ad detector. The only thing I change is the selection to focus on during the search (the logo of the TV program in this case). When I launch the ad detector for a 105 minute video file, it takes about 10 minutes to process. When the ad detector is done, there are more red indicators than needed on the timeline of the main GUI. This video has one commercial break at the beginning, another one in the end, and two more in the middle, as we can see in the attached screenshot. I have trouble having the ad selector identify only the beginnings and ends of those commercial breaks, without in-between red indicators.
 

Attachments

Dan203

Senior Developer
Staff member
We can't tell the difference between an ad and the show, all we can do is detect black frames, so if there are black frames between ads those are marked with the red indicator as well. We try to guess where the breaks are based on how close together those markers are, but that's not 100% accurate so we leave all the markers in the UI so that you can use an alternative marker to correct the segment if we're wrong. Using the audio settings can help make this more accurate. In a lot of cases the main show will be 5.1 and the commercials will be 2.0 . We can detect that and use it as an indicator for where the show ends and the commercials begin. Unfortunately we can't do bug detection yet. It is something we'd like to add, but it's a bit more complex than it seems and we haven't had the time to invest into it yet. But it is on our list of future enhancements.

As for the speed... we are literally decoding every single frame in the video (audio and video) and analyzing them. So 252 fps is pretty fast. A faster PC might improve that somewhat, but you will eventually hit an IO bottleneck where it can't read the file from the disk any faster. Doing something like you suggested in your OP is not currently possible as we don't have bug detection, so there would be no way for us to use the spaced out frames to narrow in on the areas where commercials might be.
 

calande

Member
Thanks you Dan, now I understand better. These detection techniques are clever. These markers certainly help identifying the commercial breaks. I also understand the technical limits that you mentioned.
 
Top Bottom