[mythtv-users] hdhomerun scan versus ATSC channel 76

R. G. Newbury newbury at mandamus.org
Mon Sep 24 23:17:30 UTC 2007

Adam Felson wrote:
> On Sep 21, 2007, 5:31 AM briandlong at gmail wrote:
>> I'm running MythTV from atrpms-bleeding (SVN from beginning of
>> September) and when I scan Cable QAM256 or QAM64, it scans channel 77
>> just fine (and finds MyRDC). I've just gotten my HDHR this week and
>> I'm running the latest firmware as well.
>> Not much help; just another data point.
> Yet more information:
> The frequency for channel 76 is actually 537000khz.  Myth isn't skipping it, 
> it just isn't seeing the two hidef stations on 76.  It isn't that they're 
> seen as encrypted -- I've had mythtv scan everything including encrypted and 
> it still misses it.
> I tried doing the channel scan on myth-20-2 as well as svn versions 12618 
> (2007-01-22) and 13949 (7/16/2007).  It was around july when I had done the 
> setup the first time around so unless the hdhomerun firmware or the cable 
> company is to fault, mythtv should have found the stations.  I'm betting the 
> cable company is the problem.  However, HDHR can tune the stations as I've 
> seen them on windows vlc.
> I discovered a branch in svn called mythtv-channel-scan that looks promising. 
> It's scanning is far more robust, but it unfortunately is an unfinished work 
> and merely leaves a bunch of incompatible data in some parallel tables.  
> I hopeing that I can figure out how mythtv uses the channel and dtv_multiplex 
> tables to store hidef channels.  I ran mythtv-setup with '-v database' and it 
> looks like it is the serviceid column of the channel table that determines 
> which hidef channel gets tuned.  I haven't quite figured out what the 
> dtv_multiplex table does.  I've seen examples where several hdtv stations on 
> the same frequency will all have the same mplexid.
> _______________________________________________

It doesn't look like anyone else has jumped in here, so I will.

The dtv_multiplex table contains a bunch of information about a 
particular frequency and transmission methodology. For North America the 
important fields are the frequency,modulation,sistandard and sourceid. 
The modulation would be qam256 for cable, or 8vsb and the sistandard 
would be atsc. These do not apply for analog channels. Myth may default 
the sistandard to 'dvb' which fails generally for atsc setups. Note that 
the sourceid matches things up with your SchedulesDirect listing sources.

There are a number of fields which are specific to satellite or 
equivalent transmissions methods.

The channel table contains the information needed to tune a particular 
channel, using the tuning methodology defined by 'tvformat' and whatever 
other information is pulled from dtv_multiplex through indexing on the 
'mplexid' field. The serviceid field is the stream's PID value. This 
table appears to contain redundant information, but I actually doubt 
that. But I am not sure of what some of the field really represent.

Chanid is unique for each 'channel' where in this case, 'channel' really 
means a particular (digital) stream. Channum is actually arbitrary: use 
what you want. If atsc_major_chan and atsc_minor_chan are zero, myth 
will sort on this column for display purposes. The atsc_major_chan and 
atsc_minor_chan fields are  not what you would expect. These are the 
frequency, expressed in NTSC cable/OTA frequency channel numbers, plus 
the decimal channel description of the stream, which the scan has 
determined from the stream. They are NOT the actual frequency, nor the 
actual serviceid. Channum is always used in the EPG to describe the 

So you can have a digital channel transmitted on frequency channel 14 
(OTA) which is mplexid= '1', calling itself 29.1 and appearing in major 
& minor as 29 and 1 while it is actually a frequency of 473MHz and the 
PID (serviceid) is 4.

Doing scans on cable are confusing because the scan can only report the 
frequency and serviceid of trhe streams it finds. Then we have to parse 
out what 'station' we are watching and attach the cableco's arbitrary 
"channel" number (902 or whatever) to that stream. If your 
SchedulesDirect lineups are correct, once you have the actual callsign 
(as SD knows it) figured out, you can use the channel editor to Probe 
and it should fill in the xmltvid...which how SD knows which 'channel' 
listing to attach to that stream. Note that you can attach a different 
xmltvid number if you need to, such as where there is no listing for a 
digital simulcast of an analog station. This is common where stations 
are still testing their digital broadcasts.

Hope this helped. There is a page in the wiki 'Adding Digital Channels 
US/Canada' or something like that, which explains how to do direct scans 
with HD5000 type cards. Those techniques are usable with the HDHomeRun 
to tune the box to a particular stream, to determine the values to be 
poked into the dtv_multiplex and channel tables.

But you should not need to do that...something is likely wrong with your 
cable feed, or the data in the tables has been corrupted so that that 
particular tuning setup is wrong.


More information about the mythtv-users mailing list