[mythtv] What is the best way to implement overlapping recordings on one channel?

Brad Templeton brad+mydev at templetons.com
Sun Apr 3 19:32:32 UTC 2005


On Sun, Apr 03, 2005 at 10:26:58PM +1000, Glenn Moloney wrote:
> Hi All,
> 
> Thanks for comments from everyone. Sorry to be absent for the last few
> days - I've been slowed down by a nasty cold.
> 
> I will proceed with option 2 (or something like it) - though I didn't
> get far over the weekend.
> 
> And thanks for the inducement David :-).
> 

One of the big advantages of the (harder) fragment approach is you can
start considering "extreme padding."  Which is to say, adding by default
_lots_ of padding to shows, particularly the end of shows, particuarly
the end of shows known to run a bit long like sports and other live
events, and certain movies.

When you have fragments you can expire the fragments to free up space.
This means that if you watch the live event show fairly soon -- as most people
tend to do on such shows -- you will never face the aggravation of
finding it cut off at the end.    If you watch it much later, worst case
is today's behaviour.  (In an advanced world you can learn from other
people whether you truly need the padding and how much.)

Of course, you can chop data off the end of a file without fragments.
Chopping from the beginning needs fragments to be anywhere near
efficient.  And if your padding dug into an adjacent program, the fragment
approach now saves a lot of disk space rather than a little.

The fragment approach also becomes the way you do live TV instead of
a ringbuffer.

You must, however, have the player designed to expect fragments, and
to do lots of read-ahead into RAM when a fragment border is approaching
to have enough ram buffer to cover the closing of frag 1 and the opening
and streaming of frag 2.


More information about the mythtv-dev mailing list