bsan
Posts: 6
Joined: Sat Jun 02, 2012 12:47 am

Labtec Webcam 1200 with motion or uvccapture

Mon Aug 27, 2012 12:52 am

I'm trying to get a web cam to work on my pi.
The only one that I have is the Labtec 1200.
When I try uvccapture I get this:

Code: Select all

 uvccapture -x176 -y144 -m -o"ts.jpg"
Unable to query buffer (22).
 Init v4L2 failed !! exit fatal
When I try motion I get this:

Code: Select all

 motion
[0] could not open configfile /etc/motion/motion.conf: Permission denied
[0] Not config file to process using default values
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478784
[1] Thread 1 started
[1] cap.driver: "pac207"
[1] cap.card: "CIF Single Chip     "
[1] cap.bus_info: "usb-bcm2708_usb-1.2"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Config palette index 8 (YU12) doesn't work.
[1] Supported palettes:
[1] 0: P207 (P207)
[1] Unable to find a compatible palette format.
[1] ioctl (VIDIOCGCAP): Inappropriate ioctl for device
[1] Could not fetch initial image from camera
[1] Motion continues using width and height from config file(s)
[1] Resizing pre_capture buffer to 1 items
[1] Retrying until successful connection with camera
here is my device from usb-devices:

Code: Select all

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#=  7 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=ff(vend.) Sub=ff Prot=ff MxPS= 8 #Cfgs=  1
P:  Vendor=093a ProdID=2464 Rev=01.00
S:  Manufacturer=Pixart Imaging Inc.
S:  Product=CIF Single Chip
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 6 Cls=ff(vend.) Sub=ff Prot=ff Driver=pac207
I think that because it has Driver=pac207 it means that I have driver installed. (bit of a noob question but my first impression was that I had no driver).

and my lsusb:

Code: Select all

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 007: ID 093a:2464 Pixart Imaging, Inc.
From what I can see from the device ID (093a:2464) I have the right driver.

I gess uvccapture does not support my driver (am I right?) but I don't get why motion isn't working.

Hope to get some help.
Thanks.

PS- My objective is just to record one pic...or several.

PiToby
Posts: 1
Joined: Sun Jun 09, 2013 6:45 pm

Re: Labtec Webcam 1200 with motion or uvccapture

Sun Jun 09, 2013 6:54 pm

I had the same problem with fswebcam and found the solution after googeling for a while:
[email protected] ~ $ fswebcam -r 640x480 -v ./test.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
src_v4l2_get_capability,87: /dev/video0 information:
src_v4l2_get_capability,88: cap.driver: "pac207"
src_v4l2_get_capability,89: cap.card: "CIF Single Chip "
src_v4l2_get_capability,90: cap.bus_info: "usb-bcm2708_usb-1.3.3"
src_v4l2_get_capability,91: cap.capabilities=0x85000001
src_v4l2_get_capability,92: - VIDEO_CAPTURE
src_v4l2_get_capability,101: - READWRITE
src_v4l2_get_capability,103: - STREAMING
No input was specified, using the first.
src_v4l2_set_input,181: /dev/video0: Input 0 information:
src_v4l2_set_input,182: name = "pac207"
src_v4l2_set_input,183: type = 00000002
src_v4l2_set_input,185: - CAMERA
src_v4l2_set_input,186: audioset = 00000000
src_v4l2_set_input,187: tuner = 00000000
src_v4l2_set_input,188: status = 00000000
src_v4l2_set_pix_format,541: Device offers the following V4L2 pixel formats:
src_v4l2_set_pix_format,554: 0: [0x37303250] 'P207' (P207)
Unable to find a compatible palette format.
You can easily solve this by calling fsweb using the following command:

Code: Select all

LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libv4l/v4l2convert.so fswebcam -r 640x480 -v ./test.jpg
The image is then successfully stored.

This little trick does also work for motion where I originally got the information from:

http://www.lavrsen.dk/foswiki/bin/view/ ... x20x183230

Hope it helps!

faturita
Posts: 1
Joined: Fri Jul 26, 2013 3:33 pm

Re: Labtec Webcam 1200 with motion or uvccapture

Fri Jul 26, 2013 3:49 pm

If you want to make it work with motion:

Code: Select all

sudo apt-get install camorama
(this will install libv2lconvert.so)

And modify motion initialization script to:

Code: Select all

LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libv4l/v4l2convert.so motion 

Return to “Graphics, sound and multimedia”