sudo apt-get update
sudo apt-get install mplayer
mplayer tv:// driver=412:width=640:height=480:device=/dev/video0 -fps 10
Success - video across the screen.
However when I did:
sudo apt-get motion
(edited motion.conf for same resolution as worked above, and format JPEG)
sudo motion -n
couldn't drive the camera (full details of output below).
[1] v4l2_next: VIDIOC_QBUF: Invalid argument
[1] Video device fatal error - Closing video device
[1] Closing video device /dev/video0
Do you have any idea how to get it working? I don't see any error that I understand.
Thanks in advance
Output from successful mplayer:
Code: Select all
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: USB Camera (046d:0901)
Capabilities: video capture read/write streaming
supported norms:
inputs: 0 = spca500;
Current input: 0
Current format: unknown (0x4745504a)
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Inappropriate ioctl for device
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
vo: couldn't open the X11 display ()!
vo: couldn't open the X11 display ()!
vo: couldn't open the X11 display ()!vailable
VO XOverlay need a subdriver
[VO_SDL] Using driver: fbcon.
vo: couldn't open the X11 display ()!
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 53.35.0 (external)
Mismatching header version 53.32.2
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
==========================================================================
Audio: no sound
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [sdl] 640x480 => 640x480 Planar YV12
v4l2: 701 frames successfully processed, 3 frames dropped.
Code: Select all
[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: "spca500"
[1] cap.card: "USB Camera (046d:0901)"
[1] cap.bus_info: "usb-bcm2708_usb-1.3.1.1"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Test palette JPEG (640x480)
[1] Using palette JPEG (640x480) bytesperlines 640 sizeimage 115790 colorspace 00000007
[1] found control 0x00980900, "Brightness", range 0,255
[1] "Brightness", default 127, current 127
[1] found control 0x00980901, "Contrast", range 0,63
[1] "Contrast", default 31, current 31
[1] found control 0x00980902, "Color", range 0,63
[1] "Color", default 31, current 31
[1] mmap information:
[1] frames=4
[1] 0 length=118784
[1] 1 length=118784
[1] 2 length=118784
[1] 3 length=118784
[1] Using V4L2
[1] Resizing pre_capture buffer to 1 items
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 0): Input/output error
[1] v4l2_next: VIDIOC_QBUF: Invalid argument
[1] v4l2_next: VIDIOC_QBUF: Invalid argument
[1] v4l2_next: VIDIOC_QBUF: Invalid argument
[1] v4l2_next: VIDIOC_QBUF: Invalid argument
[1] Error capturing first image
[1] Started stream webcam server in port 8081
[1] v4l2_next: VIDIOC_QBUF: Invalid argument
[1] Video device fatal error - Closing video device
[1] Closing video device /dev/video0
[1] Retrying until successful connection with camera
[1] cap.driver: "spca500"
[1] cap.card: "USB Camera (046d:0901)"
[1] cap.bus_info: "usb-bcm2708_usb-1.3.1.1"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Test palette JPEG (640x480)
[1] Using palette JPEG (640x480) bytesperlines 640 sizeimage 115790 colorspace 00000007
[1] found control 0x00980900, "Brightness", range 0,255
[1] "Brightness", default 127, current 127
[1] found control 0x00980901, "Contrast", range 0,63
[1] "Contrast", default 31, current 31
[1] found control 0x00980902, "Color", range 0,63
[1] "Color", default 31, current 31
[1] mmap information:
[1] frames=4
[1] 0 length=118784
[1] 1 length=118784
[1] 2 length=118784
[1] 3 length=118784
[1] Using V4L2
...
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 0): Input/output error
[1] v4l2_next: VIDIOC_QBUF: Invalid argument
[1] Video device fatal error - Closing video device
[1] Closing video device /dev/video0
[1] Video signal lost - Adding grey image
[1] Retrying until successful connection with camera
[1] cap.driver: "spca500"
[1] cap.card: "USB Camera (046d:0901)"
[1] cap.bus_info: "usb-bcm2708_usb-1.3.1.1"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Test palette JPEG (640x480)
[1] Using palette JPEG (640x480) bytesperlines 640 sizeimage 115790 colorspace 00000007
[1] found control 0x00980900, "Brightness", range 0,255
[1] "Brightness", default 127, current 127
[1] found control 0x00980901, "Contrast", range 0,63
[1] "Contrast", default 31, current 31
[1] found control 0x00980902, "Color", range 0,63
[1] "Color", default 31, current 31
[1] mmap information:
[1] frames=4
[1] 0 length=118784
[1] 1 length=118784
[1] 2 length=118784
[1] 3 length=118784
[1] Using V4L2
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 0): Input/output error
[1] v4l2_next: VIDIOC_QBUF: Invalid argument
[1] Video device fatal error - Closing video device
[1] Closing video device /dev/video0
[1] Retrying until successful connection with camera
[1] cap.driver: "spca500"
[1] cap.card: "USB Camera (046d:0901)"
[1] cap.bus_info: "usb-bcm2708_usb-1.3.1.1"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Test palette JPEG (640x480)
[1] Using palette JPEG (640x480) bytesperlines 640 sizeimage 115790 colorspace 00000007
[1] found control 0x00980900, "Brightness", range 0,255
[1] "Brightness", default 127, current 127
[1] found control 0x00980901, "Contrast", range 0,63
[1] "Contrast", default 31, current 31
[1] found control 0x00980902, "Color", range 0,63
[1] "Color", default 31, current 31
[1] mmap information:
[1] frames=4
[1] 0 length=118784
[1] 1 length=118784
[1] 2 length=118784
[1] 3 length=118784
[1] Using V4L2
pi@raspberrypi ~/bin $