Slashdot Mirror


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."

26 of 403 comments (clear)

  1. From the summary... by darien · · Score: 5, Insightful

    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...

    1. Re:From the summary... by feld · · Score: 5, Funny

      the coolest thing is that they've said on the mailing lists that if they start forcing / flagging commercials so you have to watch them and you can't skip through them, MythTV will use those flags to skip the commercials entirely.

      Ahh, the power of chee^H^H^H^Hopen source.

    2. Re:From the summary... by Grishnakh · · Score: 3, Interesting

      I already pay for a lot of the commercial-free TV I watch: it's called Netflix.
      Lost, 4400, Firefly... I've gotten these on DVD from Netflix, and enjoyed watching them all commercial-free, for the flat-rate price I pay to Netflix for monthly membership.

      If I didn't have to wait so long for these shows to come out on DVD, then this would be even better.

      The TV show makers need to abandon this silly idea of having to broadcast their shows on a weekly basis, and wait for the season to be over before releasing them on DVD. Let's just skip broadcast altogether and go straight to DVD.

    3. Re:From the summary... by SCHecklerX · · Score: 3, Interesting

      We pay for cable tv. So why are there still commercials at all? Same goes for tv-type advertisements that have been showing up in digital movie theaters the past several years.

    4. Re:From the summary... by dgatwood · · Score: 4, Interesting

      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. Then, they got greedy and added commercials anyway.

      If all my favorite shows were available on iTunes Store, I'd drop my DirecTV subscription entirely. I have to pay more for DirecTV (cable would cost even more....) for that content than I would to buy it via iTunes season passes. And if I just buy the DVDs used a year later, I'd pay half that. Cable TV is false economy unless you're a stay-at-home parent. For almost everyone else, direct purchasing costs less and you don't have to put up with the commercials.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

  2. Another check by renfrow · · Score: 5, Interesting

    Another thing they might try is to look at average loudness. It seems like commercials are pumped up a bit from regular shows.

    Tom.

    1. Re:Another check by fred+fleenblat · · Score: 4, Interesting

      Might also be interesting to try to flag entry/exit frames from known commercials (with a checksum or fingerprint sort of thing) into a shared database, then just look up the frames. If your show has 2.5 minutes with matches every 30 seconds, that's a commercial break. People can do a P2P vote with their FF button to contribute. Just a thought.

    2. Re:Another check by AK+Marc · · Score: 3, Informative

      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.

  3. For those who run Windows... by abscissa · · Score: 5, Informative

    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/

  4. I wonder how many people will point this one out? by necrodeep · · Score: 5, Informative

    "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'.

  5. What will happen... by Channard · · Score: 3, Interesting

    .. is that you'll get people making cleverer or less obvious infomercials.

    1. Re:What will happen... by PylonHead · · Score: 4, Funny

      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 =
  6. Article Text by Anonymous Coward · · Score: 4, Informative

    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.

    1. Re:Article Text by Rob+T+Firefly · · Score: 4, Funny
      Five groups of 30 second scenes all grouped together may be a good indication of a block of commercials.
      That's no good, it'd mark MTV's entire broadcast day as one big block of commercials.... oh, wait.
  7. Re:Does it just skip them or cut them from the fil by Nos. · · Score: 5, Informative

    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.

  8. This was going to be a joke, but... by Control+Group · · Score: 3, Interesting

    ...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...
  9. SHOCKING NEWS! MythTV linked to Al-Qaida, France by StefanJ · · Score: 4, Funny

    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]

  10. Re:So my question is.. by Kope · · Score: 4, Insightful

    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.

  11. Re:Slashdotted by Zarniwoop_Editor · · Score: 3, Funny

    It's not slashdotted... it's just auto skipping the commercials.. ;-)

    --
    - F1 NEWS
  12. Volume? by alta · · Score: 4, Insightful

    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.
  13. "bad" when MythTV does it, OK for Comcast? by Peter+Simpson · · Score: 3, Insightful

    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.

  14. a good way to be sued by happy_place · · Score: 3, Informative

    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
  15. Re:Why not better commercials? by udderly · · Score: 3, Funny

    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.

  16. There should be an "Open" Commericial Identifier by mbone · · Score: 3, Interesting

    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.

  17. fanless MythTV box? by GodWasAnAlien · · Score: 3, Interesting

    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,...

  18. Loudness answer from Comcast by steve-san · · Score: 3, Informative

    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