This is a Guide to installing MythTV on Debian/Unstable not using Knoppmyth or anything like that, its based on my preferred installation of MythTV on my hardware and could be used as a guide. I've written down all the steps I've taken to get my box going from start to end.
I'm in Australia, so all the settings are based around whats available and works here.
Filesystem Size Used Avail Use% Mounted on /dev/hda1 12G 4.4G 6.6G 40% / tmpfs 126M 4.0K 126M 1% /dev/shm /dev/hdc1 187G 179G 7.6G 96% /mnt/store /dev/hdd1 233G 186G 48G 80% /mnt/media tmpfs 10M 2.8M 7.3M 28% /dev
I used a Debian Net-Inst CD to install a Basic Copy of Debian.
deb http://apt.cerkinfo.be/ unstable main contrib non-free
sudo vim less gnupg xserver-xorg xfonts-base xfonts-100dpi xfonts-75dpi xfonts-scalable ssh rsh-server dvbstream dvbtune dvb-utils qt3-dev-tools libqt3-mt-dev libqt3-compat-headers libgnome-dev libqt3-i18n imlib1 esound-clients orbit libc6-dev tk8.3 libncurses5-dev alsa-base alsa-utils alsa-oss udev g++ lib64stdc++6 libmp3lame-dev libmp3lame0 xmltv libasound2-dev libdvdnav-dev libdvdnav kdelibs4-dev libcdaudio0-dev libcdparanoia0-dev libflac-dev flac libid3tag0-dev ratpoison cvs make sharutils wireless-tools
An "lspci" shows you our two DVB tuners:
0000:00:09.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11) 0000:00:09.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11) 0000:00:0a.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11) 0000:00:0a.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
Our "lsmod | grep dvb" shows:
dvb_bt8xx 12932 0 nxt6000 8132 1 dvb_bt8xx mt352 6980 1 dvb_bt8xx sp887x 8324 1 dvb_bt8xx dst_ca 17280 1 dvb_bt8xx dst 19844 2 dvb_bt8xx,dst_ca dvb_core 84904 2 dvb_bt8xx,dst_ca cx24110 8580 1 dvb_bt8xx or51211 10116 1 dvb_bt8xx bt878 10552 2 dvb_bt8xx,dst bttv 156944 2 dvb_bt8xx,bt878 firmware_class 10432 4 dvb_bt8xx,sp887x,or51211,bttv i2c_core 21904 12 dvb_bt8xx,nxt6000,mt352,sp887x,dst,cx24110,or51211,i2c_viapro,tuner,bttv,i2c_algo_bit,tveeprom
I suggest you visit http://gentoo-wiki.com/HOWTO_Xorg_HDTV for a good guide
DVB Utils has a few frequencies for Sydney/Australia. I'm on the Central Coast so I had to make my own.
The most popular one would no doubt be au-sydney_north_shore, you can find it, and others in the directory: /usr/share/doc/dvb-utils/examples/scan/dvb-t
Now that we have our frequencies we can scan to make a channels.conf file:
mkdir ~/.tzap ./scan /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-sydney_north_shore > ~/.tzap/channels.conf
If all goes well it should scan the frequencies in the input file, and output dvb streams to the channels.conf file
Have a look at the channels.conf file, it should look something like this:
$ head ~/.tzap/channels.conf 7 Digital 1:760500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:514:1313 7 Digital 2:760500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:514:1314
We output to ~/.tzap because tzap is the program we will use to LOCK and test our frequency.
Now try to lock to a channel, the secret keyword is FE_LOCK, if you see this it means you can get a stream!
tzap "7 Digital 1"
If you got a lock, you can use dvbstream to save the output somewhere and use mplayer to view it, this is beyond the scope of this document, as if u get a lock it means u got a stream and proper data.
I don't recommend this part, I always have had problems from installing myth using binaries, I recommend you compile! So skip this section...
$ vi /etc/apt/sources #and add the following line deb http://dijkstra.csh.rit.edu/~mdz/debian unstable mythtv deb http://apt.cerkinfo.be/ unstable main contrib non-free $ apt-get update $ apt-get install mythtv
I prefer this method myself
$ cd /usr/src && mkdir mythtv && cd mythtv $ svn co http://svn.mythtv.org/svn/branches/release-0-18-fixes/mythtv $ apt-get install qt3-dev-tools libqt3-mt-dev libqt3-compat-headers libgnome-dev libqt3-i18n\ > imlib1 esound-clients orbit libc6-dev tk8.3 libncurses5-dev alsa-base alsa-utils alsa-oss udev\ > g++ lib64stdc++6 libmp3lame-dev libmp3lame0 xmltv libasound2-dev libdvdnav-dev libdvdnav > kdelibs4-dev libcdaudio0-dev libcdparanoia0-dev libflac-dev flac libid3tag0-dev $ ./configure --enable-dvb --dvb-path=/usr/src/linux-headers-2.6.12-1/include --prefix=/usr $ qmake mythtv.pro $ make && make install
In order to mythtv to work we need to create a user and 'mythconverg' database.
$ su - $ mysql $ mysql> GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@'localhost' -> IDENTIFIED BY 'mythtv' WITH GRANT OPTION;
Add a mythtv user if one dosn't exist, and create a database for mythtv
$ mysql -u mythtv -p $ create database mythconverg;
Get the latest version from http://immir.com/tv_grab_au
This is a perl script, debian dosn't have all the perl packages required by this script, so you need to fetch some packages via cpam, which is not that difficult.
I don't remember what packages exactly so you'll have to have a play
Ok, I'm not going to run thru the main details here, basically just the most simple things.
$ mythtv-setup
As this is the first time running mythtv-setup, delete your card settings and your channel configs
If you get something about "Error tuning to transport", you have to add your transports manually. So go to advanced/new transport, and using your channels.conf and this awk script this will help you figure out what to add:
$ cat ~/.tzap/channels.conf | awk -F: '{ printf("%s:%s:%s:%s:%s:%s:%s:%s:%s\n", $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) }' | sort | uniq > ~/.tzap/channels.conf.uniq
$ cat channels.conf.uniq | awk -F: '{ printf("Frequency: %s\nBandwidth: %s\nInversion: %s\nConstellation: %s\nLP Coderate: %s\nHP Coderate: %s\nTrans. Mode: %s\nGuard Interval: %s\nHeirarchy: %s\n\n", $1, $3, $2, $6, $4, $5, $7, $8, $9); } ' | less
That should give u a neat listing of data to enter, once you done that hit 'Scan for channels' and choose Scan Type 'Full Scan of Existing Transports', hit Next a few times and it will begin scanning. This time you should get some action!
Ratpoison is a great window manager, especially so for this purpose. Its based on the idea of an emacs editor (secretly I always wanted a vi-like based window manager).
So you control the window manager via key commands, rather than the mouse.
$ apt-get install ratpoison
That's it! I have a ~/.ratpoisonrc file that looks like so:
$ cat ~/.ratpoisonrc escape C-t alias xterm exec xterm -bg black bash unbind c bind c xterm exec mythfrontend
What the above does is start mythfrontend whenever we login to x, cool hey
$ apt-get install cvs make sharutils wireless-tools $ cd /usr/src $ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi $ cd madwifi $ make && make install
For some reason my modules always get install to /lib/modules/2.6.12 instead of 2.6.12-1-k7, so we need to link them to fix it (not shown here)
$ make install $ modprobe ath_pci; modprobe ath_hal $ dmesg | tail # check to see if it worked!
Edit the /etc/network/interfaces and configure ath0
$ ifup ath0
To change the default blue background to black try this:
xvattr -a XV_COLORKEY -v 0
To turn off screen blanking try this
xset -dpms s off
Get an error tuning to transport?
Following is a list of all the frequencies I've found in NSW, Australia. They are all 7Mhz.. So if you get an error like 'Error tuning to transport', add these frequencies (i.e. add new transports using advanced option in scanner) on the 7Mhz bandwidth and then do a scan of existing transports
177500000 191625000 219500000 226500000 571500000 578500000 585500000 585625000 592500000 599500000 690500000 704500000 725500000 746500000 760500000 767500000 788625000 809500000