[mythtv-users] I hate when this happens

Bruce Markey bjm at lvcm.com
Tue Sep 16 20:08:21 EDT 2003


Christian Hack wrote:

> I too have suffered from this every now and again while
> starting/restarting mythbackend in an attempt to get my DVB card
> working.

Last winter I often had things go wrong when starting multiple
recordings on multiple slaves. It was a mess getting all the
slaves and master restarted and recording the right things.
One of the problems was that the scheduler would run on the
master before the slaves had a chance to report in but this
has been fixed. I didn't think of changing the start times
until sometime after these problems were resolved.
 
> Wouldn't it be easier if you just append to .nuv file 

If the server crashed, the last block written to disk almost
surely wouldn't end at the end of a frame. The next frameheader
would be hard to find, the timecodes wouldn't be continuous,
the audio frames would be messed up, and there might have been
bad things going on that damaged the file leading up to the
crash that might make the appended data inaccessible. Writing
a new file avoids all the issues. Yes, it's imperfect to have
a show in two parts but the imperfection was the crash (or
inadvertent restart). I'd be very happy with two files if it
meant I didn't lose the first hour and a half of a basketball
game.

However, I never did lose a large portion of a basketball game.
Here's a workaround that I'll admit to having done more than a
dozen times. When the server crashed, I'd quickly rename the .nuv
file to "foo" then restart the server. It would create a new
.nuv file and start writing to it. Next, I'd go into mysql and
create a new entry in the 'recorded' table with a starttime an
hour earlier for example. Then I'd rename "foo" to match
chanid_starttime_endtime.nuv for the new entry. Fortunately, I
haven't had to do this more than once or twice in the past
three months.

--  bjm




More information about the mythtv-users mailing list