[mythtv-users] An idea re commskip

f-myth-users at media.mit.edu f-myth-users at media.mit.edu
Wed Sep 30 04:50:51 UTC 2015


Since there's been recent activity re commskip accuracy, here's an
idea for a special case that should work on many news-like channels:
detect a news crawl.  It'll never be over the ads, but on many
channels seems to be omnipresent over the programming.

Even better, set a flag somewhere (is there a logical place in the DB
schema?) indicating the boundaries of the crawl, so it's possible to
automatically clip to that boundary upon display, hence removing it
from view.  Two birds with one stone.

Detecting the crawl seems to be relatively easy:  look for high
spatial frequencies at a constant rate (w/in some tolerance) moving
left (I'm assuming left-to-right text here) within the bottom n% of
the screen.[1]  Or, rather than looking for high-contrast, high
spatial frequency data (e.g., sharp text), just apply some sort of
bitblt hack that tries to see if the content seems to have been cloned
a small number of pixels to the left on the next frame, across m% of
the width of the frame, and then detect if that's happened for more
than a few frames---very poor man's motion vector analysis.  (In all
cases, reject the detection if a band or two in the middle or top of
the frame is also moving at the same rate; that's a full-frame pan and
not a news crawl. :)


[1] Pulling it out of the encoded motion vectors would be even easier,
but then the detection code would have to know how to parse all
possible encodings (mpeg, x.264, etc), and that seems like bad news;
better to look at the decoded data the rest of the commflagger uses.


P.S.  Not sending directly to -dev, but feel free to crosspost there
if someone feels so moved.


More information about the mythtv-users mailing list