[mythtv-users] Jason Beck's QAM guide Now on the Wiki

Jason Beck jasonbeck777 at yahoo.com
Fri Feb 3 22:35:57 UTC 2006


Dwalton,

The dtv_multiplex table is not used by your pvr-x
cards.

Below is a new write up on this along with how to
manually create an accurate channels.conf file.  Let
me know how it goes...

To be able to successfully tune a HDTV qam channel
within mythtv you will need to know the following and
enter them into the mythconverg database in the
correct areas.

Frequency, serviceid, mplexid and xmltvid.

The xmltvid is the easiest one since it is provided by
Zap2it.  The frequency and mplexid is provided by
doing the cable type scan from within mythtvsetup. 
The serviceid is the hard one.  

Serviceid you will have to discover manually through
trial and error.  I'll try to give an some
instructions on how to come up with an accurate
channels.conf which should give you enough 

information to get this working.


1.) go to zap2it and build your listing for your local
HD broadcast channels.

2.) assign that listing to your dvb card in
mythtvsetup

3.) go into the channel editor (still in mythtvsetup)
select your new listing and do a scan (select type
"cable")

The scan will take some time.  Mostly likely you won't
really get anything useful, but what this will do it
populate the dtv_multiplex table in your db.  You will
need this later on.

4.) exit mythtvsetup and run mythfilldatabase.

At this point you still will not be able to tune
anything yet so don't try.

5.) ***Important***  stop mythbackend.

6.) Creating a channel.conf for testing

	Login to your mythconverg database.

	$ mysql -u root mythconverg -p

	Next you want to get the list of freqencies seen from
the scan.

	mysql> select frequency from dtv_multiplex;

	+-----------+
	| frequency |
	+-----------+
	| 627000000 |
	| 531000000 |
	| 555000000 |
	| 561000000 |
	| 567000000 |
	| 579000000 |
	| 585000000 |
	| 591000000 |
	| 597000000 |
	| 603000000 |
	| 621000000 |
	| 627000000 |
	| 633000000 |
	| 639000000 |
	| 645000000 |
	| 651000000 |
	| 657000000 |
	| 663000000 |
	| 669000000 |
	| 675000000 |
	| 681000000 |
	| 687000000 |
	| 693000000 |
	| 699000000 |
	| 705000000 |
	| 711000000 |
	| 717000000 |
	| 723000000 |
	| 729000000 |
	| 735000000 |
	| 741000000 |
	+-----------+
	31 rows in set (0.02 sec)

	You should get something like the above output.  Now
what you need to do is make a vanilla channels.conf. 
What you need to do is just create a text file with
the following format.
	
	channame:frequency:QAM_256:0:0

	Leave the video and audio pids set to zero.  So you
would have something like the below.

	TEST1:627000000:QAM_256:0:0
	TEST2:531000000:QAM_256:0:0
	TEST3:555000000:QAM_256:0:0

	Continue till you have an entry for all of you
frequencies.  So In this example I would have 31
entries. Put the file on your backend so azap can read
it.

7.) go ahead and fire up azap and tune a channel.
	$ azap -r TEST1

8.) in a second terminial run dvbscan -c
	$ dvbscan -c

What you need is the serviceid.  This is the number in
the [000#] at the far left.  Your provider will most
likely be using the same frequency for multiple
channels.  So you may have more then 

one service per freq.  In this example your serviceid
for TEST1 would be 2.

Example:
dumping lists (1 services)
[0002]                   (0x0002) 00: PCR == V   V
0x0010 A 0x0011 (eng)

Now here what I would recommend is that you get a pen
and paper.  Write down the frequency, all of the
serviceids with thier assocated vid and aids. In the
above the vid is 10 (V 0x0010) and the 

aid is 11 (A 0x0011)

Lets now try to tune a channel.  Leave the azap tune
running.  You can use mplayer to tune using the vid
and aid.  So from the info you just gained.

	$ mplayer -vo xv -vid 10 -aid 11

If this is an unencrypted channel you should get
picture and sound.  Do this for all the serviceids for
that frequency.  You only need the vids and aids for
testings.  If you discover a channel 

that you what I'd suggest you write down on your paper
the channels.conf entry for it.  Lets say you found
FOXHD in the above example.  Write down

	FOXHD:627000000:QAM_256:10:11:2

Repeat the above steps until you find all the channels
that you can tune and want.  Then complie you
channels.conf accordingly.  In myth .19 you will be
able import this file, but for now I'll 

explain how to get this info into mythconverg
manually.


9.) So now you have the frequency and serviceid, now
we need to get the mplexid.  This is easy.

	Login to your mythconverg database.

	$ mysql -u root mythconverg -p

	mysql> select mplexid from dtv_multiplex where
frequency = '627000000';

	+---------+
	| mplexid |
	+---------+
	|       1 |
	+---------+
	1 rows in set (0.04 sec)

Write down the mplexid value.  For example sake we
will say it was 1.

10.) Now you are ready to setup the channel.  You have
the freqency (627000000),mplexid(1),and the
serviceid(2).  Zap2it now has under the "Local
Broadcast" lineups the HD channels.  These 

channels end in -DT and usually have channel numbers
like 15_2.  So when you ran the mythfilldatabase
previously you should now have a 15_2 channel now. You
are going to want to change the 

channel number to something more fimilar.  So pick
some channel numbers that are not in use by you
mythbox.  But pay attention to which channel is what. 
You should be able to tell from the 

listing what each channel is.  This will ensure that
your xmltvid is mapped to the correct channel.

So for expamle let stay FOXHD came from zap2it as
15_2.  In my area my cable carrier is not using
channels in the 400s so I just used those. 

	Login to your mythconverg database.

	$ mysql -u root mythconverg -p

	mysql> update channel set channum="406" where
channum=15_2;
	mysql> update channel set freqid="627000000" where
channum=406;
	mysql> update channel set mplexid="1" where
channum=406;
	mysql> update channel set serviceid="2" where
channum=406;

You may want to do a quick check to make sure all
looks good.

	mysql> select * from channel where channum=406;
	mysql> quit

11.) Start mythbackend

12.) Start up the frontend and test.

13.) Once you have identified and mapped all of you
channels use mythweb to delete the leftover channels
you don't what or did not work from the original scan.



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the mythtv-users mailing list