[mythtvnz] Diagnosing recording wrong channel

David Moore dmoo1790 at ihug.co.nz
Thu Jun 21 03:06:04 BST 2012


On 21/06/12 13:04, Worik Stanton wrote:
> On 20/06/12 21:31, Stephen Worthington wrote:
>> On Wed, 20 Jun 2012 15:05:37 +1200, you wrote:
>>
>>> I have had a few instances of programmes being recorded from the wrong
>>> channel. The correct time but, obviously, the wrong programme! I need
>>> some help diagnosing the cause.
>>>
> [snip]
>> You might like to try this SQL query to see what the tuning data being
>> used for channel 3 is:
>>
>> #!/bin/bash
>> # Lookup the DVB tuning data for a given channel number.
>> source /etc/mythtv/mysql.txt
>> mysql -r -t -u $DBUserName -p$DBPassword -h $DBHostName $DBName<< EOF
>>
>> select
>> channum,chanid,dtv_multiplex.mplexid,dtv_multiplex.sourceid,transportid,networkid,frequency
>>
>> from channel,dtv_multiplex where channel.channum=3 and
>> dtv_multiplex.mplexid=channel.mplexid;
>> EOF
>
> Running....
> select
> channum,chanid,dtv_multiplex.mplexid,dtv_multiplex.sourceid,transportid,networkid,frequency
>
> from channel,dtv_multiplex where dtv_multiplex.mplexid=channel.mplexid
> order by chanid;
>
> (To get data for all channels)
>
> I attached the output.
>
> Why are all networkid the same?
>
> Transportid seems to map directly to frequency. But channels share
> frequencies. Is that OK? Why?
>
> The sourceid is the tuner? I only have one (currently).
>
> What is the mplexid?
>
> cheers
> Worik
>

Serviceid is also crucial to selecting a particular program from an mpeg 
transport stream. It's stored in the channel table so add serviceid to 
the front of the sql query. Could be much grief with wrong or duplicated 
serviceids.

Bit odd that networkid is the same for all broadcasters. But my system 
is the same so I guess it is irrelevant.

Yes, channels share frequencies because each frequency (or carrier) 
carries multiple channels multiplexed into one bit stream. Once myth has 
the tuner set to the appropriate frequency it then needs to demux the 
appropriate channel (identified by serviceid) to record what you want.

Sourceid is the antenna. So if you have multiple antenna ports (cards) 
you would have multiple sourceids. I have a dual tuner card but only one 
antenna port and one sourceid.

Not certain but mplexid just seems to be a number linking the channel 
table to the dtv_multiplex table. Doubt whether it's actually used for 
tuning.

My guess is you need the correct mplexid and serviceid in the channels 
table and mplexid should point at the correct dtv_multiplex record for 
each channel. Any crossed wires here could lead to myth tuning to the 
wrong frequency or demuxing the wrong serviceid.

Have you tried live TV to see what channel you actually get for each 
channel number?



More information about the mythtvnz mailing list