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."
Automatic commercial detection is the "killer app" feature that none of the commercial DVR's dare to include.
A sentence that (I think) neatly points up the big problem with the USA's legal system...
Another thing they might try is to look at average loudness. It seems like commercials are pumped up a bit from regular shows.
Tom.
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.
I was just drinking my TenRen's hot green tea when I saw your post, and I thought that I should use my new Dell Dimension 9150 to point out that, not only are you right, but that it's been happening for some time now.
# (/.);;
- : float -> float -> float =
Homeland Security and the CCLA (Concerned Citizens Liking Advertising*) can now reveal the horrible truth:
MythTV is a front for American's sworn enemy, Al-Qaida.
Also, some people who use MythTV have French accents, and many others have eaten French Bread.
Do the right thing. Install a wholesome, American operating system on your MythTV box and run a Advertising Ready (tm)** PVR solution.
It's the patriotic thing to do.
And we'll be watching.
* A product of the National Association of Broadcasters.
** Advertising Ready is a registered trademark of your friends and fellow consumers at AWMC (Americans Welcoming Mind Control) ***
*** A product of [REDACTED BY HOMELAND SECURITY]
You're not wrong, but you miss the point.
Consumers are tired of the commercial bombardment. And many of us are already paying to watch TV -- through payments to the cable company or to the satellite company. From the consumer's point of view, we're paying for the show, and then the viewing experience is degraded with non-content.
TV networks are in dire need of a better marketing model that better serves the consummer of their product.
The availability of this technology is a threat to the existence of less innovative networks. And it should be. Creative destruction is a good thing.
Why not use volume? I think it would be a good addition. Anyone trying to NOT wake up their significant other, or a small child while watching TV has noticed this. The Volume for the commercials is much louder than that of the shows. I can't tell you how many times the 'kids' have been woken up because I was out of the room when the commercial came on, and it was LOUD.
Do not meddle in the affairs of sysadmins, for they are subtle, and quick to anger.