[mythtv-users] Working out which tuner was used for which recording

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Jun 3 13:02:35 UTC 2015


On Wed, 03 Jun 2015 12:45:48 +0100, you wrote:

>I'm trying to work out how many of my DVB-T tuners are being used, and 
>mow many "multiplex" recordings are occurring. I recall seeing this sort 
>of thing being mentioned before, but I can't find the right google 
>search to find the answers I need.
>
>I've tried looking at mythbackend.log, and I can see events like:
>
>mythbackend.20150602041856.1896.log:2015-06-02 22:55:02.094164 I 
>[1896/2044] TVRecEvent tv_rec.cpp:4130 (TuningNewRecorder) - TVRec[2]: 
>rec->GetPathname(): '/DATA/MythTV.27/1009_20150602215500.mpg'
>
>But not sure if that literally means tuner 2 was used to record the 
>programme, or how to tie that back to the channel, programme etc.
>
>Anyone know off the top of their head before I spend all afternoon 
>trying to think of the correct search to find the old discussions.
>
>Cheers
>Gordon

The [2] means multirec tuner 2 (a cardinput.cardinputid value), not a
physical tuner.  If you set everything up from scratch, then the
multirec tuners for each physical tuner will be numbered in order, but
often they are mixed up.  I made sure I had all my cards set up in
order so that I can tell exactly which one is which.  In any case, if
you are up for a bit of SQL to read your database, this should tell
you what all your numbers mean:

select cardinputid,cardid,sourceid,inputname,displayname,(select
videodevice from capturecard c2 where c1.cardid=c2.cardid) as
videodevice from cardinput c1 order by
sourceid,videodevice,cardinputid;

This is what I get:

+-------------+--------+----------+-----------+---------------------------+-----------------------------+
| cardinputid | cardid | sourceid | inputname | displayname               | videodevice                 |
+-------------+--------+----------+-----------+---------------------------+-----------------------------+
|           1 |      1 |        1 | DVBInput  | DVB-T 1.1 (1)             | /dev/dvb/adapter0/frontend0 |
|           2 |      2 |        1 | DVBInput  | DVB-T 1.2 (2)             | /dev/dvb/adapter0/frontend0 |
|           3 |      3 |        1 | DVBInput  | DVB-T 1.3 (3)             | /dev/dvb/adapter0/frontend0 |
|           4 |      4 |        1 | DVBInput  | DVB-T 1.4 (4)             | /dev/dvb/adapter0/frontend0 |
|           5 |      5 |        1 | DVBInput  | DVB-T 1.5 (5)             | /dev/dvb/adapter0/frontend0 |
|           6 |      6 |        1 | DVBInput  | DVB-T 2.1 (6)             | /dev/dvb/adapter1/frontend0 |
|           7 |      7 |        1 | DVBInput  | DVB-T 2.2 (7)             | /dev/dvb/adapter1/frontend0 |
|           8 |      8 |        1 | DVBInput  | DVB-T 2.3 (8)             | /dev/dvb/adapter1/frontend0 |
|           9 |      9 |        1 | DVBInput  | DVB-T 2.4 (9)             | /dev/dvb/adapter1/frontend0 |
|          10 |     10 |        1 | DVBInput  | DVB-T 2.5 (10)            | /dev/dvb/adapter1/frontend0 |
|          11 |     11 |        1 | DVBInput  | DVB-T 3.1 (11)            | /dev/dvb/adapter2/frontend0 |
|          12 |     12 |        1 | DVBInput  | DVB-T 3.2 (12)            | /dev/dvb/adapter2/frontend0 |
|          13 |     13 |        1 | DVBInput  | DVB-T 3.3 (13)            | /dev/dvb/adapter2/frontend0 |
|          14 |     14 |        1 | DVBInput  | DVB-T 3.4 (14)            | /dev/dvb/adapter2/frontend0 |
|          15 |     15 |        1 | DVBInput  | DVB-T 3.5 (15)            | /dev/dvb/adapter2/frontend0 |
|          16 |     16 |        2 | S-Video 1 | S-Video 1 (16)            | /dev/video0                 |
|          17 |     17 |        3 | DVBInput  | QBox2 DVB-S2.1 (17)       | /dev/dvb/adapter3/frontend0 |
|          18 |     18 |        3 | DVBInput  | QBox2 DVB-S2.2 (18)       | /dev/dvb/adapter3/frontend0 |
|          19 |     19 |        3 | DVBInput  | QBox2 DVB-S2.3 (19)       | /dev/dvb/adapter3/frontend0 |
|          20 |     20 |        3 | DVBInput  | QBox2 DVB-S2.4 (20)       | /dev/dvb/adapter3/frontend0 |
|          21 |     21 |        3 | DVBInput  | QBox2 DVB-S2.5 (21)       | /dev/dvb/adapter3/frontend0 |
|          22 |     22 |        3 | DVBInput  | TeVii S470.1 (22)         | /dev/dvb/adapter4/frontend0 |
|          23 |     23 |        3 | DVBInput  | TeVii S470.2 (23)         | /dev/dvb/adapter4/frontend0 |
|          24 |     24 |        3 | DVBInput  | TeVii S470.3 (24)         | /dev/dvb/adapter4/frontend0 |
|          25 |     25 |        3 | DVBInput  | TeVii S470.4 (25)         | /dev/dvb/adapter4/frontend0 |
|          26 |     26 |        3 | DVBInput  | TeVii S470.4 (26)         | /dev/dvb/adapter4/frontend0 |
|          27 |     27 |        4 | DVBInput  | QBox2 sasc-ng.1 (27)      | /dev/dvb/adapter5/frontend0 |
|          28 |     28 |        4 | DVBInput  | QBox2 sasc-ng.2 (28)      | /dev/dvb/adapter5/frontend0 |
|          29 |     29 |        4 | DVBInput  | QBox2 sasc-ng.3 (29)      | /dev/dvb/adapter5/frontend0 |
|          30 |     30 |        4 | DVBInput  | QBox2 sasc-ng.4 (30)      | /dev/dvb/adapter5/frontend0 |
|          31 |     31 |        4 | DVBInput  | QBox2 sasc-ng.5 (31)      | /dev/dvb/adapter5/frontend0 |
|          32 |     32 |        4 | DVBInput  | TeVii S470 sasc-ng.1 (32) | /dev/dvb/adapter6/frontend0 |
|          33 |     33 |        4 | DVBInput  | TeVii S470 sasc-ng.2 (33) | /dev/dvb/adapter6/frontend0 |
|          34 |     34 |        4 | DVBInput  | TeVii S470 sasc-ng.3 (34) | /dev/dvb/adapter6/frontend0 |
|          35 |     35 |        4 | DVBInput  | TeVii S470 sasc-ng.4 (35) | /dev/dvb/adapter6/frontend0 |
|          36 |     36 |        4 | DVBInput  | TeVii S470 sasc-ng.5 (36) | /dev/dvb/adapter6/frontend0 |
+-------------+--------+----------+-----------+---------------------------+-----------------------------+
36 rows in set (0.00 sec)

You can change the "order by" clause around if you want a different
order.

As you can see, I have set up individual display names for all my
cards to make it quite explicit which is which, but I had to do that
using SQL tools as MythTV does not support doing that.

If you need a tool to allow you to run SQL commands on your
mythconverg database, you can download the script I use from my web
server:

  http://www.jsw.gen.nz/mythtv/do_mythconverg.sh

WARNING: Unless you really know what you are doing, do not use any of
the SQL commands that can alter your database.  These commands are
safe as they are read-only and they are all that you should need to
search for things in your database:

  show tables;
  desc <tablename>;
  select

Note that some complex select operations between tables can cause
heavy database activity, which can push the hard drive the database is
on over its capacity to cope if you are also doing other things with
that drive, such as recording to it.  If you manage to start such a
select by mistake, use Ctrl-C to stop it.  So it is best to not try
manual access to the database except between recordings, when the PC
is not busy.


More information about the mythtv-users mailing list