Auto-detect commercials via stills
-
- Posts: 29
- Joined: Sun Jan 21, 2007 10:01 pm
Auto-detect commercials via stills
Hello,
I was wondering if it might be possible to detect the beginning and end of a commercial via the detection of a match of a supplied still. Some shows in the UK are always wrapped by a sequence which is the same. So I could grab a suitable frame (perhaps one for start and one for end of commercial) and use this for detection. Does this sound like a good idea?
Anthony
I was wondering if it might be possible to detect the beginning and end of a commercial via the detection of a match of a supplied still. Some shows in the UK are always wrapped by a sequence which is the same. So I could grab a suitable frame (perhaps one for start and one for end of commercial) and use this for detection. Does this sound like a good idea?
Anthony
Interresting, specially for the UK where some channels have no logo.
Could you grab such a start and end frame (don't save as jpg but as bmp)
and upload to my ftp server the start and end sequence inwhich those frames should be present, but from another show. This is to test if the frames are realy the same for all those shows.
Could you grab such a start and end frame (don't save as jpg but as bmp)
and upload to my ftp server the start and end sequence inwhich those frames should be present, but from another show. This is to test if the frames are realy the same for all those shows.
-
- Posts: 29
- Joined: Sun Jan 21, 2007 10:01 pm
-
- Posts: 29
- Joined: Sun Jan 21, 2007 10:01 pm
HI,
Sorry I didn't see the PM. Hotmail thought it was junk mail.
I have uploaded a short clip of the all the breaks in the Bill, and an example bitmap which should match with all the adverts (the end sequence is different but could be another still).
For some reason the reception was really bad tonight so there are some glitches. This could cause problems with the matching. The audio is also the same for each break and could possibly be used?
I will upload another example tomorrow unless you tell me otherwise...
Anthony
Sorry I didn't see the PM. Hotmail thought it was junk mail.
I have uploaded a short clip of the all the breaks in the Bill, and an example bitmap which should match with all the adverts (the end sequence is different but could be another still).
For some reason the reception was really bad tonight so there are some glitches. This could cause problems with the matching. The audio is also the same for each break and could possibly be used?
I will upload another example tomorrow unless you tell me otherwise...
Anthony
A more detailed solution if this works
Hi erik,
I use ComSkip on my recorded shows and it always detects the commercials which is great.
I find however that editing needs to be done on my part to make sure the output video file starts at the beginning of the show and ends at the end. This is because my recording application start 5 mins early and goes for an extra 5 mins.
As with Anthony's idea to detect commercials by frames i've previously thought about this but instead of detecting commercials i've thought it could be used to detect the beginning and end of the actual show.
So a user would have a collection of frames that occur at the start and end of each show, and comskip could mark when these frames occur. Because these frames would be the same for everyone within a region users could easily build up a large database of this data.
So if you can get Anthony's solution working for detecting a frame i reckon it could be extended to work for detecting start and end times. If this is beyond what you had intended for comskip please post if you get this frame detection working and i will modify the source code as an extra addon.
James.
I use ComSkip on my recorded shows and it always detects the commercials which is great.
I find however that editing needs to be done on my part to make sure the output video file starts at the beginning of the show and ends at the end. This is because my recording application start 5 mins early and goes for an extra 5 mins.
As with Anthony's idea to detect commercials by frames i've previously thought about this but instead of detecting commercials i've thought it could be used to detect the beginning and end of the actual show.
So a user would have a collection of frames that occur at the start and end of each show, and comskip could mark when these frames occur. Because these frames would be the same for everyone within a region users could easily build up a large database of this data.
So if you can get Anthony's solution working for detecting a frame i reckon it could be extended to work for detecting start and end times. If this is beyond what you had intended for comskip please post if you get this frame detection working and i will modify the source code as an extra addon.
James.
There is one big problem with this idea.
Having to recognition these multiple frames would slow down comskip soo much that it would not be usable anymore.
I am working on another solution where a short sequence (say 20 frames) is translated into a compact fingerprint. Recognizing a fingerprint in a database of multiple fingerprints seems to be possible.
Be patient.
W.r.t. pre and post padding.
I also record with about 5 minutes pre and post padding and I use the remove_show_before... and remove_show_after... .
Don't they work for you?
If not, do send me the data as described in "how to ask for help" and I will have a look.
Having to recognition these multiple frames would slow down comskip soo much that it would not be usable anymore.
I am working on another solution where a short sequence (say 20 frames) is translated into a compact fingerprint. Recognizing a fingerprint in a database of multiple fingerprints seems to be possible.
Be patient.
W.r.t. pre and post padding.
I also record with about 5 minutes pre and post padding and I use the remove_show_before... and remove_show_after... .
Don't they work for you?
If not, do send me the data as described in "how to ask for help" and I will have a look.
-
- Posts: 29
- Joined: Sun Jan 21, 2007 10:01 pm
-
- Posts: 29
- Joined: Sun Jan 21, 2007 10:01 pm
-
- Posts: 29
- Joined: Sun Jan 21, 2007 10:01 pm
-
- Posts: 29
- Joined: Sun Jan 21, 2007 10:01 pm
I have released build 73, a rather experimental version. However it should do cutting on upto 8 prerecorded cutscene frames.
From the changelog
Changes in 0.79.73
- Added a separate executable for using the DebugWindow ComskipGUI.exe, no longer needed to edit the shortcut for activating the debugwindow, simply drag and drop onto ComskipGUI.exe
- New cutpoint detection method: CutScenes, method number 128
First record one or more frames to be used as cutscene by running ComskipGUI on the MPEG, move to the frame you want to use as cutscene and hit 'C'. Select where you want the frame to be saved.
Then use up to 8 cutsceneframes in your ini file
cutscenefile1="C:\\Work\\cutscene1.dmp"
cutscenefile2="C:\\Work\\cutscene2.dmp"
Set the cutscene threshold higher if you have low quality video.
cutscene_threshold=20
Using more cutscenes will slowdown Comskip, when cutscenes are enabled the Debugwindow will show in the pink line cutscene information instead of scene change information
From the changelog
Changes in 0.79.73
- Added a separate executable for using the DebugWindow ComskipGUI.exe, no longer needed to edit the shortcut for activating the debugwindow, simply drag and drop onto ComskipGUI.exe
- New cutpoint detection method: CutScenes, method number 128
First record one or more frames to be used as cutscene by running ComskipGUI on the MPEG, move to the frame you want to use as cutscene and hit 'C'. Select where you want the frame to be saved.
Then use up to 8 cutsceneframes in your ini file
cutscenefile1="C:\\Work\\cutscene1.dmp"
cutscenefile2="C:\\Work\\cutscene2.dmp"
Set the cutscene threshold higher if you have low quality video.
cutscene_threshold=20
Using more cutscenes will slowdown Comskip, when cutscenes are enabled the Debugwindow will show in the pink line cutscene information instead of scene change information