[mythtv-users] Uncool surprise... coming back from vacation, shows not recorded.

f-myth-users at media.mit.edu f-myth-users at media.mit.edu
Thu Dec 1 00:34:37 EST 2005


I've been thinking about this issue quite a bit recently.  I have half
of a solution but need a little bit of advice on how to make it a
whole solution; if even one person has an idea about how to address
each of 3-4 problem areas, I can put together the pieces and post it
back for everyone to use.  (All of these presume you're starting with
an mpeg.)

What I'm trying to do:  Have Myth notice that a recording is "bad" and
autoreschedule a new one.  (If there's no repeat, well, you're SOL,
but often there is---if only you knew about it soon enough!)  This
could be extended to "and send mail screaming bloody murder" to warn
people of misconfigurations/dead-machines whatever as well, of course.

In my experience, three problems happen:
   
o  No video.  For example, one of the local PBS affiliates
   -frequently- airs totally black video in place of a show.  (This
   probably happens once a month, usually in the dead of night when
   nobody at the station is awake.)  They'll air the promo, then cut
   to black, and then at the end of the hour, the next promo...  So
   there's sync, the card's working, etc, but there's no -content-.
o  Crappy, unwatchable video (half-destroyed by static, etc).
   This is typically because the studio feed crapped out somehow.
   I've sometimes seen shows slowly degrade from fine to total snow
   over the course of half an hour.  Discovery Channel seems particularly
   prone to this sort of failure, at least here.
o  No audio.  I've seen this in ivtv (working w/Hans to track it down
   in my case), and sometimes the station blows it, too.

Partial ideas for solutions.  Help appreciated!

o  Either look for a suspiciously-small output file (will all that
   black video produce a very small mpg? Or will it be close-enough
   to normal size that a heuristic like this won't work?), or have
   something that counts scene changes and complains if the average
   is too low.  I'm guessing that the guts of mythcommflag might have
   some of the relevant code, but is there some easy way running
   something (mencode, or some other tool that groks mpegs) and just
   having it output the number of scene changes, or something like
   that?  Surely somebody has this tool already.
o  I dunno how to notice high static.  Does it tend to interfere with
   scene-change detection?  Can it be guessed by running some sort of
   Gaussian filter over a few frames and seeing if they clean up too
   much or too little?  Excessive high-frequency information in either
   the chroma or luminance channels?  The image-processing community
   probably knows how to do this, but maybe there's a quick & easy
   idea someone has here, given that we're already talking about mpegs.
o  Dump the audio out (mplayer input -dumpaudio -dumpfile output)
   and then look for excessively-low average, or sample it for a few
   seconds every few minutes and complain if too many of them are
   silent (or close to silent; compensates for hum, etc).  There's
   probably some simple audio tool that can do this, but I don't know
   what off the top of my head.

The final problem:  instructing the backend to retry the recording.
This is presumably some simple SQL magic.  But what?

Thanks for any ideas anyone can suggest...

P.S.  Is there an easy tool of producing a series of thumbnails of
every scene change from a section of video?  (Or perhaps just a single
frame from every n minutes, regardless of scenes.)  That would be
handy no matter what, to quickly notice that the middle of something
got trashed, or to make it possible to notice that, e.g., PBS decided
to show an hour of Exciting Legislators Voting and Debating instead of
whatever they originally scheduled, which also happens quite a bit
here... :)  The idea is to have something so low-bandwidth that it
could be quickly checked at the other end of some network link far
from home, allowing manual rescheduling via mythweb...


More information about the mythtv-users mailing list