How MythTV Detects and Flags Commercials
peterdaly writes "Automatic commercial detection is the "killer app" feature that none of the commercial DVR's dare to include. MythTV's automatic commercial detection does a great job of properly separating commercials from content. Here's how the commercial flagging works."
Videoredo edits mpeg files without re-encoding them a la adobe premiere. ( == lightning fast)
It also has extremely sophisticated commercial detection (never failed me), based on blackouts, duration of blackouts, duration between blackouts, percentage of screen changed to black, etc.
http://www.videoredo.com/
"Automatic commercial detection is the "killer app" feature that none of the commercial DVR's dare to include."
Ummm, no.... I'm sure many people here are already aware, but if not - check out Beyond TV (http://www.snapstream.com/). The guys over at Snapstream have been doing automatic commercial detection for a while now, and Beyond TV is in the category of a Commercial DVR. And, I'm pretty sure that other companies have been doing it too. This is nothing new - and hasn't yet been a 'killer app'.
How does MythTV's Commercial Detection work? Surprisingly well. Ever wonder how it does such a good job of identifying commercials?
There are three key indicators that MythTV uses from recorded content to identify commercials.
A blank frame is many times sandwiched in-between the television show and the commercials. The most simple form of detecting commercials is to search for blank frames in the video feed. The problem with this is that it can be very misleading. There can be a blank frame anywhere. Just because there is a blank frame, doesn't mean it's a commercial break. You could easily end up with commercials marked as part of the show and parts of the show marked as commercial.
Scene transitions are another indicator. A scene transition is a cut between one video of something and a video of something else. A simple example would be in a newscast where someone is being interviewed. While the anchor is asking the question, you may see both the anchor and the person being interviewed. When the person being interviewed starts to answer the question, the scene "cuts" to a close-up of the face of the person answering the question. In regards to commercials, there is a scene transition "cut" between each commercial. Each commercial usually is unrelated to the next. The last frame of one commercial would be totally different from the first frame of the next. Looking for patterns in scene transitions is one way to identify commercials. Five groups of 30 second scenes all grouped together may be a good indication of a block of commercials. This method works better than the blank frame method, but also isn't foolproof. There's no reason scene changes in a show might not mimic commercials, and vis-versa.
The third indicator of commercials that MythTV uses I find rather ironic. Bugs, also referred to as DOGS (Digital On-Screen Graphics), or Watermarks. A Bug is that little TV station logo in usually the bottom right corner of your screen during a TV show. I find this ironic because one of the reasons or it being there is to build channel awareness in the world of digital video recorders like MythTV. Since DVR users usually find shows by name rather than by channel, they are less concerned with which station a show is on than are other viewers. MythTV watches for these things. Because the digital watermarks are generally not shown during commercials, identifying one and then watching for it is a good indication of when a commercial break starts or stops. While much more complicated to implement than watching for the blank frame or screen transition, in theory it's probably the most effective in some circumstances. Because in practice they are hard to identify on some stations, the actual implementation can be error prone.
MythTV looks for all three of these identifiers to locate commercials. It breaks each show up into scenes, and then applys a series of score for the scene based on looking at all three factors in relation to one another, especially taking timing and patterns into account. Based on the final score of a scene, it's either (essentially) dropped into the show bucket or the commercial bucket. It's not a black/white type thing. Because of the scoring, there are a whole range of grays in the middle. You end up with scenes that looks "more" like commercials or "more" like show content, and they are then flagged as such.
I've been quite impressed at the quality of the commercial flagger that MythTV has implemented. In my experience, the system does an excellent job.
Commercial flagging is set globally in:
Utilties/Setup -> Setup -> TV Settings-> General
Do you have ideas or talent that can help increase the quality of this great tool? Check out and contribute to the MythTV commercial flagging developers' wiki.
Well, it depends on how you set things up. It can be set to remove them, but personally, I just let it mark the commercials. Basically, it puts timestamps in the database for the start and end of a commercial. You can then set myth to automatically skip them during playback, or, as I do, play them, and then I use the remote to skip the commercial. I find myth to be probably around 85% accurate on its detection. Pretty good, but far from perfect.
Small distinction with big consequences.
My old school ReplayTV (i believe a model 5000) also had this feature, along with a bunch of other neat features that let you skip to any point of the recording. I would probably still be using it if it had more than one turner..
http://www.mythpvr.com.nyud.net:8090/mythtv/how-co mmercial-flagging-works.html
See the Pictures of the Flood of '08
Last time I investigated the situation, commercials dont put out a v-chip signal, so they would be able to be blocked like that.
"I think an etch-a-sketch with an ethernet port would beat IE7 in web standards compliance."
A close buddy of mine who makes "ripping" software for Tivo, also has a suite of tools that he cannot make public, one of which automatically will remove the trailers and credits of a show, and all commercial breaks.
He wrote this on his own, and said it was pretty easy to figure out if you just watched the mpeg stream (though I've never done it...)
He had a discussion with the guys at Tivo once, and when they discovered that he had this feature, they told him NOT to make it public, and that if he did, "bad things" (involving lawyers) would happen.
So he kept the tools for his own personal use.
--Ray
http://www.beanleafpress.com
I don't think that they are "louder" per se, just that ads tend to use the full frequency spectrum more often, and that ads rely more heavily on music and sound effects than movies.
No, they are louder. They are told what to submit in order to have the levels be equal. They submit clips with sound outside the bounds they know they should. It is purposeful and calculated. If you ever have sit in a TV station or cable head-end, you can watch the levels and tell when commercials come on. Even "loud" shows (like 24 and the constant explosions) are quieter than some guy talking about his low-priced furniture.
Learn to love Alaska
The google cache still works. It was also popular on Digg.com earlier.
"We are all geniuses when we dream"
- E.M. Cioran
You are wrong. Ads are distinctly louder than the content you are trying to watch.
y Id=5632678
http://www.npr.org/templates/story/story.php?stor
How MythTV Commercial Flagging Works
How does MythTV's Commercial Detection work? Surprisingly well. Ever wonder how it does such a good job of identifying commercials?
There are three key indicators that MythTV uses from recorded content to identify commercials.
A blank frame is many times sandwiched in-between the television show and the commercials. The most simple form of detecting commercials is to search for blank frames in the video feed. The problem with this is that it can be very misleading. There can be a blank frame anywhere. Just because there is a blank frame, doesn't mean it's a commercial break. You could easily end up with commercials marked as part of the show and parts of the show marked as commercial.
Scene transitions are another indicator. A scene transition is a cut between one video of something and a video of something else. A simple example would be in a newscast where someone is being interviewed. While the anchor is asking the question, you may see both the anchor and the person being interviewed. When the person being interviewed starts to answer the question, the scene "cuts" to a close-up of the face of the person answering the question. In regards to commercials, there is a scene transition "cut" between each commercial. Each commercial usually is unrelated to the next. The last frame of one commercial would be totally different from the first frame of the next. Looking for patterns in scene transitions is one way to identify commercials. Five groups of 30 second scenes all grouped together may be a good indication of a block of commercials. This method works better than the blank frame method, but also isn't foolproof. There's no reason scene changes in a show might not mimic commercials, and vis-versa.
The third indicator of commercials that MythTV uses I find rather ironic. Bugs, also referred to as DOGS (Digital On-Screen Graphics), or Watermarks. A Bug is that little TV station logo in usually the bottom right corner of your screen during a TV show. I find this ironic because one of the reasons or it being there is to build channel awareness in the world of digital video recorders like MythTV. Since DVR users usually find shows by name rather than by channel, they are less concerned with which station a show is on than are other viewers. MythTV watches for these things. Because the digital watermarks are generally not shown during commercials, identifying one and then watching for it is a good indication of when a commercial break starts or stops. While much more complicated to implement than watching for the blank frame or screen transition, in theory it's probably the most effective in some circumstances. Because in practice they are hard to identify on some stations, the actual implementation can be error prone.
MythTV looks for all three of these identifiers to locate commercials. It breaks each show up into scenes, and then applys a series of score for the scene based on looking at all three factors in relation to one another, especially taking timing and patterns into account. Based on the final score of a scene, it's either (essentially) dropped into the show bucket or the commercial bucket. It's not a black/white type thing. Because of the scoring, there are a whole range of grays in the middle. You end up with scenes that looks "more" like commercials or "more" like show content, and they are then flagged as such.
I've been quite impressed at the quality of the commercial flagger that MythTV has implemented. In my experience, the system does an excellent job.
Commercial flagging is set globally in:
Utilties/Setup -> Setup -> TV Settings-> General
You all have Oo.o and Firefox, so get World Wind.
It's not actually louder. TV shows are just as loud, but they tend to be momentary. What commercials do is, among other things, dynamic level compression meaning they push the entire sound track up to just under the redline. On top of music, editing any space out, and other tricks, the VU meter pretty much hovers just at and under 0 dB. While lets say, Battlestar Galactica, even simple dialogue does hover into the 0db range in even quiet parts, but it's not pegged up there. There isn't music/effects maxed out filling in the space, quiet parts of the speech aren't pumped up, but it is still leveled to use the maximum dynamic range of the media, not just during the explosions and combat; that's when all the compression, effects, music etc get pumped in.
I recently got so annoyed by this that I fired off a nastygram to Comcast. Here's their canned reply.
(I call B.S., of course. If I can do real-time "normalization" with MPC, AC3filter, etc. for free, you're telling me they can't figure it out on their budgets?)
Me: "Why is it that the commercials are about 50% louder than the regular programming content? It's bad enough that I have to pay a monthly bill to get so much advertising content, but it's even worse to have the ads shouted at me..."
Comcast: "This problem is not unique to any one station or company. The phenomenon has a lot to do with the varying sound levels of a television program as compared to the generally consistent sound level of commercials. Broadcasters like Comcast do not turn up the sound of commercials and in fact, we go to great lengths to minimize the sometimes-jarring effect when transitioning from a program to a commercial.
In an attempt to grab viewer's attention in only 15 or 30 seconds, most commercials are produced to be dynamic and exciting. To achieve this they make the sound at a constant maximum level for the duration of the commercial. In sharp contrast, many TV programs have a wider dynamic range or in other words, they can vary from sound passages as quite as a kitten purring to loud music and bombs exploding. If the final scene before a commercial is a quieter, subtler scene, the transition to a commercial can make that commercial seem louder and sometimes even send you diving for the remote control to turn it down.
Most TV program producers attempt to "compress" the program sound to lessen the sound difference between the quite and loud scenes. In addition, Comcast and most broadcasters use sophisticated sound processors to further monitor and "even out" the volume levels. After all, it's in both the producer's and the broadcaster's interest to make the viewer's TV experience an enjoyable one. In spite of these efforts, challenges remain and occasionally the commercials still sound louder. This is particularly true for other stations, whose broadcast schedules consist of movies. Most movies are made for a movie theatre and have a wide dynamic audio range. Films specifically designed for the theatre can have sound passages ranging from quiet whispers to extremely loud passages such as bombs or heavy metal music. This can sound fine in a controlled environment like a movie theatre but when the same film is played on TV, the viewer may find it necessary to raise the volume for the quieter passages and perhaps even turn down the volume on the louder passages.
This problem has been around since the beginning of television and at Comcast we go to great lengths to correct this as much as possible. At Comcast television we are always working hard to improve the viewing experience and we thank you for your comments.Please chat back after the hour if the problem persists for a tech visit."
What you want is irrelevant; what you've chosen is at hand! - Spock, ST VI