[mythtv-users] ivtv

rwk at americom.com rwk at americom.com
Tue Feb 10 03:45:10 EST 2004


Andrew,

I found your posting and read it with interest.  You state:

"Next, in some cases, the ivtv driver would get screwed up and
 mythbackend would start spewing out Input/output errors when trying to
 read from /dev/video0.  What I did was write a script that runs every
 minute, and if the errors are detected in the backend log, will stop
 mythbackend, unload and reload ivtv, and start mythbackend.

However, you did not provide the script for finding errors.  I have
reviewed the backend log file and it shows no errors anyway, so I don't
understand how this could work:

Here are the relevant messages from my log file:

2004-02-08 18:00:01 Found changes in the todo list.
2004-02-08 18:00:02 Started recording "60 Minutes" on channel: 1002 on cardid: 2, sourceid 1
2004-02-08 18:00:02 Changing from None to RecordingOnly
2004-02-08 18:00:02 Using profile 'Default' to record
2004-02-08 19:00:01 Found changes in the todo list.
2004-02-08 19:00:03 Started recording "The 46th Annual Grammy Awards" on channel: 1002 on cardid: 2, sourceid 1
2004-02-08 20:00:00 Changing from RecordingOnly to None
2004-02-08 20:00:02 Found changes in the todo list.
Input #0, mpeg, from '/video//1005_20040208180000_20040208200000.nuv':
  Stream #0.0: Video: mpeg2video, 480x480, 29.97 fps
  Stream #0.1: Audio: mp2, 48000 Hz, stereo, 384 kb/s

Neither 60 Minutes or the Grammys recorded (the file length was zero)
and there are no errors reported in the log file.  So I don't see how
your script would work.

Also, this approach (if I understand it) would wait until an error
occurs before it restarts/reloads things, thus possibly missing the
first minute or so of a program.

I am wondering if there is any way to poll the ivtv driver and ask it
how it is doing (whether it is recording or not), which would allow one
to restart it before the next recording.

Thanks in any case for your reply.

Dick

> Go through the archives, look for a message with a subject something like "Misc.
> tips and tricks for RedHat + ivtv users" posted by me.  I posted it 3-4 days ago
> or so.
> 
> It includes a set of scripts/cronjobs that will monitor the Myth backend logs
> for Input/output errors from /dev/video0, and if they are detected, will stop
> the backend, unload and reload the driver, and restart it.
>
> > Hi,
> > 
> > This has happened to me several times over the last year since I started
> > using mythtv and I lost the grammys this time as a result, so I thought
> > it was time to ask...
> > 
> > Occasionally I will go to watch a recording and find out that it is zero
> > length.  When I check, I find that the ivtv driver is hung.  I rmmod
> > ivtv and modprobe ivtv and it start working again just fine.
> > 
> > So my question is, is there a definitive way to monitor /dev/video0 and
> > make sure it is working.  (Keep in mind it may be recording a show when
> > checked.)
> > 
> > If so, I would set the monitor script to rmmod and insmod the driver,
> > thus hopefully not loosing the whole days worth of recordings.
> > 
> > Thanks for any suggestions...
> > Dick
> > 
> > P.S.  Maybe this should be posted on the ivtv board, but I thought if
> > there is a good way to handle it, others in this group would be
> > interested.


More information about the mythtv-users mailing list