I managed to get motion working with my pi and playstation eye remarkably easily.
However, it does not work at 640 x 480.
One thing I note is that others have only mentioned running the motion command as non-superuser.
If I do so, it reports the following -
Code: Select all
[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
...
[1] Adjusting resolution from 352x288 to 320x240.
[1] Using palette YUYV (320x240) bytesperlines 640 sizeimage 153600 colorspace 00000008
...
To get it to heed the /etc/motion/motion.conf settings, I have to -
sudo motion
Doing this seems to work fine, so long as the resolution specified is no larger than 320 x 240. I can see it dumping out jpgs when it detects movement, I can see the live stream on 8081 and I can see the admin/configuration web page too.
However, as soon as I try to run it at 640 x 480 (the resolution of the playstation eye), it reports errors.
Code: Select all
$ sudo motion -n
[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
[0] motion-httpd: waiting for data on port TCP 8080
[1] Thread 1 started
[1] cap.driver: "ov534"
[1] cap.card: "USB Camera-B3.03.09.3"
[1] cap.bus_info: "usb-bcm2708_usb-1.3.2.1"
[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: YUYV (YUYV)
[1] Selected palette YUYV
[1] Test palette YUYV (640x480)
[1] Using palette YUYV (640x480) bytesperlines 1280 sizeimage 614400 colorspace 00000008
[1] found control 0x00980900, "Brightness", range 0,255
[1] "Brightness", default 0, current 0
[1] found control 0x00980901, "Contrast", range 0,255
[1] "Contrast", default 32, current 32
[1] found control 0x00980911, "Exposure", range 0,255
[1] "Exposure", default 120, current 120
[1] found control 0x00980912, "Auto Gain", range 0,1
[1] "Auto Gain", default 1, current 1
[1] found control 0x00980913, "Main Gain", range 0,63
[1] "Main Gain", default 20, current 20
[1] mmap information:
[1] frames=4
[1] 0 length=614400
[1] 1 length=614400
[1] 2 length=614400
[1] 3 length=614400
[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
The output is almost identical to that of my successful 320 x 240 configuration. Just showing the few differences -
Code: Select all
...
[1] Test palette YUYV (320x240)
[1] Using palette YUYV (320x240) bytesperlines 640 sizeimage 153600 colorspace 00000008
...
[1] frames=4
[1] 0 length=155648
[1] 1 length=155648
[1] 2 length=155648
[1] 3 length=155648
...
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8081
So, the 640x480 version appears to break just after the "Resizing pre_capture buffer..." and before "Started stream webcam server ...". I wonder whether an internal buffer has failed to be allocated at the larger size but then why would no one else get this?
I'm running the 28-10-2012 wheezy rasbian image (with recent update/upgrade) on a Model B (Rev.2) with plenty of filesystem space but I see there's a new one (16-12-2012) which I'll try... However, I'm interested to know if anyone else with a playstation eye does or, especially, does not have this issue. Are there any visible differences between my broken 640 x 480 configured output and yours? Any ideas before I try to figure out how to learn to debug this?