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'.
.. is that you'll get people making cleverer or less obvious infomercials.
Does MythTV record the whole show and then just skip commercials while it's playing it back, or does it cut commercials entirely out of the file?
The detection couldn't be 100% accurate.
-Eric
SJW: Someone who has run out of real oppression, and has to fake it.
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.
http://www.mythpvr.com.nyud.net:8090/mythtv/how-co mmercial-flagging-works.html
See the Pictures of the Flood of '08
...upon thinking about it, I don't know that it's all that far-fetched. Designing a system that can segregate commercials from television with a high degree of accuracy is probably comparable to information compression in the level of information/context comprehension required by the device. I begin to seriously wonder if there might be advances in AI that come out of work like this.
I say this because, ultimately, the difference between commercials and "content" is entirely made up of the information they present. As advertisers and broadcaster get better at removing the "flag" type of marker (blank frames, scene cuts, predictable timing) from commercials, there will be incentive to develop more intelligent ad-blocking mechanisms. Obviously, we're not at that point yet, as the methods described as employed by MythTV are fairly naive flag detection mechanisms - but with growing incentive, the odds of working towards a truly intelligent ad-removal scheme increase.
I think it would be hilarious if the biggest mind-mushing technology of all time (television) turned out, indirectly, to contribute to the rise of alternate, machine, intelligence.
Reality has a conservative bias: it conserves mass, energy, momentum...
"Will this not make tv stations go bankrupt?"
You seem to talk about this as though it's a bad thing.
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 seem to be assuming that networks *deserve* to exist. Like any other company, if the business model is no longer self-supporting, it is time to switch to a new business model. Pay-per-view is one example. I am not saying that every network should go pay-per-view, but if they cannot bring in sufficient income to support themselves through, for example, the sale of commercial time, maybe they need to look at other ways of doing so.
Of course, the MPAA and RIAA don't agree with me...
does anyone know if that v-chip signal is present during the commerical? if not, that would make it very easy to detect commericals.
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.
It's not slashdotted... it's just auto skipping the commercials.. ;-)
- F1 NEWS
Look. Its this simple. The let this out. It will kill the advertising INDUSTRY. I say INDUSTRY in all capitols to hopefully hammer home that advertising is a HUGE piece of the economy now. Cut it out and thousands (if not millions?) loose their jobs. So call the advertisers what you like, they are people like you and me trying to keep their jobs from dissapearing. And you would too, if put in the same place.
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.
Comcast where I live (Boston, MA) has lately begun offering a targeted advertising service - "Spotlight" - which detects and overwrites network and affiliate commercials with their own (usually very cheaply done) local commercials. You'll get part of a network commercial, then some guy selling couches in the next town, then the tail end of another network commercial.
So, I'm sure they're compensating the networks for the commercials they're overwriting, right? I mean, with network commercial time costing in the gigabuck$ and all. And when we viewers do the same thing, we're stealing the networks' life blood...
I'm going to need a little more convincing.
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
Errr, clue: The reason you're having a hard time thinking of new ways that advertisers can rape your consciousness is because it's already being raped in every possible way that they can think of already.
These days, it's almost impossible to watch TV, use the internet, turn on the radio, go to the cinema, read a newspaper or magazine, walk down the street, check your snailmail, answer the telephone, play a video game , or even go to school without being psychologically invaded and manipulated into buying one piece of consumer trash or another. Taking back just ONE part of society from those devious corporate skullfuckers would be a huge victory.
If you want a Godwinish analogy, your argument is comparable to saying it would be A Bad Thing to kick Hitler out of North Africa or Stalingrad, because he'd only use the leftover troops to invade Poland again, only a bit harder.
Maybe MythTV can also remove the BS filler that is in programming too. As an example take any HGTV half hour TV show:
Step 1(Minutes 0-2). Useless introduction and program intro
Step 2(Minutes 3-5). Explain the situation
Step 3(Minutes 6-8). Commercials
Step 4(Minutes 9-10). Re-explain the situation
Step 5(Minutes 11-14). Try to create some drama out of thin air
Step 6(Minutes 15-17). Commercials
Step 7(Minutes 18-19). Re-explain the situation
Step 8(Minutes 20-23). Try to create some more drama out of thin air
Step 9(Minutes 24-26). Commercials
Step 10(Minutes 27-29). Restate what happened
Step 11(Minutes 29-30). Cue the music and intro the next program
As you can see, there's not too much real show in there.
I think that there should be an open commercial ID (maybe a frame with certain properties, like a specific color or shade of grey - it should be very easy to pick out.
If there was one, we (AmericaFree.TV) would use it, and I suspect other Internet television broadcasters would too. Why ? Because in the long run commercials (as opposed to product placements, sponsored events, etc.) will only work if people want to receive them, and because people will just fast forward through them anyway.
The google cache still works. It was also popular on Digg.com earlier.
"We are all geniuses when we dream"
- E.M. Cioran
Myself along with many others are looking to buy a set-top media box that:
- is open: can run MythTV,Linux,Vlc,mplayer,... and no reverse engineering is required to use basic hardware (and hopefully mpeg decoders).
- has DVI output
- has S/PDIF out
- is fanless
Basically an open DVD player with DVI out. A DVD player costs $50, but an "open" DVD player costs $1500? $300-$500 would be ok.
Or basically, a fanless mac mini, fanless MiniPC,...
"TV networks are in dire need of a better marketing model that better serves the consummer of their product."
You forget, the consumer of their products are the companies buying ad slots. Their "product" is us, their viewers. They have been aggressively trying to find ways to better serve advertisers, their consumers. The money they get, if any, via the cable company isn't really enough to probably even play re-runs. Basically they wouldn't just be changing how they market their product, they'd be completely changing the product itself, and who they're selling it to. How companies like HBO run vs ABC is like comparing apples and oranges.
Indeed, the promise of satellite/cable channels was that because you were paying for the subscription to see them, you wouldn't have to see commercials.
And that promise has been met - for channels where the programming and audience justifies it, like HBO. The thing is, when that promise was made, nobody envisioned 200 niche cable channels. There isn't enough subcriber revenue to pay for all those when the audience gets spread around like that, and commercials make up the difference.
You could have commercial-free cable TV, if you were willing to accept that your cable TV lineup consisted of 10 channels total. But that's not what most people want, and the market has adjusted accordingly.
paintball
You all have Oo.o and Firefox, so get World Wind.
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
(1) bug-blocking. ie: get rid of the channel identifier. It's annoying and gratuitous. Most of them are semi-transparent. There ought to be some way to xor them away.
(2) pop-up blocking. Those annoying animations that some networks are starting to put up on the bottom or right side of the screen right in the middle of a show, that are not related to the show.
(3) auto unsquish. When the network squishes the credits to the left 1/3 of the screen to put in some talking head telling you what's next. I want to squish the talking head.
(4) kill the talking head's overdubbed voice.
I know. I'm dreaming. Usual complaint applies: "I already pay through the nose for this. Stop making me get TV the way _I_ want it (from the torrent channel)."
My wife and I just watched seasons 1 & 2 of Veronica Mars on DVD via Netflix. We'd never heard of let alone seen it because, frankly, who the hell actually watched UPN? We both had it recommended to us on Netflix, were intrigued and added it to our queue at the same time.
We got hooked, loved it, and sucked it all it over the summer. We couldn't wait for season 3 to start on, what is it, CW? So we sit down on opening night and it sucked! The pacing was all off, we couldn't rewind it to hear that line we missed because the baby decided she wasn't ready sleep after all, and we had to sit through terrible ads aimed at people 10-15 years younger than us. We're sitting this season out and will put it in our queue next spring when the DVD comes out.
The troubling thing about this is that we are die-hard fans of this show and rave about it to everyone whenever TV comes up, but we could be part of what will kill this show. We aren't watching ads and we aren't buying the DVDs, so I don't think we exist to the producers of Veronica Mars. If a majority start watching TV like we do, I afraid of the shake-out period during which TV shows suck because the producers can't figure out how to make money in this new world.
obviously no deficiencies vs. no obvious deficiencies