Logitech, Inc. Webcam C270 on Raspberry Pi
14. Mai 2015 Hinterlasse einen Kommentar
Just a small note. I tried to get my Logitech, Inc. Webcam C270 running on an raspberry pi v1 running raspbian wheezy and ran into some problems.
The webcam can be used on linux with the uvcvideo kernel module but using uvccapture did not work for me.
$ dmesg uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825) input: UVC Camera (046d:0825) as /devices/.../input/input0 usbcore: registered new interface driver uvcvideo
Running uvccapture:
$ uvccapture ERROR opening V4L interface : No such file or directory
Mplayer didn’t work either with various settings – producing green only images.
mplayer tv:// -tv driver=v4l2:device=/dev/video0 -vo png -frames 1
Then I found out there is a limited set of formats your camera can deliver and how to display:
$ v4l2-ctl --list-formats -d /dev/video0 ioctl: VIDIOC_ENUM_FMT Index : 0 Type : Video Capture Pixel Format: 'YUYV' Name : YUV 4:2:2 (YUYV) Index : 1 Type : Video Capture Pixel Format: 'MJPG' (compressed) Name : MJPEG
Seems like I can capture images in YUYV Format and MJPEG directly. This led me to vgrabbj which seems to be a highly flexible image grabber. The following command works for me:
$ vgrabbj -q 100 -i vga -o jpg -f /tmp/snap.jpg -e -d /dev/video0
So, give vgrabbj a try.