[PD] [pdp]/[gridflow] trying to use a webcam

Roman Haefeli reduzierer at yahoo.de
Wed Nov 8 14:26:19 CET 2006


hi all

i've run into big troubles trying to use an usb cam with either gridflow
or pdp, but it doesn't want to work in both. i wonder if i am doing big
mistakes or what combination of drivers and cams work with gridflow.

history:
#
i tried two different models yet: 
-philips spc900nc 
-logitech quickcam pro 4000
both are supported by pwc-driver from http://saillard.org/linux/pwc/ .
#
together with that driver, there is also a usefull tool available
'setpwc', that is used to set some camera-specific settings, that are
noth supported by 'dov4l', to commandline tool used to set general
web-cam and tv-card settings.
#
both tools work fine here and i can test the various settings with the
program 'camorama'. with camorama i have no troubles to display the
picture from the cam and different options work fine (e.g. 320x240/30fps
or 640x480/15ps).
#
but with neither pdp nor gridflow i had luck. for me it is more
important that it works with gridflow, also because it is still
maintained. that's why i post here only what i tried with gridflow
#
note:
it seems that the according objects in gridflow and pdp [#in] and
[pdp_v4l] overwrite some settings in the cam when instantiated. that
makes it even more difficult to find a set of settings that just works.
#



my steps to get a picture with the logitech quickcam pro 4000 and
pd/gridflow:

-i plug the cam into the usb-plug

-'setpwc -d /dev/video1 -p' tells me all actual settings of the cam:
<-
setpwc v1.1, (C) 2003-2005 by folkert at vanheusden.com
Current device: Logitech QuickCam Pro 4000
VIDIOCPWCPROBE returns: Logitech QuickCam Pro 4000 - 740
Serial number: 
Resolution (x, y): 320, 240
Offset: 0, 0
Framerate: 10
Brightness: 32256
Hue: 65535
Colour: 32768
Contrast: 0
Whiteness: 0
Palette: YUV 4:2:0 Planar
Compression preference: 1
Automatic gain control: -1275
Whitebalance mode: auto
Blinking of LED is not supported by the combination
of your webcam and the driver.
Sharpness: -1
Backlight compensation mode: off
Anti-flicker mode: off
Noise reduction mode: 1 
Pan/tilt range is not supported by the combination
of your webcam and the driver.
Get pan/tilt position is not supported by the combination
of your webcam and the driver.
->

-i test with 'camorama -d /dev/video1', if these settings work and they
work-> i get a picture

-i send a message [open videodev /dev/video1, get( to [#in]
<-
[gf] [:VideoCapability, "Logitech QuickCam Pro 4000", 1, 1, 1, 480, 640,
120, 160]
[gf] [:VideoWindow, 0, 0, 240, 320, 0, 655360, -1072189566]
[gf] [:VideoWindow, 0, 0, 480, 640, 0, 0, 0]
[gf] [:VideoWindow, 0, 0, 480, 640, 0, 655360, 0]
[gf] [:VideoPicture, 32256, 0, 32768, 65535, 0, 24, 15]
[gf] This card supports palettes: 12, 15
[gf] ioctl VIDIOCSPICT: Invalid argument
[gf] [:VideoChannel, 0, "Webcam", 0, 0, 2, 16384]
[gf] getting colour=32768
[gf] getting contrast=64512
[gf] ioctl VIDIOCGFREQ: Invalid argument
[gf] getting hue=65535
[gf] getting brightness=32256
[gf] getting whiteness=65535
->
suddenly i don't know what VIDIOCSPICT and VIDIOCGFREQ mean, but it
seems that gridflow tries some invalid settings here. 

-i send [bang( to [#in] and i get:
<-
[gf] ioctl VIDIOCMCAPTURE: Invalid argument
error: ArgumentError: ioctl error
format/videodev.c.fcs:358:in `void FormatVideoDev::frame_ask(int,
Ruby*)'
[#in]
... you might be able to track this down from the Find menu.
->
obviously gridflow still tries to send invalid settings to the cam and i
get no picture.

- i try various colorspaces. when i send [colorspace YUV420P( to [#in],
i get:
<-
error: ArgumentError: can't handle palette 15
format/videodev.c.fcs:536:in `void FormatVideoDev::_0_colorspace(int,
Ruby*, Symbol)'
[#io:videodev in ]
->

-when i send [colorspace RGB24( to [#in], i get:
<-
[gf] ioctl VIDIOCSPICT: Invalid argument
->

-when i try any other colorspace, i get:
<-
error: ArgumentError: supported: RGB24, YUV420P
format/videodev.c.fcs:523:in `void FormatVideoDev::_0_colorspace(int,
Ruby*, Symbol)'
[#io:videodev in ]
->
which is at least a clear humanunderstandable message.

-when i send a [bang( again now, i get a different error:
<-
[gf] ioctl VIDIOCSYNC: Invalid argument
error: ArgumentError: ioctl error
format/videodev.c.fcs:423:in `void FormatVideoDev::frame(int, Ruby*)'
[#in]
->



anyway, i'd really like to know what these codes like VIDIOCSYNC and
such stand for. and why it is so easy to use a webcam with 'camorama'
but so hard with pdp or gridflow. what models of cams do other people
use? 

any hints appreciated.

cheers
roman











	
		
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de





More information about the Pd-list mailing list