[mythtv-users] Commercial detection idea

Brad Templeton brad+myth at templetons.com
Fri Apr 8 08:45:19 UTC 2005

On Thu, Apr 07, 2005 at 10:50:20PM -0400, Chris Pinkham wrote:
> > I had a idea i thought might be worth a try.  Currently as i
> > understand it the commercial detection code only looks at the image's
> > captured, however an easy way to detect a commercial break would be to
> > "listen" to the sound.  When there is no sound (or under a certain
> > level) and it coincides iwth a possible break then you have an even
> This has been mentioned several times and has been on my TODO list
> since I started the commercial flagging code over 2 years ago, but
> I've got enough things I can do with video so I haven't gotten to
> the audio yet.  With the new block-based ALL method, it should be
> easier to integrate, but I don't have any plans on working on it
> in the short-term future.  If you'd like to do any coding to
> detect these 'lulls' in the audio, feel free to submit a patch on
> the -dev list.

And it might also be worth looking not just at the lulls but in sudden
changes in the mean energy.

The rules prohibit commercials from actually being louder than the show,
but that's the peak they measure.   The show uses the peak only for loud
things, like explosions, but the commercial tries to get as close to it
as it can.  At least some do.

More information about the mythtv-users mailing list