Welcome to Terry Collins's
GNU/Linux Webcam Installation Notes


Since I've now installed two webcams (one is at) and it seems to be a perennial how to question on the SLUG list, I thought I would put a few notes up on my WWW server from how I carried out the last installation.


The Basic Steps

  1. Obtain software
  2. Obtain hardware
  3. Physically install capture card
  4. Reboot and check system recognition
  5. Installing Software
  6. Configuring Software
  7. Installing Modules
  8. Using It
  9. Using xawtv's tuner
  10. Cameras
  11. Other Setups
  12. Acknowledgements
  13. Disclaimer

Back To WOA Linux Resources Page
Back to WOA Front Page

Obtain The Software


I have had success with xawtv. Both times I have used version 2.41. On the first occassion I tried to upgrade to version 2.43, but could not work out the problems and went back to 2.41. the problem is that from circa version 2.43, bttv was removed from the package and the makefiles in the separate bttv package just do not work. The documentation hasn't changed either, so there is no clue as to the reasons why this problem occurs. Hence, I stick with xawtv version 2.41.

My second installation was onto a RH6.0 system and it came with the bttv and other modules on the installation CD and they were installed (I selected everything). So you need to be aware of this if you are using a 2.2? kernel system.

If people want to tell me about other software, then I'll put a link in here as well.


Back to Table Of Contents

Obtain The Hardware


Okay blatant plug here - I sell the Dynalink TV Tuner & Capture Card, which is the second card I installed. The first card (MV-848T TV Link) came from CetusTech.

Take note of the chip type, e.g. BT848 or BT878, or?. Also note any labels on the card, particularly the tuner section (the enclosed steel box), like Temic, or Phillips, etc. These might help in chosing the correct card type in the software.

If you are wondering how this applies, install the software second and read the documentation in the bttv section MODULES file.


Back to Table Of Contents

Physically install the card


Shut down your machine and stick in your card. Warning, you might have to do this a few times, including juggling other PCI cards. I usually have SCSI cards, video card, capture card, sound card, then network card in order of slot priority. Depending on the age of your mother board, the more it matters, the harder it will be to get working. biggest problem is IRQ conflicts.

BTW - do you have a camera? You can probably connect that up once the system recognition is correct. If you have not chosen a camera yet!


Back to Table Of Contents

Reboot & check system recognition


There are two places to check. Firstly in the boot up pci card list (pause key recommended), then under /proc/pci. You are looking for the card being recognised, then duplicate IRQs. "cat /proc/pci |more" is good way to see what your system is saying about the card.

The second card I installed, a Dynalink (and other brands) will have two devices listed on the PCI list. The second device is the IR controller interface, which AFAIK is currently unusable under GNU/Linux, so don't insert the batties into it.


Back to Table Of Contents

Install software


xawtv comes as a gzipped tar file, which I usually keep in my downloaded software collection, where I build it, let it install itself and once it is working, blow away everything other than the original file xawtv*.tar.gz.

There are 5 steps
"./configure" - runs by itself.
"./make" and if this fails "grep config README" and run the "./config --disable-kradio" line before running make again.
"./make install", and xawtv will be installed in /usr/local/bin. "cd bttv/driver" and "./MAKEDEV" to create the devices needed. You only need to "mknod /dev/video0 c 81 0" as a minimum, then "ln -s /dev/video0 /dev/video".
xawtv actually looks for /dev/video.
Last is to configure and make webcam. This will be in the bottom xawtv directory.
So "cp webcam.c webcam.c.orig", then "vi webcam.c" and make the appropriate changes"
Okay, it is not that bad, all you really need to change is how often it captures an image and where it ftp's the image to. The proggy is documented and covers issues. You can also change the image size and details if you want to.
Then "make webcam" and copy webcam to an appropriate directory.


Back to Table Of Contents

Config software


Now you need to actually know something about your card as you have to tell the software how to drive your card. If you haven't alread done so, I suggest reading the "README" in the xawtv bottom directory and "MODULES" and "update" in the xawtv*/bin/driver directory to get a feel for what is needed.

I suggest saving a copy of "update" and making changes to it for each option you want to test. It just makes things easier."

There are up to five modules that may need to be loaded. These are;
"videodev" - runs the video device.
"i2c verbose=1, scan=1 i2c_debug=1" - which controls other devices and will acknowledge the loading
"tuner debug=1 type=0" - TYPE is significant.
"msp3400 debug=2" - for sound
"bttv pll=1 radio=0 card=10" - PLL & CARD are significant.

Your reading of MODULES should have given you the background behind all of these and the option choices..
For the first card (brand=?, model=?), the settings I used were;
"tuner.....type=5" for a Phillips PAL card
"bttv pll=0 radio=0 card=0" for No crystal, no radio and autodetect - When this card was shifted to another box, the I had to use pll=1.

For the second card (Dynalink, Magicview), the settings I used were;
"tuner......type=0" for a Temic PAL card
"bttv pll=1 radio=0 card=0/10/13" for a 28Mhz crystal, no radio and and I'm really still playing around with this last setting.

The problem with both setups is that I have been unable to get sound working from the tuner section, but I'm only giving a guide for webcam, so this is not a hassle to me as I'm not really interested in watching a TV on my computer. The way I eventually achieved sound was to plug the audio out of the capture/tuner card into the line input of my sound card.

Settings - keep in mind that bttv, tuner, etc all default to the settings they were compiled with. These default settings can be overwritten by a command line setting, but the default (code) settings is used if there is no command line setting. So these two lines are not the same;
bttv - no options is not the same (pll=code default) as
bttv pll=0 - meaning do not use a crystal settings (pll=1 ->28Mhz).

It is good practise to go back after everything is sorted out and change the code settings, then recompile everything. Sort of boots and braces, sigh, but I know you will not.

The first computer was a Caldera Open Linux 1.3 box and module installation is a real bastard operation. The process was thought up by some demented reject from Microsoft. So as I don't like bashing my head against brick walls, getting the capture card going was enough.


Back to Table Of Contents

Set up your modules


When I get time, I'll put in the link to the LDP (Linux Documentation Project) section on setting up modules, which is the last thing you need to do.

I have not bothered with modules yet, but have the five insmod commands in a starttuner script.

This is mostly a hangover from the first machine which was a Caldera Open Linux 1.3 system with the most awful way of setting up modules. For the moment, I've kept starttuner for the Red Hat 6.0 system.

You can choose which best suits you.


Back to Table Of Contents

Using It


Would you believe I wrote this whole document and left out this bit about actually using it! Well it is simple really. All I do it;
starttuner webcam - in a window if I have X going (usual).

At the moment, the start and stop is manual.

If you want to know how to display the image, just grab my webcam page.


Back to Table Of Contents

Using xawtv's tuner


If you want to test/check the card by using the tuner, there are a couple of wrinkles to using xawtv (the TV screen).

Firstly ".xawtv" in your directory will need to be manually edited. Secondly, be careful about switching to other screens. On the Caldera box, this locked everything up and the only way I had to recover was the big red button (fsck on 18Gb anyone {:-).

When your TV window is running, left mouse button brings up a list of configured stations. Right mouse button brings up the fiddles. To set up .xawtv; right mouse button, choose E, then enter some of the details below. Save it, close down the screen and manually edit .xawtv.

Here is some basics from my .xawtv files First is the default(startup) settings, then hot-key settings. Note the setting, space, equals, space, value.
norm = PAL
capture = on
source = composite1
freqtab = pal-australia
pixsize = 128 x 96
jpeg-quality = 75

[Camera 1] --- gives screen title
channel = E2 - E@ for cameras, channel for TV
key = 1 - my hotkeyfor camera 1
source = S-Video

[Camera 2]
channel = E2
key = 3
source = Composite1

[ABC]
channel = 2
key = 2
source = Television

And so on for each TV channel. On the house VHF +UHF aerial, I can see 2, 7, 9, 10 & 28 (SBS). I guess a better aerial, or multidirection might pick up a few others.

Each of these sections, may also contain color, bright, hue and contrast settings, with 32768 being mid-range. So, you could use the settv utility to switch between virtual cameras to overcome the limited compensation and auto adjustment in the cheaper CCD cameras.

Last quirk - the slide bars in the right mouse button fiddle screen, move in the opposite way. They decrease for right button and increase for left button click.


Back to Table Of Contents

Choosing a camera


I'm now putting in a plug for the best Internet site I have yet found that explains how you choose an appropriate camera; AllThings. In their documentation pages, they have info on choosing your focal length, filters and a pile of other stuff. Also seem to offer some good pricing. Plus they are Australian.


Back to Table Of Contents

Other Setups and Software


Well, this page hadn't been up 15 minutes and people started telling me about their setups. So, I will list other, different hardware and software combinations here

Quickcam - Mono; look at http://www.lannet.com.au and click the eyecon graphic at the bottom of the page. This will take you to a page that gives you their image and explains the basics of their setup. Or http://rufus.w3.org/linux/RPM/contrib/libc5/i386/qcam-grabber-0.91-1.i386.html for the software.


Back to Table Of Contents

Acknowledgements


As well as the usual crowd (Richard Stallman for GNU, Linus Torvalds for Linux), thanks should be given to Gern Knorr, Ralph, Alan & Simon who put the xawtv package bits together, and finally Grahame "Possum Cam" Kelly for assisting my first effort. TAAH.


Back to Table Of Contents

Disclaimer


You know the patter - if you use this info, you do so at your own risk. Actually I think the greatest danger is using an unregulated power supply to the camera and having it fail the smoke test. BTW - I've had trouble with one of those select your voltage and polarity plug packs rattling loose in the power socket (some plugs are not standard, so watch this, as you will have enough things to sort out as it is.


Back to Table Of Contents
Back To WOA Linux Resources Page
Back to WOA Front Page

These WWW pages were created with asWedit on GNU/Linux