MythTV on RH9

Installing MythTV Using onboard Video and ATI TV Wonder VE Card’, ‘

Installing MythTV Using onboard Video and ATI TV Wonder VE Card

/Install RH9
 - X Window System
 - KDE Destop Environment
 - SQL Database Server
   - Select MySQL under Database options
 - Web Server

After installing, it will ask to create a user account. Use mythtv and whatever password you 
would like.  All commands below are done as ROOT.  To become root, open a shell and type:

$ su -
password:
#

run gdmsetup to boot into mythtv account
# gdmsetup

Select mythtv as user account to auto log in as.

goto http://atrpms.physik.fu-berlin.de/dist/rh9/atrpms-kickstart/
download atrpms-kickstart-20-1.rh9.at.i386.rpm installer 

goto http://atrpms.physik.fu-berlin.de/dist/rh9/bttv/
Download atrpms version of bttv and bttv-kmdl-xxx(kernel version)

goto http://atrpms.physik.fu-berlin.de/dist/rh9/kernel/
Download atrpms version of same kernel version above and kernel-source

Example:
bttv-kmdl-2.4.20-28_36.rh9.at-0.9.12-32.rh9.at.athlon.rpm  
bttv-0.9.12-32.rh9.at.i386.rpm

So, download the kernel version 2.4.20-28_36

install kernel and kernel source
# cd /home/mythtv
# rpm -ivh kernel-2.4.20-28_36.rh9.at.athlon.rpm    
# rpm -ivh kernel-source-2.4.20-28_36.rh9.at.i386.rpm  

NOTE: Info about vi is listed at the bottom of this page!!!

edit grub.conf and change default=1 to default=0
# vi /boot/grub/grub.conf

Reboot

Install atrpms installer
# rpm -ivh /home/mythtv/atrpms-kickstart-20-1.rh9.at.i386.rpm

Run updates
# apt-get update && apt-get dist-upgrade

Go fix some food and drink(s)
Reboot

Turn off lm_sensors
# /sbin/chkconfig lm_sensors off

install bttv-kmdl and bttv 
# rpm -ivh /home/mythtv/bttv-kmdl-2.4.20-28_36.rh9.at-0.9.12-32.rh9.at.athlon.rpm  
# rpm -ivh /home/mythtv/bttv-0.9.12-32.rh9.at.i386.rpm  

edit /etc/modules.conf
# vi /etc/modules.conf

----------------------- COPY START -----------
# bttv stuff
alias char-major-81 videodev
alias char-major-81-0 bttv
options bttv radio=0 card=64 tuner=2
----------------------- COPY STOP --------------

# cx8800 stuff
alias char-major-81 videodev
alias char-major-81-0 cx8800
options cx8800 card=7

As of this writing, cx8800 didn\'t support audio, but the video looks great in xawtv!  

reboot
run xawtv to see if the bttv drivers are working good.  set settings and edit/save channel lineup so
it saves your settings.  Also, you may need to fine tune to see channels.  For some reason, I have to
fine tune all channels -20 except for channel 7 and 8 which are +10
# xawtv

You may need to fine tune your channels in by pressing the left and right arrow keys.

install alsa stuff:
# apt-get update
# export KERNEL=`uname -r`
# apt-get install alsa-kmdl-$KERNEL
# apt-get install alsa-driver alsa-utils
# apt-get install gnome-alsamixer

# vi /etc/modules.conf
DELETE THIS:
alias sound-slot-0 via82cxxx_audio
post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1 || :
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || :

INSERT THIS:
----------------------- COPY START ---------------
# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-via82xx
# module options should go here

# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0

# card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
-------------------------- COPY STOP -----------

# vi /home/mythtv/.asoundrc
INSERT THIS:
------------------------ COPY START --------------
pcm.via82xx {
type hw
card 0
}

ctl.via82xx {
type hw
card 0
}
---------------------- COPY STOP -------------

chown mythtv.mythtv /home/mythtv/.asoundrc 

Now, turn off the soundserver and screen saver
choose "Control Center" off the Red Hat menu. Navigate through "Sound & Multimedia" to "Sound System" 
and deselect "Start aRts soundserver on KDE startup" and then click "Apply".  At this time, you can 
choose to turn off the screen saver as well.

reboot

# /usr/bin/aplay /usr/share/sounds/KDE_Startup.wav

If you don\'t hear anything, go to "Sound & Video" and select Sound Mixer

Adjust volumes, muting the Line in and select "Save current settings as defualt"

Try again, you should hear sound now.

Now, to test asla for MythTV do:
# xawtv &
 and tune in a channel, then:
# /usr/bin/aplay /dev/dsp

You should hear the TV channel with a little lag.  Press Cntrl-C to exit.

# apt-get install mythtv-suite

turn on mysql server and start:
# /sbin/chkconfig mysqld on
# /sbin/service mysqld start

# mysql -u root < /usr/share/doc/mythtv-0.13/database/mc.sql

# mythtvsetup

General
- Put in REAL ip address
- /var/lib/mythtv
Capture Cards
- Just hit enter
Video Sources
- Enter a source name, zip code, and pick provider
Input Connections
- Choose Television
- Choose the source name you gave above

vi /home/mythtv/.mythtv/ SOURCE NAME GIVE.xmltv

Comment out channels you don\'t want/have. AKA, pay channels like HBO, TMC, etc.

# mythfilldatabase

Grab some food and drink(s)

# crontab -e
----Insert the following text into your mythtv user crontab----
### Run mythfilldatabase every night at 4:30 am
30 04 * * * /usr/bin/mythfilldatabase
----Cut above here (don\'t include this line)----

# /sbin/chkconfig mythbackend on
# /sbin/service mythbackend start

# /sbin/chkconfig httpd on
# /sbin/service httpd start

exit out of root.
# exit

$ ln -s /usr/bin/mythfrontend ~/.kde/Autostart/mythfrontend


$ mysql -u root mythconverg
mysql> grant all on mythconverg.* to mythtv@"10.10.10.%" identified by "mythtv";
mysql> flush privileges;
mysql> quit

Instaly MySQLMan cgi to help maintaing database.
/var/www/cgi-bin/mysqlman

Edit mysql/user/mythtv to have full privileges.
Edit mysql/db/mythtv to have full privileges and then flush privileges;

$ mythfrontend

To make browsing shows faster, turn off video display.
setup/Tv Settings/General/Display Live perview of recording

For frontend:

vi /user/share/mythtv/mysql.txt and edit Master Server ip to above machine

# visudo
Add this:
%mythtv        ALL=(ALL)       NOPASSWD: ALL

Then, in MythTV
Setup/General/Halt Command: /usr/bin/sudo /sbin/shutdown -h now

This will allow you to shutdown the computer within MythTV

Next, let\'s get rid of KDE and use IceWM so that it launches quicker:

How to


Resources:
http://www.mythtv.org
http://pvrhw.goldfish.org

vi Info:

Once inside of vi, use the following commands to edit, save, and exit vi

To edit-  i
To Paste (in edit mode)- SHIFT-INS (insert key)
Get out of edit mode= ESC (Hit escape key)
To save- :w (write)
To exit- :q
Or, to save and exit- :wq
To exit without saving changes- :q!
For more info about vi, type this at shell

# man vi


Leave a Reply