Next Previous Contents

4. Installation

Of course, if you have the operating system the card was ``designed for,'' be sure to take advantage of it and install the software that came with the card on that operating system. Test the card to see if it works -- a warranty problem or unknown conflict with your machine might be easier to work out with support. To the the card installed, follow the instructions below, or those that came with the card.

If you only have free Unix, and chucked the doco, read on....

4.1 Hardware Installation

If you are afraid to open the case of your computer, be sure to read over this entire HOWTO first and make notes about the card, such as its tuner type, the rating of the crystal(s) and so on. Then get someone competent to install the card for you.

Otherwise, open the case and install the card in an available slot. Pick one that supports PCI bus transfers and PCI bus mastering, if your mainboard is picky about this (see your mainboard's manual). You will want this for overlay mode.

For sound, there are two different ways to connect your video grabber card and your sound card. One way is internal routing. Connect your CD-ROM audio cable to the video card sound input and the video card output to the sound card CD-ROM audio input. Another way is to connect the external 1/8'' audio jack on the video card to the audio card's 1/8'' line audio in jack. You can also just plug amplified speakers into the grabber card audio out if you do not have an audio card or don't want to route through the sound card.

A video source is also handy, especially for determining if the card is working or not. Many cards handle composite video in, S-Video in and, if equipped with a tuner, RF in. There is a separate connector for each of these.

4.2 Software Installation

Kernel

Kernel 2.2.x

For Linux kernel 2.2 series, the driver is included with the kernel. See the Kernel-HOWTO to find out how to compile the kernel and install modules. You need to compile the kernel with the following options:

Prompt for development and/or incomplete code/drivers
(CONFIG_EXPERIMENTAL) [Y/n/?]
                                                      answer Y

In the Loadable kernel module support section:

Enable loadable module support (CONFIG_MODULES) [Y/n/?]  answer Y
Kernel module loader (CONFIG_KMOD) [Y/n/?]               answer Y 

In General Setup section:

PCI support (CONFIG_PCI) [Y/n/?]                         answer Y
Backward-compatible /proc/pci (CONFIG_PCI_OLD_PROC) [Y/n/?] 
                                                         answer Y

In the Video for Linux section:

Video For Linux (CONFIG_VIDEO_DEV) [Y/m/n/?]             either Y or M 
BT848 Video For Linux (CONFIG_VIDEO_BT848) [M/n/y/?]     answer M

Note that the reason that the BT848 driver is compiled as a module, is so that you can easily change almost all the parameters necessary when inserting the modules.

Also, see the documentation in the directory:

/usr/src/linux/Documentation/video4linux/bttv

There is much useful information there, including card and tuner types.

Kernel 2.0.x

For the 2.0 kernel or if you want to compile the driver separately for some reason, you will need to obtain and unpack an appropriate bttv driver for your kernel. Use the following commands to compile the driver:

cd bttv/driver
make
su -c "make install"

If things go OK, you will have workable drivers.

Note that you can disregard setting the card and tuner types for the modules in the Makefile. Instead, set these parameters when inserting the module with modprobe. It is much easier and quicker than recompiling over and over.

See also the documentation that comes with the driver in the doc directory. There is much useful information there, including card and tuner types, installation instructions and so on.

Video Devices

You will need to install at least one device file for video to work. The major number for Linux video devices is 81. The bttv package includes a file MAKEDEV that will automatically create the video devices for you. Otherwise, use the following commands to create the devices:

cd /dev
mknod video0 c 81 0
mknod video1 c 81 1
mknod video2 c 81 2
mknod video3 c 81 3
ln -s video0 video

4.3 TV Program

Unpack and compile the TV software of your choice. If you want to use the program that comes with the bttv driver, first get the Lesstif libraries. The program xtvscreen included with the driver source will not link without the Lesstif libraries (Xm). See:

http://www.lesstif.org

for the the Lesstif libraries. Because this is so involved, the author selected xawtv. It is readily available and should compile on your system. If the program mostly compiles, but does not link because it is looking for some file ending with .a or a library, you might not have the necessary static libraries. Another TV program might be for you.

Xawtv

Get the xawtv sources from:

http://www.cs.tu-berlin.de/~kraxel/index.html#xawtv

Obtain and unpack the xawtv source somewhere and change to the source directory. Xawtv uses the configure program, so it is fairly easy to setup. To compile with most options available, use the following:

./configure --with-x --enable-jpeg --enable-xfree-ext 
make
su -c "make install"

If you are not using a later version of XFree86, it may be necessary to Leave off the last argument of the configure line. Overlay might not work properly if you do not have the DGA extension. If you do not have the jpeg library installed, you may have to drop the second argument. You will not be able to grab jpeg images without the jpeg option, but ppm still images may be possible.

Xawtv requires a simple initialization file: ~/.xawtv The most basic contents of this file for a North American user might be:

# this is a comment
# empty lines are ignored too

# Start with capture off in case something goes wrong
capture = off
source  = Composite1

# For North America with cable
norm    = ntsc
freqtab = ntsc-cable

# You can give the channels meaningful names of your choice inside the []'s
[Composite1]
source  = Composite1
capture = off
key     = Alt+C

[S-Video]
source  = S-Video
capture = off
key     = Alt+S

[Channel 2]
source  = television
capture = overlay
channel = 2
key     = F2

[Channel 3]
source  = television
capture = overlay
channel = 3
key     = F3

[Channel 4]
source = television
capture = overlay
channel = 4
key = F4

# If you do not have any of these channels available, edit this file
# and add one that you do have.  The format should be obvious.

That should be enough to get you started. The names in square brackets ([]) can be anything you like. Usually the station names.


Next Previous Contents