PWC - Frequently Asked Questions PWC

Frequently Asked Questions (FAQ) about pwc

Since this is a Wiki you are welcome to improve the answers or add new questions/answers. You do not need to ask for permission. If you see spam feel free to delete it. Do not ask a question unless you have the answers. This is not a page for asking questions. It is for finding answers.

General Questions

645 & 646 - XXX is only supported with the decompressor module (pwcx)

At 17-May-2005 compression is not supported for 645 and 646 cameras.

Download

http://www.saillard.org/linux/pwc/files/

Compilation

Compiling fails due to "scripts/basic/fixdep: No such file or directory"

This happens with SUSE 10.0 as well as some other distros where you do not actually compile the kernel. You'll need to do a few things to the kernel source first:

  1. Open /usr/src/linux (or the location of the kernel source on your system) in a console.
  2. Run the command: make cloneconfig
  3. Run the command: make modules_prepare

This should put an end to the missing fixdep issue.

Compiling fails due to "make: * /lib/modules/2.6.15-27-386/build: No such file or directory. Stop."

This happens with Ubuntu 6.06 Dapper-Drake. You have two problems: no source, and no symbolic link to source.

  1. sudo apt-get install linux-source-2.6.15 (or whatever minor version number you see in `uname -r`)
  2. sudo ln -s /usr/src/linux-source-2.6.15 /lib/modules/2.6.15-27-386/build

Now compiling should work.

Installation

http://www.saillard.org/linux/pwc/INSTALL.en

Loading the module

modprobe fails with "FATAL: Error inserting pwc (...) Unknown symbol in module, or unknown parameter (see dmesg)

Try and run dmesg. If you see pwc: Unknown parameter `index' then the problem is that you have a parameter in /etc/modprobe.conf saying something line options pwc index=1.

Delete this line. It comes from an older version of the driver. Then try modprobe pwc again.

Modprobe doesn't recognize the usb modules

You may have an old version of 'modutils' (modprobe, insmod, rmmod etc). Old versions of modprobe won't recognize the usb modules. Try and upgrade to a newer version. Any distribution less than a couple of years old should not have this problem.

Also, don't forget to run 'depmod -a' once when you just installed the module (make install does this for you).

Running Applications

The box says I can take images at 800x600 and even 1280x960, but I can't seem to set this resolution

The point is that these resolutions are not really possible with the cams: the CCDs (light sensitive sensors) only have a resolution of 352x288 (PCVC645/646) or 640x480 (PCA675/680/690/730/740) pixels. This is the physical limit of the cameras. Any larger pictures are simply enlarged versions of the images at maximum resolution (though you would have to look real close to see it). The pwc driver only supports sizes given by the physical characteristics of the cameras.

Below are 3 tables that show the possible resolutions and framerates for the webcams. On the left, all physical resolutions are listed and at the top the various framerates.

If a cell is blank it means the combination of resolution and framerate is not supported. A DONE means the combination is supported uncompressed and PICK indicates that combination is only available in compressed mode.

Size PCA 645/646* & VC010
3.75 5 7.5 10 12 15 20 24
sQCIF 128x96   DONE DONE DONE DONE DONE DONE DONE
QSIF 160x120                
QCIF 176x144   DONE DONE DONE DONE DONE DONE DONE
SIF 320x240                
CIF 352x288 DONE PICK PICK PICK PICK PICK    
VGA 640x480                

* If you check the code you can see that compression is not supported on these 2 cameras and you can't go below 4 fps. In other words 176x144 is the highest resolution possible with the 645 and 646 cameras at the moment.

Size PCVC 675/680/690
5 10 15 20 25 30
sQCIF 128x96 DONE DONE DONE DONE DONE DONE
QSIF 160x120 DONE DONE DONE DONE DONE DONE
QCIF 176x144 DONE DONE DONE DONE DONE PICK
SIF 320x240 DONE PICK PICK PICK PICK PICK
CIF 352x288 DONE PICK PICK PICK PICK PICK
VGA 640x480 PICK PICK PICK      

Size PCVC 730/740/750
5 10 15 20 25 30
sQCIF 128x96            
QSIF 160x120 DONE DONE DONE DONE DONE DONE
QCIF 176x144            
SIF 320x240 DONE PICK PICK PICK PICK PICK
CIF 352x288            
VGA 640x480 PICK PICK PICK      

Note that VGA resolutions are limited to 15 fps: there isn't enough bandwidth available on the USB bus to squeeze through more, even with compression.

The box says I can take images at 60 frames per second, but I seem to be stuck at 15 fps?!

Philips lied a bit. See the answer above.

Dumping frame...

The pwc module produces a few messages in the kernel log (e.g. /var/log/messages). Most of them speak for themselves, but you might see this:

linux: usb-pwc: dumping frame XXX.

where XXX is a number that jumps up. This is nothing serious; it just means that the program that currently reads information from the driver is lagging behind and that the driver had to dump incoming frames from the camera. After 20 such messages it will stop nagging you, and print a total when the webcam device is closed.

Scratch buffer under/overflow...

Some messages that you might see in your kernel log are about scratch buffer over- or underflow. This is harmless; it means that the driver received too much or too little data in one frame and it can't be used to decode an image. The video frame is discarded and the driver waits for a new frame to arrive. This message could appear now and then when the system is loaded heavily or when there's a lot of USB traffic.

I see 3 repeated gray images

In case you don't get one color image but a grayscale image that is repeated three times on a row, the program you are using does not support the VIDEO_PALETTE_YUV420P palette. Contact the author of the program.

I want to hook up 10 cameras and take high resolution snapshots from them in succession. Is this possible?

Presently, no. The reason is that the cameras are built for streaming data, not stills. There's no way to pause the image stream easily so you can take snapshots at a whim. The only method is to open the camera device, take a snapshot and close it again, then go to the next.

Applications hang when the camera is connected through a USB hub or active extension cable

Indications: dmesg shows an error message like this:
pwc isoc_init() submit_urb 0 failed with error -12
pwc isoc_init() submit_urb 1 failed with error -12

This could be due to a problem with the enhanced host controller interface (EHCI) driver, try using the universal driver instead. Check which usb controller driver you are using (this is assuming your drivers are modules):
lsmod | grep usbcore
You should see something like
usbcore               107384  6 uhci_hcd,pwc,snd_usb_audio,snd_usb_lib,usbhid
If your *_hcd driver is ehci_hcd you could try swapping it for the uhci_hcd by doing this (as root):
rmmod ehci_hcd && modprobe uhci_hcd
Try reconnecting the hub or extension cable, cross your fingers and fire up your favorite webcam application.

How do I improve images with...

MPlayer

For example MPlayer has many fancy image enhancing filters. One way of invoking it would be this:
mplayer tv:// -tv driver=v4l:device=/dev/video1:width=640:height=480:noaudio -x 800 -y 600 -vf-add pp=hb:a/vb:a,hqdn3d,mirror

-vf defines a single filter, and -vf-add daisy-chains filters (the filters themslves are seperated by commas, their options by = and :).
The 'mirror' filter flips the image horizontally, the 'pp=' or postprocessing filter does some vertical (vb) and horizontal (hb) de-blocking, both are automatically turned off (:a) if they use too much CPU, and finally hqdn3d is a hi-quality de-noising filter. See the mplayer man page, or do a mplayer -vf help for an abundance of other usable filters.

ImageMagick

After you have taken a shot with your cam, for example using:
streamer -s 640x480 -c /dev/video1 -o webshot.ppm
you can use the 'convert' tool from ImageMagick to get an improved, bigger version of it.
Again, the tool offers a lot of different options, but for a start the following usually yields good results:
convert webshot.ppm -enhance -resize 800x600 big-webshot.png
convert webshot.ppm -despeckle -resize 800x600 big-webshot.png
Topic revision: r16 - 25 Nov 2006, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions. Kenneth only maintains the wiki.
Luc Saillard is the author of the PWC driver and he does not like direct emails either. Please join the Mailing List and ask your questions there.