[mythtv] PATCH: Commercial detection/skip using blank frames

Matt Zimmerman mdz at debian.org
Mon Feb 24 08:07:18 EST 2003

On Mon, Feb 24, 2003 at 01:04:30AM -0500, Andy Davidoff wrote:

> IIRC, it takes about 1 second to scan 15 seconds of video.  If we have 500
> megs of buffer (30 seconds per mdz), then we can scan commercials up to
> 7.5 minutes long without interrupting playback.
> If we have too little memory or too slow a CPU, we duplicate compressed
> video on the network and decode twice.  Otherwise, the playback thread can
> use the decoded frames from the scanning thread.

500M is a huge amount of stuff to keep in memory.  How many of you have more
than 512M in your MythTV systems?  This is disregarding the additional
problems caused by the fact that this video is stored in X server off-screen
pixmaps via shared memory.

I thought you were talking about doing more sophisticated analysis by
keeping a bunch of frames around (e.g., for scanning backward).  If all you
want is to scan for commercials ahead of playback without interrupting
playback, I think it makes the most sense to accept the cost of a second
decoding cycle and do it in a separate thread.  This way you are not limited
in the amount of video that can be processed ahead of time (up to the entire
recording), and it can be done before playback even starts.

 - mdz

More information about the mythtv-dev mailing list