[mythtv] Recording multiple channels on a single DVB transport

Richard Watts rrw at semiramis.org.uk
Wed Dec 21 06:50:27 EST 2005

Stuart Morgan wrote:
> On Wednesday 21 Dec 2005 10:35, Allan Stirling wrote:
>>I may be wrong, but it doesn't look (to me) like the difficult bit is with
>>the physical recording infrastructure.
>>It's with the scheduler.
> I might do some doodling in my spare time - that often gives me my best ideas. 
> Ignoring the current scheduling process might help - just focusing on how a 
> multiplex aware system would work and then folding that into the myth code.

  FWIW, when I was doing something similar a while back, the most efficient
approach I found was to run a greedy knapsack algorithm on all potentially
overlapping programmes, with costs set by recording priority, and some
hysterisis at either end to account for tuning delay, overruns, schedule
mismatch, and so forth.

If you're feeling really spiffy, you can then do sensitivity analysis
and impose a penalty on solutions which will require recordings to be dropped
if other programmes run over - sadly, the EIT data doesn't give you any
kind of information on which programmes are likely to run over.

  The trouble with that approach is that it leads to very confusing error

  `I am unable to show you this programme for complex reasons to do with
   a recording that is about to start, one which should have finished,
   and one I think might finish late or start early. But I can show you
   many other programmes .. '

  And you need to make sure it's vaguely stable across multiple
  equally-capable tuners.

  And obviously you have problems reloading EIT data because you don't
necessarily have a tuner left to tune to the relevant multiplex with
(this is particularly annoying when it means you miss schedule changes
because of a background recording or have incomplete programme info
because the user simply hasn't let you tune to that multiplex recently).

  In MythTV, of course, you also have the amusing problem that every
tuner has slightly different capabilities (even if you can get the
entire TS stream from a DVB card and filter it yourself, you probably
shouldn't, and some USB cards don't give you access anyway), which
will make the implementation decidedly tricky (and unstable).


More information about the mythtv-dev mailing list