LinHES Forums
http://forum.linhes.org/

what file holds the scanned channel information?
http://forum.linhes.org/viewtopic.php?f=17&t=19802
Page 1 of 1

Author:  neutron68 [ Sat Apr 18, 2009 6:42 pm ]
Post subject:  what file holds the scanned channel information?

When you do a channel scan with the Mythtv GUI (in Mythtv setup), where does the scanned channel information go? Which file?

Eric

Author:  marc.aronson [ Sat Apr 18, 2009 7:09 pm ]
Post subject: 

It is stored in tables in the database -- "channel" and "dtv_multiplex". I know that dtv_multiplex is used for QAM tuners and that it is not used for analog or firewire tuners. I don't know if it is used for any other tuning scenarios, such as ATSC.

Author:  neutron68 [ Sat Apr 18, 2009 10:41 pm ]
Post subject:  how to view?

OK. That explains why I didn't find any obvious files on the computer called "channel" or "channels".

The reason for the question - a friend was asking me how to view the list of scanned channels. He has an HD-5500 card. Since it is in the database rather than a simple text file, is there still a way to view it?

Eric

Author:  marc.aronson [ Sat Apr 18, 2009 11:34 pm ]
Post subject: 

You can use webminto look from your browser. If you go this route look under servers->MySQL->mythconverg

Alternatively, from a shell window you can enter

Code:
mysql -uroot mythconverg -B --exec "select * from channel;"


This will dump a lot of info because there are a lot of column in that table. An interesting subset of columns:

Code:
 mysql -uroot mythconverg -B --exec "select channum,callsign,xmltvid from channel;"

Author:  neutron68 [ Sun Apr 19, 2009 2:41 pm ]
Post subject:  that will probably do the trick

Thanks for your responses, Marc. They have been a springboard!

I looked at the mythconverg database field names using Webmin and picked out the fields I think my friend wants to see.

I think this command line will produce a text file with his desired information.
Code:
mysql -uroot mythconverg -B --exec "select channum,callsign,freqid,atsc_major_chan,atsc_minor_chan from channel;" > /home/user/scannedchannels.txt

Code:
channum   callsign   freqid   atsc_major_chan   atsc_minor_chan
2.4   tpt Wx   16   2   4
2.9   data2   16   2   9
29.1   WFTC-HD   21   29   1
29.2   WFTC-SD   21   29   2
9.1   KMSP-HD   26   9   1
9.2   KMSP-SD   26   9   2
4.1   WCCO-DT   32   4   1
2.1   tpt 2   34   2   1
2.2   tpt MN   34   2   2
11.1   KARE-HD   35   11   1
11.2   KARE-WX   35   11   2
41.1   ION   40   41   1
41.2   qubo   40   41   2
41.3   IONLife   40   41   3
41.4   Worship   40   41   4
45.1   KSTCDT1   44   45   1
5.1   KSTPDT1   50   5   1
5.2   KSTPDT2   50   5   2
2.3   tptLife   16   2   3
23.1   WUCW-HD   22   23   1
23.2   WUCW-SD   22   23   2

:D

Author:  marc.aronson [ Sun Apr 19, 2009 7:11 pm ]
Post subject: 

Glad to help out. What is your friend wanting to do with that information and what type of channels is your friend tuning? (ie, ATSC, clear QAM, analog, etc.) I ask because there are some other tables that sometimes come into play that may or may not be relevant, depending on the objective. As an example, the column "mplexid" is an index into dtv_multiple, which contains additional info. It is used for QAM tuning; not certain about ATSC, but I suspect so; never used for analog or firewire tuning. If I have a bit more context, I may be able to provide a few more points.

I've been playing with the channel tables quite a bit lately as I've been developing some scripts that semi-automate the process of setting up clear-QAM channels using data from Silicon Dust, Schedules direct and the mythtv database.

Author:  neutron68 [ Sun Apr 19, 2009 8:56 pm ]
Post subject:  keeping track of channel lineup changes

My friend said he wanted to keep track of the QAM cable channel lineup on his cable system over time. He said the lineup keeps changing.
I think the channel frequency and channel id number will probably be most useful.

My thought is that text files of the channel lineup will be the easiest to store and compare over time.

I've never tuned in QAM channels on cable with my HD-3000 and HD-5500 tuner cards, so I don't know what other data might be helpful for the channel list. Are there sub-channels like there are with over-the-air DTV (example, channel 2.1, 2.2, 2.3, etc)?

Eric

Author:  marc.aronson [ Sun Apr 19, 2009 9:53 pm ]
Post subject: 

Try this query
Code:
select t1.chanid, t1.channum, t1.xmltvid, t1.callsign, t1.serviceid, t2.frequency, t1.name from channel t1, dtv_multiplex t2 where t1.sourceid=t2.sourceid and t1.mplexid=t2.mplexid;


I actually have a script that I am developing that helps with this type of problem. I have it tied to a cronjob the runs daily. It merges the data published by Silicon Dust with the data in the mythtv database, diffs that against what the data looked like the previous day and sends me an email message if anything has changed. This script is pretty bound up in my environment right now, so it isn't easy for me to make it available for others just yet, but if your interested, I'll work on making the changes so I that can give you a copy.

Also, if your friend isn't aware of the Silicon Dust QAM tuning data, he should check it out. It is very helpful and can be found at http://www.silicondust.com/hdhomerun/channels

In terms of your question -- the channel number that is exposed to the end-user is a simple number between 2 and 999. If you go down a layer, each "channel" has enough bandwidth to carry many sub-channels. I don't recall the exact numbers, but you can fit at least 2 hidef transmissions or 14-15 standard def transmission in one channel. The "serviceid" in the query above identifies the subchannel on the "frequency" that being used.

Author:  cecil [ Mon May 04, 2009 1:16 am ]
Post subject: 

Why not use webmin to view the data?

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/