How I installed MythTV on RedHat 9.0
This is my "Diary" I'm making during installation of MythTV
on a RedHat 9.0 installation
Hopefully it will be of use to someone....
My experience - Windows expert & software engineer - not much experience
on Linux. I expect there to be a steep learning curve here...
I'm based in the UK, so some things may be different for other countries (eg
XMLTV)
I have NOT yet finished installing it, so this is a story without an end -
so far - hopefully..
The PC
(initially - this may change if I have problems or to add, eg, a second tuner)
- Athlon XP 2800+
- Asus A7V8X
- 512MB RAM
- 160GB HDD
- DVD ROM drive
- nVidea MX2 400
- Pinnacle PCTV Rave HauppaugeWinTV
Steps I've taken so far:
- Download RedHat 9 ISOs from www.redhat.com
(actually from the RedHat Network) on
another PC
- Copy onto CDROMS
- Install RedHat 9 onto my MythTV PC (spec above). Using 'Workstation' default
setup with some extras (eg KDE, and some system tools)
- During installation, use RHN to update to latest everything
- set LANG to en_GB (see here
- but I'm in the UK, so use en_GB instead of en_US)
- Download XMLTV 0.59 from here
- Install XMLTV
- run PERL Makefile.PL - argh lots of missing modules
- Install RPM - Perl-CGI, Perl-Compress-zlib from CDs
- Using CPAN (perl -MCPAN -e shell)- download Lingua::EN::Numbers::Ordinate,
Lingua::Preferred, Term::ReadKey, Class::MethodMaker, Term::ProgressBar,
Unicode::Strings
- run PERL Makefile.PL again (choose most basic options) - makefile
generated OK
- run make
- run make test (completed OK)
- run make install
- run tv_grab_uk --configure -choose TV channels
- run tv_grab_uk - to download data
- (seems OK - so leave that for now)
- Qt - already installed (as far as I can tell)
- MySQL
- install RPMS - perl-DBI
- try to install RPM perl-DBD-MySql - failed needs libmysqlclient
- this seems to be in RPM MySql - but that won't install without
perl-DBD-MySql. This looks like a circular dependency (or I'm
missing something). So, run RPM --nodeps -i perl-DBD-MySql to
install perl-DBD-MySql without dependency checking - hope it works..
- install RPM MySql and MySql-Server also install MySql-Devel
in case I may need it later
- leave this for now - seems OK
- LAME
- Download LAME 3.93.1 from here
- Follow the instructions here
- leave this for now - seems OK
- MythTV itself
- I'll get 0.8 first, then if that's OK, I'll get the CVS version (or
I'll get it anyway) once I can work out how to use CVS...
- Download MythTV 0.8 from here
- Follow the instructions here
(this is on RedHat but I can't find any 'strip' lines in themes/Makefile
so I can't do what this page says - I'll worry about this later if I can't
get themes (whatever they are) to work)
- Startup
- Hmm, run mythtv and I get an error about libmyth-0.8.so.0
not existing, but it's there.
- I think I remember something about that on the mailing list - yep here
- so, change '/etc/ld.so.conf' to include the line '/usr/local/lib' and
run /sbin/ldconfig
- Now, I get QMYSQL3 driver not loaded errors.Check mysqld is
running - I must have missed a step somewhere..
- Hmm, yep, I haven't created the initial database - see here.
I'm only going to be accessing it from a single PC, so I'm not going to
worry about security setup at the moment.
- cd setup and run ./setup - now I still get the QMYSQL3
driver not loaded errors - must be something else I've missed. yep
-see here
- OK, now ./setup works fine - setup the General settings
- Capture cards is the next thing to set - however, I haven't installed
drivers yet (the online docs don't seem to mention that) so I'll have
to figure out how to do it.
- BTTV seems to be what I need - now where do I get it from - it's not
in the Required Software page on the MythTV site - SourceForge just seems
to have a version which has been in beta since Nov 2000, so I don't fancy
that.
- OK, I'm puzzled - I think I'll have to do some digging
- OK, this is where a Windows programmer/user comes a bit unstuck - Linux
people seem to compile the kernel every other week, but it's scary for
Windows programmers (never mind normal users).
- BTTV is here. I've got to download
my latest kernel (2.4.20-9) source first and then follow the instructions
here. Let's see what happens
- the worst is that I have to install everything from scratch...
- Hmm, it looks like I may have SOME version of bttv installed in the
kernel anyway, so I'll leave it for now and see what happens... (I will
also probably want btaudio later, but I'll leave that as well)
- Now, rerun MythTV's 'setup' and choose 'dev/video0' as the video device
(I have dev/video0-4, and no way, as far as I can tell, of know what each
one is...)
- mkdir /root/.mythtv
- cp /root/.xmltv/tv_grab_uk.conf /root/.mythtv/uk.xmltv
- In MythTV's setup, tell it that 'uk' is my video source and associated
that with video0/television
- (l-p above are pretty much guesswork - I'll see what happens later)
- run mythfilldatabase & leave it for 30 minutes
- Run mythfrontend - all works fine :-) Except for TV viewing which does
nothing as far as I can see.. :-(
- Reboot & run KDE instead of Gnome - no difference
- Try dev/video1,2,3 to see if those are actually where the TV card is
- all those say 'device not found' when starting MythBackend, so I presume
dev/video0 is correct.
- Built and installed FreeType 2.1.4 from here
- Change MythBackend to use 'Dev/DBI0' instead of 'Dev/DBI'
- Still TV viewing seems to fail. The ring buffer IS filling up now, and
MythBackend isn't reporting any cryptic errors like it used to do, but
TV viewing still doesn't work
- I'm a bit concerned because I can't see anywhere to define channels
(eg BBC1 here is channel 47) so I can't see which channel the tuner will
be looking at - maybe TV viewing isn't working because it's just viewing
white noise and can't get syncs etc.
- Realise (from messages on the newsgroups) that there may be a problem with
the tuner on new Pinnacle PCTV cards (not having Linux drivers), so swap out
the Pinnacle card for an old WinTV card I have lying around
- Hurray - now xawtv works fine.
- Set /etc/modules.conf to have
options bttv card=10 tuner=3
options tuner card=3
- (I'm not sure if both lines are needed or correct, but it seems to work..)
- Now, let's work on sound - go to www.freshrpms.net
and download the ALSA stuff (alsa driver, kernel, lib, alsaplayer, alsa-utils,
and all dependencies)
- My on-board sound is Realtek, which the ALSA
project website doesn't mention. However, it does mention the VIA8235
chip which the motherboard uses, so go to the setup
instructions for that chip with ALSA. I follow these instruction except
for the build instructions - because I got ALSA from RPMS. So:
- Use modprobe (not sure what this does, but it seems
to be necessary..)
- modprobe snd-via82xx;modprobe snd-pcm-oss;modprobe snd-mixer-oss;modprobe
snd-seq-oss
- (Note that this doesn't SEEM to work, but it did for me
after a reboot)
- Set up modules.conf:
# 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
- Don't bother with the .asoundrc file - it doesn't
seem to be necessary (yet) for me
- reboot
- Play with alsamixer - it seems to change volumes etc, so I guess it's
working now
- Start xawtv
- Test sound using alsamixer - mute 'Line In' (with 'm'), set it to Capture
(with 'spacebar). Now, set the volume using the PCM and CAPTURE volume
controls - seems to work ok.
- Run MythTV and view live TV
- Doesn't work - I've read problems in the mailing lists about problems
with MythTV 0.8 that are fixed in the CVS version
- Download CVS version of MythTV following the instructions here
- Make CVS version of MythTV (./configure, make,
make install)
- Seems to work now, but MythBackend crashes out after a number of seconds
(sometimes 1 or 2, sometimes 10 or more)
- Send a message to the mailing list about this problem and leave it for
now
- MythVideo
- 0.8 version of MythVideo doesn't seem to compile - I guess because I'm
using the CVS version of MythTV, so download the CVS version of MythVideo
and compile (same as instructions for CVS MythTV, but use cvs
-z3 -d :pserver:mythtv@cvs.mythtv.org:/var/lib/cvs checkout MythVideo
instead)
- Edit /usr/local/share/MythTV/mythvideo-settings.txt
to contain the correct video storage path
- This now appears in the main Myth menu, and shows the available videos,
but does nothing
- I work out this is because MPlayer isn't installed - I get no errors,
but it seems to be necessary...
- Get MPlayer from www.freshrpms.net
and all dependencies (lots of them)
- mythvideo now seems to work OK, but I don't like the video mode switching,
so I edit the mythvideo-settings.txt file again, to remove
the '-vm' option from the MPlayer command lines
- I also add a command line for 'mp2' files, because I have a couple of
those I want to be able to play and MPlayer seems to be able to display
them OK. I also add mp2 to the profile_movies=
line of the mythvideo-settings.txt file
- MythVideo seems to be working OK now - but I'm a bit disappointed it
uses MPlayer directly, which has a totally different OSD & command
key structure from MythTV's TV viewer, so it doesn't look integrated at
all. (ShowShifter on Windows looks much better here). Perhaps MPlayer
can be 'skinned' at a later stage to look more integrated.
<hr>
After a few weeks of nightmares with Linux, trying to get things working (especially
v4l2 and ivtv for my PVR350) and not being entirely satisfied with the 'user
experience' of MythTV, I noticed a product called SageTV.
This is a Windows program that supports multiple PVR250/350s in a PC.
Reformat hard disk & install Windows XP
2 hours later (most of which was installing XP) I had a working single PVR350
time-shifting EPG PVR working
Next day, bought a PVR250. 10 minutes - installing, rebooting and about 3
clicks of the mouse, and now I have 2 tuners able to record on the same PC.
If what you want is a multi-tuner PVR and are able to bear the cost of hardware
encoder tuners (£100 instead of £35), then SageTV is definitely worth looking
into! If your time is anything other than worthless to you, you'll save the
extra money in time alone. You can save more money by the massive reduction
in CPU performance required. The PC is now an Intel 1GHz P4 and it uses about
8% CPU time to record two channels and play back one time shifted. MythTV would
need a 1.8GHz+ to be able to do this (more if recording to MPEG) and would
be struggling.
(I have another PVR250 on order!)
(The authors have actually tested it with 4 recording streams and 3 playback
streams (see network support below) and it's still down in the low 20% of CPU
usage and have encountered no problems with disk or PCI bandwidth limits).
(The current beta versions of SageTV also have networked support etc (like
MythBackend & MythFrontend)).
There are things in SageTV that people keep begging for in MythTV (eg if you
change channel, the old channel's buffer isn't deleted, and you can go back
to it later), but conversely, MythTV has (under development) support for DVB
etc.
If you don't want to build your own, the authors of SageTV can even sell you
a preconfigured box with three PVR250s in, all set up and
ready to go.
(Note SageTV isn't free, Windows isn't free, Linux is free, MythTV is free
- SageTV & Windows are easy to set up for almost anyone. Linux & MythTV, er,
aren't)
SageTV has a 'Sage TV Service' for program listings at $5 a month. There is
a free plugin to import XMLTV data into the EPG (this is what I use since the
Sage TV Service only covers the USA at the moment). People who have used both
prefer the Sage TV Service and say it's worth the money, but you're fine to
the use the XMLTV facility at no cost if you wish - it uses an official plugin
API for loading EPG data, so it's not a hack, and not frowned upon (indeed,
the main programmer pointed me in the right direction).
(I've now unsubscribed from the MythTV mailing lists etc because I realise
I was just wasting my time with it at the moment, it's not suitable for real
use (mainly because of Linux's crude device driver system which drags it down),
so if you need to email me - it's paullocal@pscs.co.uk