[mythtv-users] schedule howto

Stephen Worthington stephen_agent at jsw.gen.nz
Sat Dec 9 07:06:11 UTC 2023


On Sat, 9 Dec 2023 13:44:40 +0800, you wrote:


>What about the original question, specially if cache size is the issue. I have one record rule that may record 1 to 5 copies, typically 2 to 4. How to impliment ‘record 1 showing’ ‘prefer HD’ ? 

That depends on how you define HD.  Does your EPG do that?  Or is it
just that some channels are HD and some are SD?  The power priority
rules work for EPG telling you if the particular recording is HD on
that channel.  If the channels are HD and SD, then you normally just
give the HD channels higher priority in mythtv-setup.  I have a number
of channels where there is a +1 channel that broadcasts the same
programming an hour later.  Each main channel is HD, and each +1
channel is SD.  I also have the same channels repeated on a satellite
mux, where they are all SD, and worse SD than the DVB-T SD.  Here is
an example:

MariaDB [mythconverg]> select
chanid,channum,freqid,sourceid,mplexid,callsign,name,xmltvid,recpriority
from channel where visible=1 and callsign like 'TVNZ 1%' order by
callsign,channum+0;
+--------+---------+--------+----------+---------+-----------+-------------+---------------------------+-------------+
| chanid | channum | freqid | sourceid | mplexid | callsign  | name        | xmltvid                   | recpriority |
+--------+---------+--------+----------+---------+-----------+-------------+---------------------------+-------------+
|   1001 | 1       | 34     |        1 |       2 | TVNZ 1    | TVNZ 1      | tvnz1.freeviewnz.tv       |          10 |
|   3001 | 1       |        |        3 |       6 | TVNZ 1    | TVNZ 1      | tvnz1.freeviewnz.tv       |          -5 |
|   3091 | 91      |        |        3 |       6 | TVNZ 1    | TVNZ 1 HAM  | tvnz1.freeviewnz.tv       |          -5 |
|   3092 | 92      |        |        3 |       6 | TVNZ 1    | TVNZ 1 WGTN | tvnz1.freeviewnz.tv       |          -5 |
|   3093 | 93      |        |        3 |       6 | TVNZ 1    | TVNZ 1 CHCH | tvnz1.freeviewnz.tv       |          -5 |
|   1006 | 11      | 34     |        1 |       2 | TVNZ 1 +1 | TVNZ 1 +1   | tvnz1-plus1.freeviewnz.tv |           5 |
+--------+---------+--------+----------+---------+-----------+-------------+---------------------------+-------------+
6 rows in set (0.000 sec)

The sourceid=1 channels are terrestrial DVB-T, and sourceid=3 are
satellite DVB-S.  So I have the DVB-T HD channel with priority 10, the
DVB-T +1 channel with priority 5 and the DVB-S channels (including
three regional versions with different advertising) all as priority
-5.  Since I have enough DVB-T tuners to have one per mux, I always
get recordings for TVNZ 1 from the DVB-T HD channel.  If I had too few
tuners, then other priorities (such as a different programme of higher
priority recording on a different channel) might override that and the
second choice of DVB-T from the +1 channel might be where it recorded
from.  If the conflict for the DVB-T tuners was really bad, it might
record from one of the DVB-S channels.

I am not sure how you get a 'record 1 showing' rule to record more
than one copy of a programme.  Such a rule should record only one copy
and then delete itself from the database.  I think your rules that are
doing that will be "Record all showings" rules.  On such rules, you
can set the "This channel only" option, but then if you then run out
of tuners it may not record the programme at all.  You would get an on
screen Conflict notice in the Upcoming Recordings screen if it
happened.

You can create 'record 1 showing per week' rules also, but they are
done using Custom Edit (from the EPG listing, M=Menu > Recording
Options > Custom Edit) so a lot of people do not know about them. They
use SQL saved in the record.description field of the database, and the
scheduler has to run that SQL as part of its big scheduler query, so
having too many rules of this type will slow down the scheduler.
However, your MythTV PC is sufficiently powerful that it is unlikely
to matter for you.

Also from Custom Edit, you can use arbitrary SQL to choose what to
record.  So you can make very complex decisions that way.  If you run
out of room for the SQL text in the record.description field, you can
externally create stored procedures in the database and call them from
the Custom Edit SQL.


More information about the mythtv-users mailing list