Logitech C200 + Motion = config pallet error


5 posts
by remicek » Fri Jul 27, 2012 2:45 pm
Hi!
I've been trying to use that camera for some time now, without succes so far. I'm using newest Raspbian OS, camera is conneted by powered USB hub. I checked it and it's working on my Lubuntu.
Code: Select all

pi@raspberrypi ~ $ 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 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 005: ID 04d9:0499 Holtek Semiconductor, Inc. Optical Mouse
Bus 001 Device 006: ID 0603:00f2 Novatek Microelectronics Corp.
Bus 001 Device 007: ID 046d:0802 Logitech, Inc. Webcam C200


Code: Select all
pi@raspberrypi ~ $ lsusb -vt
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/3p, 480M
        |__ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M
        |__ Port 2: Dev 4, If 0, Class=hub, Driver=hub/4p, 480M
            |__ Port 1: Dev 5, If 0, Class=HID, Driver=usbhid, 1.5M
            |__ Port 2: Dev 6, If 0, Class=HID, Driver=usbhid, 1.5M
            |__ Port 2: Dev 6, If 1, Class=HID, Driver=usbhid, 1.5M
            |__ Port 4: Dev 7, If 0, Class='bInterfaceClass 0x0e not yet handled', Driver=uvcvideo, 480M
            |__ Port 4: Dev 7, If 1, Class='bInterfaceClass 0x0e not yet handled', Driver=uvcvideo, 480M
            |__ Port 4: Dev 7, If 2, Class=audio, Driver=snd-usb-audio, 480M
            |__ Port 4: Dev 7, If 3, Class=audio, Driver=snd-usb-audio, 480M


Code: Select all
pi@raspberrypi ~ $ sudo motion >> c200.log
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478784
[0] Thread 1 is from /etc/motion/motion.conf
[0] motion-httpd/3.2.12 running, accepting connections
[1] Thread 1 started
[0] motion-httpd: waiting for data on port TCP 8080
[1] cap.driver: "uvcvideo"
[1] cap.card: "UVC Camera (046d:0802)"
[1] cap.bus_info: "usb-bcm2708_usb-1.2.4"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Config palette index 8 (YU12) doesn't work.
[1] Supported palettes:
[1] 0: YUYV (YUV 4:2:2 (YUYV))
[1] 1: MJPG (MJPEG)
[1] Selected palette YUYV
[1] Test palette YUYV (320x240)
[0] Thread 1 - Watchdog timeout, trying to do a graceful restart
[0] httpd - Finishing
[0] httpd Closing
[0] httpd thread exit
[1] Using palette YUYV (320x240) bytesperlines 640 sizeimage 153600 colorspace 00000008
[1] mmap information:
[1] frames=4
[1] 0 length=153600
[1] 1 length=153600
[1] 2 length=153600
[1] 3 length=153600
[1] Error starting stream VIDIOC_STREAMON:
[1] ioctl (VIDIOCGCAP): Invalid argument
[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] Started stream webcam server in port 8081
[1] Thread exiting
[0] Motion thread 1 restart
[1] Thread 1 started
[1] cap.driver: "uvcvideo"
[1] cap.card: "UVC Camera (046d:0802)"
[1] cap.bus_info: "usb-bcm2708_usb-1.2.4"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[1] ioctl (VIDIOCGCAP): Invalid argument
[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] Started stream webcam server in port 8081
[1] Retrying until successful connection with camera
[1] cap.driver: "uvcvideo"
[1] cap.card: "UVC Camera (046d:0802)"
[1] cap.bus_info: "usb-bcm2708_usb-1.2.4"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[1] ioctl (VIDIOCGCAP): Invalid argument
[1] Retrying until successful connection with camera
[1] cap.driver: "uvcvideo"
[1] cap.card: "UVC Camera (046d:0802)"
[1] cap.bus_info: "usb-bcm2708_usb-1.2.4"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[1] ioctl (VIDIOCGCAP): Invalid argument
^C[1] Thread exiting
[0] Motion terminating
pi@raspberrypi ~ $ lsusb -vt
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/3p, 480M
        |__ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M
        |__ Port 2: Dev 4, If 0, Class=hub, Driver=hub/4p, 480M
            |__ Port 1: Dev 5, If 0, Class=HID, Driver=usbhid, 1.5M
            |__ Port 2: Dev 6, If 0, Class=HID, Driver=usbhid, 1.5M
            |__ Port 2: Dev 6, If 1, Class=HID, Driver=usbhid, 1.5M
            |__ Port 4: Dev 7, If 0, Class='bInterfaceClass 0x0e not yet handled', Driver=uvcvideo, 480M
            |__ Port 4: Dev 7, If 1, Class='bInterfaceClass 0x0e not yet handled', Driver=uvcvideo, 480M
            |__ Port 4: Dev 7, If 2, Class=audio, Driver=snd-usb-audio, 480M
            |__ Port 4: Dev 7, If 3, Class=audio, Driver=snd-usb-audio, 480M
pi@raspberrypi ~ $ sudo motion >> c200.log
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478784
[0] Thread 1 is from /etc/motion/motion.conf
[0] motion-httpd/3.2.12 running, accepting connections
[1] Thread 1 started
[0] motion-httpd: waiting for data on port TCP 8080
[1] cap.driver: "uvcvideo"
[1] cap.card: "UVC Camera (046d:0802)"
[1] cap.bus_info: "usb-bcm2708_usb-1.2.4"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Config palette index 8 (YU12) doesn't work.
[1] Supported palettes:
[1] 0: YUYV (YUV 4:2:2 (YUYV))
[1] 1: MJPG (MJPEG)
[1] Selected palette YUYV
[1] Test palette YUYV (320x240)
[0] Thread 1 - Watchdog timeout, trying to do a graceful restart
[0] httpd - Finishing
[0] httpd Closing
[0] httpd thread exit
[1] Using palette YUYV (320x240) bytesperlines 640 sizeimage 153600 colorspace 00000008
[1] mmap information:
[1] frames=4
[1] 0 length=153600
[1] 1 length=153600
[1] 2 length=153600
[1] 3 length=153600
[1] Error starting stream VIDIOC_STREAMON:
[1] ioctl (VIDIOCGCAP): Invalid argument
[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] Started stream webcam server in port 8081
[1] Thread exiting
[0] Motion thread 1 restart
[1] Thread 1 started
[1] cap.driver: "uvcvideo"
[1] cap.card: "UVC Camera (046d:0802)"
[1] cap.bus_info: "usb-bcm2708_usb-1.2.4"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[1] ioctl (VIDIOCGCAP): Invalid argument
[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] Started stream webcam server in port 8081
[1] Retrying until successful connection with camera
[1] cap.driver: "uvcvideo"
[1] cap.card: "UVC Camera (046d:0802)"
[1] cap.bus_info: "usb-bcm2708_usb-1.2.4"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[1] ioctl (VIDIOCGCAP): Invalid argument
[1] Retrying until successful connection with camera
[1] cap.driver: "uvcvideo"
[1] cap.card: "UVC Camera (046d:0802)"
[1] cap.bus_info: "usb-bcm2708_usb-1.2.4"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[1] ioctl (VIDIOCGCAP): Invalid argument
^C[1] Thread exiting
[0] Motion terminating

Posts: 4
Joined: Fri Jul 27, 2012 12:17 am
by mahjongg » Fri Jul 27, 2012 2:50 pm
maybe it has something to do with the fact that the PI only fully supports a 16-bit palette at this time. See the wiki for more info about 8, 24 and 32 bit palettes.
User avatar
Forum Moderator
Forum Moderator
Posts: 5355
Joined: Sun Mar 11, 2012 12:19 am
by remicek » Fri Jul 27, 2012 3:27 pm
Uh, i thought that it'll work because its on RPi VerifiedPeripherals and some1 http://www.raspberrypi.org/phpBB3/viewtopic.php?p=126543#p126543 on the forum claimed it works. Do i need to change used pallet manually on /etc/motion/motion.conf?
Posts: 4
Joined: Fri Jul 27, 2012 12:17 am
by mahjongg » Fri Jul 27, 2012 3:34 pm
I don't know, i'm just guessing here. Probably you know more about it than I do.
User avatar
Forum Moderator
Forum Moderator
Posts: 5355
Joined: Sun Mar 11, 2012 12:19 am
by pfqueiros » Tue Aug 07, 2012 1:55 am
Try:

Code: Select all
LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libv4l/v4l2convert.so /usr/bin/motion


Your path to v4l2convert.so might not be exactly that one, so please locate it.
Posts: 28
Joined: Sat Aug 04, 2012 3:04 pm
Location: Guimarães, Portugal