Difference between revisions of "User:Harald"

From MythTV Official Wiki
Jump to: navigation, search
Line 32: Line 32:
 
I use Grimstad cabeltv. I did not find any channel information file I could use. But I find one for Norway no-Oslo-CanalDigital which I first take a copy of and then edited it. I got the correct Frequency setting, Symbol Rate and QAM Mode from the menu the cable box Grimstad cabeltv delivered me.     
 
I use Grimstad cabeltv. I did not find any channel information file I could use. But I find one for Norway no-Oslo-CanalDigital which I first take a copy of and then edited it. I got the correct Frequency setting, Symbol Rate and QAM Mode from the menu the cable box Grimstad cabeltv delivered me.     
  
  [mythtv@mythpc ~]$ cat no-oslo-UPC
+
  [mythtv@mythpc ~]$ cat no-Grimstad-CanalDigital
  # no-oslo-UPC (cable)
+
  # no-Grimstad-CanalDigital (cable)
 
  # Frequency, Symbol Rate, QAM Mode
 
  # Frequency, Symbol Rate, QAM Mode
 
  C 410000000 6875000 NONE QAM64
 
  C 410000000 6875000 NONE QAM64
Line 47: Line 47:
 
  C 498000000 6875000 NONE QAM64   
 
  C 498000000 6875000 NONE QAM64   
  
After I have edited the file no-oslo-UPC I did a scan.  
+
After I have edited the channel information file I did a scan.  
  
   $ /usr/bin/dvbscan /home/mythtv/no-oslo-UPC
+
   $ /usr/bin/dvbscan /home/mythtv/no-Grimstad-CanalDigital
  
 
This should produce output saying "WARNING: >>> tuning failed!!!" if a signal was not found on that particular frequency.  Eventually, a list of services found should be displayed.  Here is a sample list:
 
This should produce output saying "WARNING: >>> tuning failed!!!" if a signal was not found on that particular frequency.  Eventually, a list of services found should be displayed.  Here is a sample list:

Revision as of 13:56, 29 May 2007

My system is a Mythtv pc installed with Fedora Core 6 following this howto [1]. I use the Technotrend Premium DVB-C 2300 Hybrid dvb-c card[2] bought from Dvb shop in Germany [3]. The video4linux Wiki have a list of supported dvb hardware [4]. This Wiki is a howto for Norwegian dvb-c broadcasting (cable), but some part are general for DVB broadcasting with satelite or terrestial. I use my dvb-c card only for viewing the unencrypted tv channels. Grimstad cabeltv use Chinacrypt as the encryption method and I have not found any place yet where I can buy a Chinacrypt CAM module for viewing encrypted tv-channels (for this to work I must also have a paycard for the channels I want to see). I have used Mythtv with analog tuner card (PVR-350) some time now, but after I moved to dvb-c card the quality from the tv broadcast is much better.

This Wiki is for Mythtv 0.20


DVB-C Installation [5]

The Linux 2.6 kernel had already support for Technotrend Premium DVB-C 2300 so the card was autodetected after first time boot. The firmware for the card was not in place so you must download the correct dvb-ttpci-01.fw-2622 (or newer) firmware file from this place [6]. Place this file in the hotplug directory. On Fedora 6 this was /lib/firmware and then rename the downloaded file to dvb-ttpci-01.fw. Change the permission on the file. After a reboot you should get some file in /dev/dvb/adapter0/

# cd /lib/firmware
# wget http://www.linuxtv.org/downloads/firmware/dvb-ttpci-01.fw-2622
# mv dvb-ttpci-01.fw-2622 dvb-ttpci-01.fw
# chmod 755 dvb-ttpci-01.fw

Scanning for channels [7]

Using Fedora, assume root privileges then install the dvb utilities with

  # yum install dvb-apps

The program dvbscan will need some idea of where to start searching; for this reasons it takes a file for your location as a starting point. Therefore, you need to find channel information for your locality. Again, the location where they are installed may vary. For Fedora Core 6 the directory for DVB-S users (Satelite) should use the location files under /usr/share/dvb-apps/dvb-s/. DVB-C location files (Cabel Broadcast) are placed under the directory /usr/share/dvb-apps/dvb-c and Terrestial broadcast under the directory /usr/share/dvb-apps/dvb-t. In each case, the name of the file you're looking for is of the form cc-Ttttt, where cc is a two-letter country abbreviation, and Ttttt is the name of the location of the transmitter. So in Oslo, Norway, you'd look for a file called no-Oslo; the following example relates to the company CanalDigital in Norway.

[mythtv@mythfront2 dvb-c]$ pwd
/usr/share/dvb-apps/dvb-c
[mythtv@mythfront2 dvb-c]$ ls
at-Innsbruck   at-Vienna         ch-Video2000         de-iesy      fi-3ktv  fi-Joensuu-Tikka  lu-Ettelbruck-ACE
at-Liwest      be-IN.DI-Integan  ch-Zuerich-cablecom  de-Muenchen  fi-HTV   fi-TTV            no-Oslo-CanalDigital
at-SalzburgAG  ch-unknown        de-Berlin            de-neftv     fi-jkl   fi-vaasa-oncable  se-comhem
[mythtv@mythfront2 dvb-c]$ 

I use Grimstad cabeltv. I did not find any channel information file I could use. But I find one for Norway no-Oslo-CanalDigital which I first take a copy of and then edited it. I got the correct Frequency setting, Symbol Rate and QAM Mode from the menu the cable box Grimstad cabeltv delivered me.

[mythtv@mythpc ~]$ cat no-Grimstad-CanalDigital
# no-Grimstad-CanalDigital (cable)
# Frequency, Symbol Rate, QAM Mode
C 410000000 6875000 NONE QAM64
C 418000000 6875000 NONE QAM64
C 426000000 6875000 NONE QAM64
C 442000000 6875000 NONE QAM64
C 450000000 6875000 NONE QAM64
C 458000000 6875000 NONE QAM64
C 466000000 6875000 NONE QAM64
C 474000000 6875000 NONE QAM64
C 482000000 6875000 NONE QAM64
C 490000000 6875000 NONE QAM64
C 498000000 6875000 NONE QAM64  

After I have edited the channel information file I did a scan.

 $ /usr/bin/dvbscan /home/mythtv/no-Grimstad-CanalDigital

This should produce output saying "WARNING: >>> tuning failed!!!" if a signal was not found on that particular frequency. Eventually, a list of services found should be displayed. Here is a sample list:

dumping lists (7 services)
NRK mP3:410000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:0:706:1515
NRK Stortinget:410000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:0:705:1514
NRK Sami Radio:410000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:0:49:1510
NRK2:410000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:525:47:1502
NRK Klassisk:410000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:0:703:1507
NRK P3:410000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:0:702:1505
NRK P2:410000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:0:701:1504
NRK P1:410000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:0:35:1503
NRK1 sorlandet:410000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:512:640:3507
ZTV Norway:410000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:2161:2162:2160
TV3 Norge:410000000:INVERSION_AUTO:6875000:FEC_NONE:QAM_64:1111:1112:1110

This is a list with both radio and tv channels. You have both encrypted and unencrypted channels her also.

Saving to channels.conf

Next try to create a "channels.conf", a file in a hidden (dotted) directory off your "home" directory. I make a directory called .czap because I shall use czap to tune in the channels. Czap is only for cable broadcasting, then you have tzap for terrestial and then szap for satelite.

 $ mkdir ~/.czap
 $ /usr/bin/dvbscan /home/mythtv/no-oslo-UPC > ~/.czap/channels.conf

Next display the contents of the channels.conf file to make sure the file creation proceeded correctly

 $ cat ~/.czap/channels.conf

Verifing channel tuning

Then you can try to tune in one of the channels:

 $ /usr/bin/czap  -r -c ~/.czap/channels.conf "ZTV Norway"

which in turn displays lines similar to (terminate with Ctrl-C)

 using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
 tuning to 177028615 Hz
 status 1f | signal 0000 | snr ff28 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
 ... (repeated output) ...

Adding channels to database

Importing channels.conf

MythTV 0.20 can import the channels.conf made above into the database. (NB! The importing of channels.conf file was broken after Mythtv 0.20 rev. 11682. This has been fixed 20.04.2007 [8]) You must stop the mythbackend service before you start up mythtv-setup

# /sbin/service mythbackend stop
$ mythtv-setup 

In the Mythtv-setup menu choose:

2. Capture Card

Mythtvsetup-dvbsetup.jpg

Then you must choose which Card Type you have. I choose the "DVB DTV capture card (v 3.x)" profile. The rest of the DVB configuration was automatically done when I used this profile.

After the Capture Card configuration has been done enter the Finish button. In the Mythtv-setup menu choose:

3. Video Sources

Video-source setup.jpg

Here you must enter the Video source name. I called the Video source "Kabeltv". Then you must choose which country you live in. If you have choosen the correct channel frequency table in Mythtv-setup Menu --> General then you can choose Default here. If not you must specify Europa-West. When you enter the Finish button a new terminal window will start up in the background. You can use the Alt-F2 or Alt-F3 button on the keyboard then you can get the terminalwindow in the front. Say No to the question about configuring Xmltv. I used mythweb to edit the xmltv id for every channels imported. This is a different and a more manually approach of importing xmltv id into the Mythtv database.

After the Video Sources configuration has been done go back to Mythtv-setup and choose:

4. Input Connections

Import channels.jpg

Here you must choose the DVB input connection. In the next window you must choose the video source "Kabeltv". In the same place you can choose to Scan for DVB channels using the channels.conf file we have made above. After the import have been done you should have all the radio and tv channels on your cable imported into the Mythtv database. You must edit this data to be useful for Mythtv. You can use Mythtv-setup Channel Editor or Mythweb to do this. I used Mythweb.

Editing channels in Mythweb

Not all data will be imported from the channels.conf so you must edit with mythweb the channels after this has been done. You must put in the correct multipex id into every channel imported. First we must find the multiplex frequency the channel use:

$ grep "ZTV Norway" ~/.czap/channels.conf | cut -f2 -d:

After you have this number copy it and paste it into to Multiplex frequency table in Mythweb. For saving this into the Mythweb database choose Save in the bottom of the webpage. In the same place in Mythweb you can delete channels, paste the channel's xmltv id, reorder the channels...

Importing EPG data with XMLTV

Here in Norway we use the xmltv grabber tv_grab_no. Before mythfilldatabase can import in the programguidedata (EPG) we must first insert the correct xmltvid for every tv channel into the Mythtv database. This can be done with mythweb. We must first let tv_grab_no make a xml file for us to use. The first time tv_grab_no start up you must make a config file. The perl script tv_grab_no will ask you about which tv channels who want to have the epg data for.

$ tv_grab_no --configure 

Then you must run tv_grab_no and get EPG data for one day. This .xml file will give you the xmltv id you are going to insert into the database

$ tv_grab_no --output /home/mythtv/epg.xml --days 1
$ cat /home/mythtv/epg.xml

Importing EPG with tv_grab_dvb

One of the DVB-C channels was for EPG data. Mark Bryars have developed a program which dump the dvb epg info into a xmltv format[9]. Download the source from his website. Unpack the tv_grab_dvb.tar.gz file. You don't have to compile the source (i never did). Tune first into a mulitplex:

$ /usr/bin/czap  -r -c ~/.czap/channels.conf "ZTV Norway"

then you start opp the tv_grab_dvb program and dump the epg data into the .xml file:

$ tv_grab_dvb > whatson.xml

Then you can import the the epg data into Mythtv. Before you do this the xmltv id must be edited into every channel (more to come here)

$ tv_grab_dvb|mythfilldatabase --no-delete --file 1 0 -

Reference

Howto install DVB [10]
First step with a DVB device [11]
Adding Digital Cable Channels for ATSC/QAM Tuner Cards -- USA/Canada[12]