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:

  1. Download RedHat 9 ISOs from www.redhat.com (actually from the RedHat Network) on another PC
  2. Copy onto CDROMS
  3. Install RedHat 9 onto my MythTV PC (spec above). Using 'Workstation' default setup with some extras (eg KDE, and some system tools)
  4. During installation, use RHN to update to latest everything
  5. set LANG to en_GB (see here - but I'm in the UK, so use en_GB instead of en_US)
  6. Download XMLTV 0.59 from here
  7. Install XMLTV
    1. run PERL Makefile.PL - argh lots of missing modules
    2. Install RPM - Perl-CGI, Perl-Compress-zlib from CDs
    3. Using CPAN (perl -MCPAN -e shell)- download Lingua::EN::Numbers::Ordinate, Lingua::Preferred, Term::ReadKey, Class::MethodMaker, Term::ProgressBar, Unicode::Strings
    4. run PERL Makefile.PL again (choose most basic options) - makefile generated OK
    5. run make
    6. run make test (completed OK)
    7. run make install
    8. run tv_grab_uk --configure -choose TV channels
    9. run tv_grab_uk - to download data
    10. (seems OK - so leave that for now)
  8. Qt - already installed (as far as I can tell)
  9. MySQL
    1. install RPMS - perl-DBI
    2. 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..
    3. install RPM MySql and MySql-Server also install MySql-Devel in case I may need it later
    4. leave this for now - seems OK
  10. LAME
    1. Download LAME 3.93.1 from here
    2. Follow the instructions here
    3. leave this for now - seems OK
  11. MythTV itself
    1. 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...
    2. Download MythTV 0.8 from here
    3. 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)
  12. Startup
    1. Hmm, run mythtv and I get an error about libmyth-0.8.so.0 not existing, but it's there.
    2. 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
    3. Now, I get QMYSQL3 driver not loaded errors.Check mysqld is running - I must have missed a step somewhere..
    4. 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.
    5. 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
    6. OK, now ./setup works fine - setup the General settings
    7. 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.
    8. 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.
    9. OK, I'm puzzled - I think I'll have to do some digging
    10. 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).
    11. 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...
    12. 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)
    13. 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...)
    14. mkdir /root/.mythtv
    15. cp /root/.xmltv/tv_grab_uk.conf /root/.mythtv/uk.xmltv
    16. In MythTV's setup, tell it that 'uk' is my video source and associated that with video0/television
    17. (l-p above are pretty much guesswork - I'll see what happens later)
    18. run mythfilldatabase & leave it for 30 minutes
    19. Run mythfrontend - all works fine :-) Except for TV viewing which does nothing as far as I can see.. :-(
    20. Reboot & run KDE instead of Gnome - no difference
    21. 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.
    22. Built and installed FreeType 2.1.4 from here
    23. Change MythBackend to use 'Dev/DBI0' instead of 'Dev/DBI'
    24. 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
    25. 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.
  13. 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
    1. Hurray - now xawtv works fine.
    2. Set /etc/modules.conf to have
        options bttv card=10 tuner=3
        options tuner card=3
    3. (I'm not sure if both lines are needed or correct, but it seems to work..)
    4. 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)
    5. 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:
      1. Use modprobe (not sure what this does, but it seems to be necessary..)
        1. modprobe snd-via82xx;modprobe snd-pcm-oss;modprobe snd-mixer-oss;modprobe snd-seq-oss
        2. (Note that this doesn't SEEM to work, but it did for me after a reboot)
      2. 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

      3. Don't bother with the .asoundrc file - it doesn't seem to be necessary (yet) for me
      4. reboot
    6. Play with alsamixer - it seems to change volumes etc, so I guess it's working now
    7. Start xawtv
    8. 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.
    9. Run MythTV and view live TV
    10. Doesn't work - I've read problems in the mailing lists about problems with MythTV 0.8 that are fixed in the CVS version
    11. Download CVS version of MythTV following the instructions here
    12. Make CVS version of MythTV (./configure, make, make install)
    13. Seems to work now, but MythBackend crashes out after a number of seconds (sometimes 1 or 2, sometimes 10 or more)
    14. Send a message to the mailing list about this problem and leave it for now
  14. MythVideo
    1. 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)
    2. Edit /usr/local/share/MythTV/mythvideo-settings.txt to contain the correct video storage path
    3. This now appears in the main Myth menu, and shows the available videos, but does nothing
    4. I work out this is because MPlayer isn't installed - I get no errors, but it seems to be necessary...
    5. Get MPlayer from www.freshrpms.net and all dependencies (lots of them)
    6. 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
    7. 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
    8. 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