[mythtv-users] detecting blank screen if video source is turned off

Brad Sawatzky brad+mythtv at swatter.net
Thu Oct 11 17:14:00 UTC 2007


On Thu, 11 Oct 2007, Adam Hirsch wrote:

> Every once in a while, our cable box turns itself off.  Since we don't
> watch recordings every day, this occasionally results in several days
> running where Myth will cheerily record entirely blank hours of television.
> This is irritating and significantly drops the WAF, as you may imagine,
> though I blame most of the problem on the cable box.
> 
> I tried capturing 10 seconds of video directly off /dev/video0 when the
> video source was showing images and when it was turned off, hoping that the
> two captured files would be different in size, and I could script a nightly
> check and turn the cable box back on.  No luck.

A few thoughts, YMMV:

If the cable box is leased, see if there's a newer model that doesn't do
this.

Try compressing the 10 second clip and checking the sizes again.  I'll bet
you won't even have to transcode to another video format, you could just
use gzip.

Snag one or two frames from your test recording and analyze the jpeg files
instead of the live video.  Here's a frame grab example:
  mplayer -noframedrop -ss $SKIP_SEC -vo jpeg:quality=50:outdir=$OUTPATH -frames 2 @VC -nosound $VIDFILE

If the cable box is simply "timing-out" and turning off after some fixed
period of inactivity, try scripting a periodic channel change to keep it
alive.

If you're into hardware hacking you could monitor the cable box power LED
with a simple circuit coupled to the one of the flow-control lines on your
myth box's serial port.  This could be made non-invasive by taping a
photoresistor over the LED on the cable-box (marginally more complicated
circuit).

-- Brad


More information about the mythtv-users mailing list