[mythtvnz] Determining which tuner card for a recording after it is recorded

worik worik.stanton at gmail.com
Tue Sep 8 22:09:04 BST 2015


On 07/09/15 16:21, Stephen Worthington wrote:
> On Mon, 07 Sep 2015 15:45:20 +1200, you wrote:
> 
>> On 07/09/15 15:09, Stephen Worthington wrote:
>>> On Mon, 07 Sep 2015 14:22:46 +1200, you wrote:
>>>
>>>> On 07/09/15 13:44, Nick Rout wrote:
>>>>> Most physical tuners can ve set up to be more than one virtual tiner, I
>>>>> am not sure if this is what you are seeing.
>>>>
>>>> I want to match the report from the log, e.g., "cardid 1, sourceid 1"
>>>> with physical devices.

Ok.  For the record:

In mysql...

select cardid, videodevice from capturecard

matches cardid and dvb/device.

For each device above query the "frontend0"

sudo udevadm info --name=/dev/dvb/adapter0/frontend0 --attribute-walk
--export|grep -i {product}

This produces a tree of a couple of system devices.  The first listed is
the one that is important.

That matches cardid with device.

To match recording with cardid:

cat /var/log/mythtv/mythbackend.log | grep HandleRecordingStatusChange

So now I can tell which stick did which recording so I can identify
which is doing the better job.

Thank you all for the help

W

>>>>
>>>> W
>>>
>>> Take a look at your MythWeb status page.  At the top should be a list
>>> of all the virtual tuners and the mapping to /dev devices.  I have
>>> also installed an addon script for the status page that looks back
>>> through the current mythbackend.log file and finds all the recordings
>>> and lists them with the virtual tuner number.  I think this is the
>>> script:
>>
>> The information on the mythweb/status page for my setup is not enough to
>> map "virtual tuners" to physical devices.  It says:
>>
>> Encoder 1 [ DVB : /dev/dvb/adapter0/frontend0 ] is local on backend and
>> is not recording.
>> Encoder 2 [ DVB : /dev/dvb/adapter0/frontend0 ] is local on backend and
>> is not recording.
>> Encoder 4 [ DVB : /dev/dvb/adapter1/frontend0 ] is local on backend and
>> is not recording.
>>
>>
>>>
>>>   https://www.mythtv.org/wiki/Myth_recent_recordings.pl
>>>
>>> and it also needs this script to work:
>>>
>>>   https://www.mythtv.org/wiki/Miscellaneous_Status_Information
>>>
>>
>> Myth_recent_recordings.pl does not need Miscellaneous_Status_Information
>>
>> The results it producs are no help to me
>>
>> For example running it for just one recording says:
>>
>> ~$ perl myth_recent_recordings.pl --recordings 1 --plain_text
>> Recent Recordings:
>> 9/7, 1:59 PM - PRIME
>> Doctor Who - Farewell To Matt Smith
>> Farewell To Matt Smith: This Doctor Who special looks back and
>> celebrates Matt Smith's time as the eleventh Doctor in the iconic
>> series. PGR (R)
>>
>>
>>> This SQL query should tell you which tuner is which if there is not
>>> enough information on the status page:
>>>
>>> select cardinputid,cardid,sourceid,inputname,displayname,(select
>>> videodevice from capturecard cc where cc.cardid=ci.cardid) as
>>> videodevice,(select cardtype from capturecard cc where
>>> cc.cardid=ci.cardid) as cardtype  from cardinput ci order by
>>> cardinputid;
>>>
>>> The cardinputid is the virtual tuner number used in the logs.
>>>
>>> Change the "order by cardinputid" to "order by videodevice" to list
>>> the virtual tuners grouped by physical tuner.
>>
>> This gives:
>>
>> mysql> select cardinputid,cardid,sourceid,inputname,displayname,(select
>>    -> videodevice from capturecard cc where cc.cardid=ci.cardid) as
>>    -> videodevice,(select cardtype from capturecard cc where
>>    -> cc.cardid=ci.cardid) as cardtype  from cardinput ci order by
>>    -> cardinputid;
>> +-------------+--------+----------+-----------+-------------+-----------------------------+----------+
>> | cardinputid | cardid | sourceid | inputname | displayname |
>> videodevice                 | cardtype |
>> +-------------+--------+----------+-----------+-------------+-----------------------------+----------+
>> |           1 |      1 |        1 | DVBInput  | adaptor0    |
>> /dev/dvb/adapter0/frontend0 | DVB      |
>> |           2 |      2 |        1 | DVBInput  | adaptor0    |
>> /dev/dvb/adapter0/frontend0 | DVB      |
>> |           4 |      4 |        1 | DVBInput  | adapter 1   |
>> /dev/dvb/adapter1/frontend0 | DVB      |
>> +-------------+--------+----------+-----------+-------------+-----------------------------+----------+
>> 3 rows in set (0.00 sec)
>>
>>
>> But there is still no information that matches
>> /dev/dvb/adapter0/frontend0 to a physical device.  I have two, which is it?
>>
>> The two I have are:
>>
>> Bus 001 Device 005: ID 2040:c000 Hauppauge Windham
>> Bus 001 Device 004: ID 2040:7070 Hauppauge Nova-T Stick 3
>>
>> cheers
>> Worik
> 
> You will need to look in /var/log/dmesg for the hardware that
> registers on each /dev/dvb device.  Or use the "adapter_nr=" option on
> the drivers to lock the hardware to an adapter number, or use udev to
> do the same.
> 
> Try "grep frontend /var/log/dmesg".
> 
> You also seem to have far too few multirec tuners - my recordings
> often use at least three on each of the first two of my DVB-T tuners.
> The maximum setting is five - I think you should increase yours to at
> least three each, and it does not hurt to set it to five unless you
> would run out of ability for your disks to cope with that many
> recordings at once.
> 
> _______________________________________________
> mythtvnz mailing list
> mythtvnz at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
> 


-- 
Why is the legal status of chardonnay different to that of cannabis?
       worik.stanton at gmail.com 021-1680650, (03) 4821804
                          Aotearoa (New Zealand)
                             I voted for love



More information about the mythtvnz mailing list