[mythtv] Re: [mythtv-commits] Re: Ticket #255: Improved scheduling of consecutive programs with pre-roll/overrecord

Bruce Markey bjm at lvcm.com
Wed Sep 28 20:11:57 UTC 2005


Max Barry wrote:
> bjm at lvcm wrote:
> 
>> Option 1 and 2 could be made available for people who want them
>> but I won't recommend them and would ask that these be turned
>> off before answering any questions about odd scheduler behavior. 
> 
> 
> I've made sure that MythTV will log what's going on. The verbose=all log 
> will display the original scheduling, then any changes it's making (in 
> the usual format, i.e. prepended with "+" or "-").
>
> If there's any scheduling weirdness, you'll be able to tell whether it's 
> caused by this setting, because it says what changes it makes.

If you've followed these lists at all, people are often confused
by things much less intricate than this. Why scheduling decisions
don't make sense is not resolved by -v all and telling them to look
through the logs for "+" or "-". That doesn't explain what happened
to them last night and why (BTW it should be -v schedule anyway).
I will not undertake trying to explain any of the idiosyncrasies.

Also, if the plan is to record an 8 o'clock show from 7:55 until
9:10, the Upcoming Recordings page should reflect this known plan
rather than saying 8-9 and leave it to the user to remember, guess
or dig through the logs.

>> Chris Pinkham added a set a variables now called startoffset and
>> endoffset. These are stored in the record rules and allow the
>> minutes for the scheduled time to be adjusted. These are used
>> by the scheduler to plan how things should fit hours, days or
>> weeks ahead of time. These default to 0 and can be set once for
>> a recurring rule or for a single showing with single record or
>> an override.
> 
> 
> IMHO this is no substitute for a global setting.

"Global" isn't the distinguishing feature here. Having a default
offset setting for offsets would be global with the advantage that
it could then be re-adjusted on a per rule basis rather than blindly
applied (or considered) in all cases.

>  In Australia every TV 
> network frequently abuses its schedule (although some are worse than 
> others), so if you don't use the global setting, you need to manually 
> fix almost every single recording. Which is quite annoying.

Which is why this should be done with default start/end-offset option
if you really believe it's too much trouble. I know, however, that
others have floated the 'it's too hard' argument as a cover for 
wanting to believe that if they don't specify what they know
then they hope that optional time will get lucky and never drop
the additional time in a case where the show does actually run
long. If there are showss that must be recorded consecutively and
the times are not reliable then these need to be considered on a
case by case basis.

>  But more 
> importantly, you end up occasionally creating unintended conflicts, 
> because you're changing a hard setting.

This is where it becomes magic. I'm thinking of a one hour show at 8PM
and another at 9. Can you please tell me if the 8 o'clock show I'm
thinking of runs past 21:00:00? Yes or no? Use whatever algorithm
you'd like but tell me for a fact if it is okay to stop recording at 9.

> Currently, I need to check "Upcoming Recordings" every few days and 
> manually adjust the pre- and post- minutes where appropriate to make 
> sure that the buffers don't cause conflicts, and cause another show to 
> be missed.

Exactly. You, as a human being that watches the shows, know which
shows are likely to have content outside the scheduled time and
you know what adjustments are appropriate. No algorithm in the
world can do the right thing in all cases. Say there are two cards
and two series, each with one showing of an episode at 9 and an 8PM
hour long show only shown at 8. Does the show at 8 go past 9? Do
either of the 9 o'clock shows start early? How does it decide
which show at 9 should be on it's own card to start early? Could
either of the 9 o'clock shows start late to make room for a late
ending of the 8PM show? These are things where only you could
know what to expect and what you want to do about it.
 
>  Then I need to remember I've done this, and put the setting 
> back again afterward

Um, no. That is what overrides are for. You can adjust one showing
without affecting the recurring rule. In practice, the same shows
are on each week and the situation is the same week after week in
most cases.
 
> otherwise next time the show runs late, I miss the end of it.

If you're going to miss the end of next week's show unless there
is time added at the end then you missed the end of this week's
show when the time was not added. If this week's show recorded
okay without extra time then next week's show probably will too.
I won't believe for a second that it will happen to fit if there
isn't room for extra time and will not fit in just the cases where
there is room for extra time.

> And even if I do all this, whenever the TV network changes 
> its schedule at the last minute, I'm screwed.

I don't even know where to begin here. How on earth would you
be assured of not being screwed by a schedule change if the
behavior was optional and ambiguous?

> This seems way more complicated than it needs to be. And it's all caused 

That may be your impression but this in no way convinces me that
the sense of simplicity of not telling the scheduler what you know
and expecting that having optional time will do the right thing in
all cases. It won't. Having optional minutes of time that will be
applied on some cases and not in others and having recordings moved
to other cards and other times in complex situations for reasons
that may not be appearent would be more complicated.

> by MythTV's hardcoded assumption that I want to dump my preroll and 
> overrecord minutes rather than use my 2nd (idle) tuner card.

This is built on your mis-interpretations and I've already explained
why the preroll was added. The offset minutes are used in planning
the schedule ahead of time. The preroll was created to be used by the
recorder at record time and deliberately should not impact the schedule.
You've decided that the existing variables should be re-interpreted
to affect the schedule. I disagree and don't want to have the
preroll feature trashed simply because you choose to not see it's
value. If you want to have an ambiguous magic feature that affects the
schedule, use different variables and reflect the resulting planned
start and end times in the reclist.

> I simply want to be able to say this ISN'T my preference--I'd prefer to 
> use the extra card and capture the buffers.

This will happen if you tell the scheduler what time you require
it must record by setting the offsets used by the scheduler.

> I think this is a valid point whether I'm capturing a few seconds ("as 
> intended") or minutes. The issue is that MythTV is assuming a preference 
> that isn't necessarily true, and there's currently no way to change it. 
> That's what my patch addresses.

Again, this is your mis-interpretation written after I'd explained
where the preroll variable came from. If your quotes around "as 
intended" were meant to be sarcastic, I'll have very little patience
for that.

>> The planned schedule offsets should be used to get minutes of
>> content that is expected to fall outside of the TV listings times.
>> The runtime recorder seconds facility should be available for
>> their intended use without affecting the schedule. 
> 
> 
> I can understand this when, as you say, ">98% of shows start and end
> within the listed times." But that isn't the case in Australia, where 
> 98% of prime-time shows on commercial TV end OUTSIDE the listed times. 
> The only really reliable schedule is the 6 o'clock news.
> 
> Living here, it makes a lot of sense to compensate with a global 
> setting, because you do indeed want to apply it globally. You only want 
> to deal manually with the (less common) exceptions.

And that suggests that there should be default offsets for new rules.
Leaving the extra time up to hit or miss happenstance is not a
solution. Based on your own statistics, 49 out of 50 times that the
extra time is not applied you will miss content.

>> I'm thinking now that if there is going to be some sort of "softer"
>> scheduling it should be just that, part of the schedule planning.
> 
> [...]
>  > These could be applied to the schedule in the context
>  > of scheduling and shown in the Upcoming Recordings (reclist) for
>  > the users to fix whatever problems they create for themselves.
> 
> Perhaps I misunderstand what you're getting at, but that's exactly what 
> my patch does. It lets MythTV adjust the schedule to (for example) 
> assign a future program to an idle tuner card, and you can see it's done 
> this in "Upcoming Recordings."
> 
>> We should leave the preroll seconds out of it and limit their range
>> to 0-29 seconds to be applied by the recorder at record time as it
>> is now. 
> 
> 
> I really don't know if MythTV needs another set of global buffer 
> options. I think it's simpler and more intuitive to have one setting and 
> ask users how they want it to work.

IOW, it's simpler for you to blow off a worthwhile feature and
reuse the variables as you see fit? I disagree.

> Otherwise you end up with multiple settings for what is, at least at 
> first glance,

In case you didn't know, I'm well past the first glance.

>  the same thing. If a new pair of global setting was added, 
> MythTV would have 3 different ways to set pre- and post- buffers (two 
> global, one rule-specific), which seems a little excessive.

This is simply wrong. These are not different interchangeable ways
of accomplishing the same thing and that is the crux of the problem.
The offsets are used when the schedule is planned for the purpose
of assuring that the recordings will encompass the time required to
record the content of the shows. Preroll was created to give the
recorder a head start before the scheduled time to allow for
initialization. It was not intended to assure capturing content
outside of the times in the TV listings. These are very different
features to serve very different needs. It is the perception that
the ability of the recorder to start a few seconds early could be
used as a substitute for planning to have the scheduler include
content outside the listings time which is the point of confusion.

If you do want minutes of time to record content outside the time
in the listings, face up to it, use new variable names, account for
the time while planning the schedule and reflect the times that
recordings would start and end in the scheduler output.

> anonymous wrote:
> 
>> Shouldn't there be an additional option - "Apply unless it would
>> cause a conflict or require MythTV to record an earlier or later 
>> showing" -
> 
>  > for people who don't mind tying up all their tuners briefly (e.g.
>  > because they don't use LiveTV mode anyway, all their tuners are
>  > equally good, etc) but don't want their recordings delayed?
> 
> This sounds sensible, and I'm happy to add it if devs agree.

If you're going to leave the recorder leader time alone and add
a feature to the planned schedule, it would make sense to have
options for just move to other cards, just move to later times,
or both.

> Thanks for the feedback! This is an interesting process. And, since I'm 
> here, thanks also to all devs for making such a wonderful piece of 
> software. It's practically changed my life. :)

You're welcome. Glad to hear it.

--  bjm


More information about the mythtv-dev mailing list