[mythtv-users] Seeking PVR-150 / channel change script / backend contention advice

Michael Rice mikerice1969 at gmail.com
Fri Jan 14 06:13:48 UTC 2011


On Thu, Jan 13, 2011 at 9:52 AM, Joe Hickey <jfwd at phlobus.net> wrote:
> Hi all,
>
> I'm hoping to solve this problem in a better way.  Here's some
> background info- my third tuner is a PVR-150 connected to a cable STB
> so I can record all those channels that aren't sent clear QAM.  It
> works, except the cable box is not particularly stable; it turns off,
> reboots itself or otherwise misbehaves regularly, particularly during
> the night, causing missed recordings.
>
> Here's what I did as a workaround: as part of my channel change script
> I dump a couple seconds of video to a file in /tmp (by reading
> /dev/video0 directly), and then use a couple tools to dump a few
> frames to JPG files and then convert these to ascii art (I forget the
> tool names).  Basically it's a blank screen detection -- if I get
> blanks, I blast a "POWER" button before changing the channel.
>
> This improved the situation greatly for recordings.  However, I
> suspect there is some contention now as both the backend and my script
> are trying to open /dev/video0.  LiveTV on this turner doesn't seem to
> work at all.  I suppose a better way would be if I looked at the
> actual file that mythbackend is recording to, but there is no easy way
> for a channel change script to know this as far as I can tell.
>
> I found one script that does a few mysql queries to figure this out,
> querying the channels table to get the chanid and then the recordings
> table to find the latest entry on that chanid, but by doing something
> like that you've now tied your channel change script to the myth
> database schema, and created dependencies on the recordings table
> being updated before the script is called, etc.  It seems like it's
> prone to breakage as well.
>
> So - my question:
> a) Is there any reliable way that a channel change script can obtain
> the filename that mythbackend is starting it's recording to?
> -OR-
> b) Is there a way to determine if the cable box is on that doesn't
> require access to the video stream, like querying some other statistic
> in the ivtv driver?

Did you try exchanging the cable box for one that isn't flaky?
I had to pick up a new HD box recently and was pretty impressed
how small it was compared to my older HD boxes.  Probably
even consumes less power.

Not as fun but might do the job.


More information about the mythtv-users mailing list