Next Previous Contents

3. Checking prerequisites.

3.1 Hardware.

Hardware selection is a complex topic, one this HOWTO will only discuss briefly and in general terms. The following subsections offer some general guidance but stop short of offering specific recommendations.

For more detail about actual configurations that others have used, Mark Cooper has setup a hardware database at http://pvrhw.goldfish.org/. The website will let you browse what other users have reported as their hardware configuration, and how happy they are with the results.

If you have specific questions about the suitability of specific hardware choices, you can consult the archives of the mythtv-users mailing list or post a question to the list.

CPU Type and Speed

Selection of CPU type and speed is one of the trickiest elements of hardware selection, mainly because there are so many tradeoffs which can be made. For example, if you have plenty of CPU, you can use higher bitrates or capture sizes, etc.

MythTV has two modes of operation. First, it can function as a software video encoder, which means that it uses a fairly generic "dumb" video capture card to get frames of video, encodes them using the CPU on your motherboard and writes them to disk. High-end video capture cards and devices like the Tivo and ReplayTV have dedicated encoder chips which use specialized hardware to convert the video stream to the MPEG-2 format without using the motherboard CPU. The main CPU has the responsibility of running the Operating System and reading and writing the encoded frames to the disk. These tasks have fairly low CPU requirements compared to encoding video, which is why a device like a Series 1 Tivo can run with only 16MB of RAM and a 54Mhz CPU.

There are many variables that go into the question: "How fast a CPU do I need to run MythTV"? Obviously, the faster your CPU, the better your experience will be with MythTV. If you are using the software MPEG-4 encoder and performing the "Watch TV" function, where the CPU is both encoding and decoding video simultaneously to allow Pause, Fast Forward and Rewind functions for live TV requires more CPU then just encoding or decoding. MythTV also supports multiple encoder cards in a single PC, thereby increasing the CPU requirements if you plan on simultaneously encoding multiple programs. As a general guideline, plan on 1Ghz per encoder.

Here are a few data points:

The second mode of operation is where MythTV is paired with a hardware-based video encoder, such as a Matrox G200 or a Hauppauge WinTV-PVR-250/350. In this mode, because the video encoding is being done externally, the CPU requirements are quite low. See the Video Capture Device section for details.

Memory

A MythTV host that is both a backend and a frontend and using software encoding with a single capture card should run adequately in 256MB of RAM. Additional RAM above 256MB will not necessarily increase performance, but may be useful if you are running multiple encoders.

Hard Disk(s)

Encoded video takes up a lot of hard disk space. The exact amount depends on the encoding scheme, the size of the raw images, and the frames per second, but typical values for MythTV range from 700 megabytes/hour to 2 gigabyte/hour for MPEG-4 and larger for MPEG-2 and RTJPEG.

NOTE: You must use DMA for hard drive access to prevent choppy or jittery video. Red Hat Linux 8.0 apparently does not enable DMA at boot time. See the Troubleshooting Section for instructions on how to do this.

Writing video to disk is sensitive to timing issues; RTJPEG requires less CPU with the tradeoff being larger files and needing to write to the disk faster. MPEG-4 requires more CPU, but the files are smaller. At the default resolution, MPEG-2 creates the largest files of all with almost no CPU impact.

See the Troubleshooting section for more information.

Video Capture Device

In order to watch live TV, MythTV will need one or more video capture devices with Linux drivers. For a list of video capture cards known to work with Linux, please see /usr/src/linux/Documentation/video4linux/bttv for a partial listing; even if your specific card is not listed, it may be that the vendor is actually using a standard reference design and placing their own name on it. See the video4linux mailing list ( https://listman.redhat.com/mailman/listinfo/video4linux-list) for more information and for specific hardware questions.

The most common inexpensive cards available use the Bt848 or Bt878 video capture chip; examples are the "Hauppauge WinTV Go" card and the "AverTV Desktop PVR" card, both of which use the bttv kernel module.

Newer cards may use the CX23881 series of chips; a driver is available at http://bytesex.org/cx88/.

After you have installed a suitable capture device, you can check that the kernel sees it with lspci. Look for an entry labeled "Multimedia video controller". To get more detailed information about the card, use lspci -v or lspci -vv. Ensure that your system is loading the bttv modules by typing:

# lsmod |grep bttv

You want to see the bttv module listed.

While inexpensive video-capture cards just capture raw frames, leaving encoding to software, some higher-end cards incorporate hardware-level encoding. Using either a G200 MJPEG encoder card, or a WinTV-PVR-250 or 350 from Hauppauge and the driver from the IvyTV project http://ivtv.sourceforge.net/ will allow you to use dedicated hardware encoders rather than your CPU. As of 2003-04-15, the CVS version MythTV is now able to use the PVR-250/350 cards as an input device for live TV and for scheduled recordings. Using the onboard MPEG-2 encoder drastically reduces the CPU requirements for encoding.

Here are some data points for encoding:

Here are some data points for decoding:

See the I'd like to use a hardware MPEG-2 encoder section for information on installing a PVR-250 on Mandrake 9.1.

Sound card

The system needs a sound card or an onboard equivalent on the motherboard to play back and in most cases, to record sound. Any sound card that can be operated by the ALSA (Advanced Linux Sound Architecture) kernel modules will work with MythTV.

The usual practice for capturing the audio associated with the video is to run a jumper cable from an audio output on the video capture card to the Line input on the sound card. Some video capture cards use internal audio tuners that work with the kernel btaudio module, thereby eliminating the patch cable. This is useful if you will be using multiple capture cards in a single chassis, since each capture card will not need its own sound card. See the btaudio section for more information.

NOTE: The PVR-250/350 does not require a sound card for audio capture.

Video Display Card

MythTV will work with just about any video card. However, it is highly recommended that you use a card which supports XVideo (XV) extensions. If your card does not support XV, color conversion and scaling will be performed by your CPU rather than the video card. This is very CPU intensive. Check the XFree86 documentation for details if you are uncertain about your preferred card. You may also run xvinfo; look for your video card to be listed as one of the adapters.

Most people, though, want to view television on a television set. For this, you need either (a) one of the relatively small number of cards with TV out outputs that are supported by Linux and XFree86, or (b) an external VGA-to-TV converter.

For (a), all nVidia cards with TV out that are supported by the current drivers from nVidia should be able to display on a television. Some cards with certain chip sets support overscan adjustment. See http://www.nvidia.com/content/drivers/drivers.asp for nVidia driver information.

Many older nVidia cards (such as GeForce2 cards with TV out) can use nvtv http://sourceforge.net/projects/nv-tv-out/, a utility which provides controls for overscan, x,y position and several other useful controls to fine tune output.

See the forums at http://sourceforge.net/forum/forum.php?forum_id=105850 for more infomation on which cards work with nvtv.

Recent Matrox cards (the G450 and G550) are reported to work with kernel patches (for Linux 2.4.19) available at http://www.bglug.ca/matrox_tvout/.

Cards made by ATI have no official support for TV out under Linux and XFree86, though some people report making them work with the experimental devel branch of the GATOS drivers, available at http://gatos.sourceforge.net/watching_tv.php.

For choice (b), VGA-to-TV converters work well; many people have stated they are satisfied with the output of the following devices:

3.2 Software.

There are a few ways of installing programs on Linux systems; you can either use the graphical tools that come with your distribution, or you can use command-line utilities. Either system will get the job done, and it all depends on your comfort level with Linux.

NOTE for Red Hat users: Axel Thimm has created RPMs for MythTV which may be obtained from http://atrpms.physik.fu-berlin.de/name/mythtv/. If you have problems with the RPMs, please send him email directly at mailto:Axel.Thimm@physik.fu-berlin.de.

NOTE for Mandrake users: Thac has created RPMs for MythTV for Mandrake 9.0 and 9.1 which may be obtained from http://rpm.nyvalls.se/ If you have problems with the RPMs, please send him email directly at thac@nyvalls.se.

NOTE: you must have the MySQL database software installed on a system to store the master database. This does not necessarily mean that MySQL must run on one of the MythTV boxes.

In order to compile MythTV, we need to make sure that the software it needs is installed. As of 2003-03-15, this list includes mysql, gcc, freetype2-devel, XFree86-devel, qt-devel and lame. If you're going to use a remote control with MythTV, you're going to need the cdialog package in order to compile lircd if your distribution doesn't have a pre-packaged lirc. If you are using XMLTV as a grabber, you will need perl.


NOTE:  QT v3.1 is recommended, but not required.

NOTE:  If you are going to be using RPMs to install various
components, you should be aware that not all packages include the necessary
headers for compiling packages.  If you're having trouble compiling, ensure
that you've installed the -devel version of a prerequisite.

NOTE:  Other than where noted, Mandrake 9.1 users may follow the
Mandrake 9.0 instructions.

There appears to be issues with ALSA and simultaneously recording and playing sound, which is a core requirement for MythTV. If you are not running ALSA 0.9.0rc6 or higher and experience lock-ups of your system when trying to use MythTV, then please check the main ALSA website and upgrade to the latest version, or see if your distribution has already packaged the latest ALSA drivers.

Graphical installation tools.

Mandrake 9.0

On systems running KDE, a tool which will allow you to see what packages are available and if they're installed on your system can be accessed by clicking K->Configuration->Packaging->KPackage

While the graphical tools are nice, the command line tool is actually easier to use. It's strongly recommended that you use the command line tool.

There are many inter-related modules, so make sure that you've got the main package for each one, and not a sub package for an unrelated item. For example, there are many modules that have "perl" in them; some are a part of the apache web server, others are a part of the perl distribution. In each case, we're looking to make sure that the primary module is getting installed.

Click the magnifying glass or press CTRL-F and enter "perl" as your search term. You should find it under the "Perl" folder. You need at least the perl 5.80 base package installed. If not, click on the "Mark" button.

If you are going to be installing mysql on this system, search for mysql - it should be under "Databases". Make sure that mysql and mysql-clients are installed. If not, click on "Mark".

Search for gcc. You're going to need gcc and gcc-c++ installed.

Search for freetype2. Make sure that you've got freetype2 and freetype2-devel installed.

Search for XFree86-devel.

Finally, check for qt. You'll need libqt3-devel (under folder "KDE and Qt") and libqt3 ("Libraries").


NOTE for Mandrake 9.1 users:  Mandrake 9.1 has removed the MySQL modules
from the default installation.  Ensure that you install libqt3-mysql.

Make sure that cdialog is installed if you want to use MythTV with a remote control if you need to compile lirc from source.

alsa-utils is needed for setting the volume. MythTV now has native volume support, but you may have a special configuration that necessitates an external program to adjust your volume settings. If this is the case, then you can disable native volume support.

If you marked anything to install, click on Install Marked. Click "Yes" or OK if you get a message about satisfying dependencies.

Red Hat Linux 8.0

Red Hat Linux 8.0 does not have the same graphical package manager used by other distributions, so you will need to use Red Hat's package manager. This is the same utility you saw upon installation from the Red Hat Linux 8.0 installation CD, and it allows you to select packages at installation time, or once the system is up and running. You can access this program by selecting

RedHatMenu>System Settings>Packages

If you did a typical Desktop install of Red Hat Linux 8.0 make sure you have selected:

Click Install to continue.

You can not install qt-MySQL, a necessary prerequisite, graphically. To install this package using the command line do

$ up2date --solvedeps qt-MySQL

NOTE: ensure that the correct symlinks have been created for the XFree-86 development libraries:

# ln -s /usr/X11R6/lib/libXext.so.6 /usr/X11R6/lib/libXext.so
# ln -s /usr/X11R6/lib/libX11.so.6 /usr/X11R6/lib/libX11.so

Command-line installation.

This section details the various methods for installing prerequisites from the command line.

Mandrake

urpmi is the simplest tool for installation of packages from the command line. The difficult part is the configuration aspect. The following website http://plf.zarb.org/~nanardon/urpmiweb.php will allow you to choose a mirror site and then present the command-line configuration text for that mirror. You will most likely need to add a "Contrib" mirror to your setup. If you add a site from the "Penguin Liberation Front", you will be able to load the lame library without compiling from source.

Special instructions for Mandrake 8.2

Mandrake 8.2 does not have a pre-packaged libqt3-devel, so you must compile and install this manually. The following command will install the prerequisites for qt3, so don't skip this step. The simplest tool for installing packages from the command line is urpmi.

Open a shell, and execute the following. You may get asked a number of questions regarding dependencies. It's best to answer "YES".

$ urpmi mesa-common-devel libmng1-devel mysql-devel libunixodbc2-devel
$ urpmi postgresql-devel xfree86-static-libs
Once all of the prerequisites have been installed, the next step is to obtain and compile the source RPM.

Go to http://www.rpmfind.net and search for qt3. There will be a number of different versions available. As of 2002-12-02, the latest version for Mandrake is called qt3-3.0.5-7mdk.src.rpm. Unless you are running Mandrake Cooker (the beta version of the next release of Mandrake), make sure to download the standard "Mandrake" release. Download the .src.rpm file to a directory that you can find.

$ su
# cp qt3-3.0.5-7mdk.src.rpm /usr/src/RPMS/SRPMS
# cd /usr/src/RPMS/SRPMS
# rpm --rebuild qt3-3.0.5-7mdk.src.rpm
# cd ../RPMS
# ls -l
The "ls -l" command will show you a directory listing. There should be two files, one will be named "qt3" and the other will be "qt3-devel". The full filenames will vary, so one you know the filename, you can install them with
# rpm -Uvh [filename1]
# rpm -Uvh [filename2]
Once this has completed (it can take a while, so please be patient), continue by following the Mandrake 9.0 instructions.

Mandrake 8.2 and 9.0

The simplest tool for installing packages from the command line is urpmi.

Open a shell, and execute the following, all on the same line. You may get asked a number of questions regarding dependencies. It's best to answer "YES".

$ su
# urpmi mysql gcc gcc-c++ freetype2-devel cdialog alsa-utils
# urpmi XFree86-devel perl


NOTE for Mandrake 8.2 users: do not execute the following
command.  You've already manually installed the files in the previous
section.

# urpmi libqt3-devel


NOTE for Mandrake 9.1 users: execute the following command.

# urpmi libqt3-mysql

However, you might get this when you execute the command above:

[root@pvr root]# urpmi mysql gcc gcc-c++ freetype2-devel libqt3-devel alsa-utils XFree86-devel perl
everything already installed

In that case, you're ready to move to the next section.

Red Hat Linux 8.0

[Please submit instructions]

Gentoo.

If KDE has not been installed on your system: Edit /etc/make.conf and locate the "USE" variable. If the line is commented out, remove the comment. The line should have at least:

USE="mysql qt alsa"
Next you need to build KDE. If you don't plan on using the ebuilds as described in the Gentoo section then you also need to install lame.
$ emerge kde lame mysql
If KDE has already been installed, by default, QT libraries with SQL support are not built. To enable SQL support, add "mysql qt" to your USE variable in /etc/make.conf and rebuild QT by running
$ emerge qt
Install MySQL if this is the master system:
$ emerge mysql

All the necessary files will be downloaded and built. This will take a lot of time, even on a fast machine if you have to do a full KDE build.


Next Previous Contents