Motion dont work


10 posts
by sleipner42 » Tue Jun 26, 2012 7:28 pm
I had set up motion on my raspberry pi but when i open it in firefox with ip:8081 i se one frame then i turns gray and says unable to open video device ;( I run debian squeze and the camera is an eyetoy Somebody knows what wrong?
Posts: 5
Joined: Tue Jun 26, 2012 7:12 pm
by ashbash » Wed Jun 27, 2012 6:54 am
sleipner42 wrote:I had set up motion on my raspberry pi but when i open it in firefox with ip:8081 i se one frame then i turns gray and says unable to open video device ;( I run debian squeze and the camera is an eyetoy Somebody knows what wrong?


Hi, have you updated the firmware on your pi? Have you checked your settings in /etc/motion/motion.conf, try lower widthxheight resolution and make sure your framerate isn't too high.

I found with higher settings (and in absence of hard float) that the Pi cant handle motion much beyond 320x240.

ash

EDIT: check and post your output when you start motion from the terminal, that will help us help you :)
Posts: 50
Joined: Fri Jun 01, 2012 9:20 am
by sleipner42 » Wed Jun 27, 2012 3:22 pm
Yes i have latest update and run on very low settings in motion, 320 x 240 and 2 fps, i see one frame so the webcam works. Here is the output:

It runs fine until first "Corrupt JPEG data: premature end of data segment".

Code: Select all
 pi@raspberrypi:~$ sudo motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3412993 LIBAVFORMAT_BUILD 3415808
[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: "ov519"
[1] cap.card: "EyeToy USB camera Namtai"
[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: JPEG (JPEG)
[1] Selected palette JPEG
[1] Test palette JPEG (320x240)
[1] Using palette JPEG (320x240) bytesperlines 320 sizeimage 29390 colorspace 00000007
[1] found control 0x00980900, "Brightness", range 0,255
[1]     "Brightness", default 127, current 127
[1] found control 0x00980902, "Color", range 0,255
[1]     "Color", default 127, current 127
[1] mmap information:
[1] frames=4
[1] 0 length=32768
[1] 1 length=32768
[1] 2 length=32768
[1] 3 length=32768
[1] Using V4L2
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8081
[1] File of type 8 saved to: /tmp/motion/01-20120627171659.swf
[1] File of type 1 saved to: /tmp/motion/01-20120627171659-01.jpg
[1] File of type 1 saved to: /tmp/motion/01-20120627171700-00.jpg
[1] File of type 1 saved to: /tmp/motion/01-20120627171700-01.jpg
[1] File of type 1 saved to: /tmp/motion/01-20120627171701-00.jpg
[1] File of type 1 saved to: /tmp/motion/01-20120627171701-01.jpg
[1] File of type 1 saved to: /tmp/motion/01-20120627171702-00.jpg
[1] File of type 1 saved to: /tmp/motion/01-20120627171702-01.jpg
[1] File of type 1 saved to: /tmp/motion/01-20120627171703-00.jpg
[1] File of type 1 saved to: /tmp/motion/01-20120627171703-01.jpg
Corrupt JPEG data: premature end of data segment
[1] File of type 1 saved to: /tmp/motion/01-20120627171704-00.jpg
[1] v4l2_next: VIDIOC_DQBUF: EIO (s->pframe 2): Input/output error
[1] File of type 1 saved to: /tmp/motion/01-20120627171704-01.jpg
[1] v4l2_next: VIDIOC_QBUF: Invalid argument
[1] Video device fatal error - Closing video device
[1] Closing video device /dev/video0
[1] File of type 1 saved to: /tmp/motion/01-20120627171708-00.jpg
[1] File of type 1 saved to: /tmp/motion/01-20120627171708-01.jpg
[1] File of type 1 saved to: /tmp/motion/01-20120627171709-00.jpg
[1] File of type 1 saved to: /tmp/motion/01-20120627171709-01.jpg
[1] Retrying until successful connection with camera
[1] cap.driver: "ov519"
[1] cap.card: "EyeToy USB camera Namtai"
[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: JPEG (JPEG)
[1] Selected palette JPEG
[1] Test palette JPEG (320x240)
[1] Using palette JPEG (320x240) bytesperlines 320 sizeimage 29390 colorspace 00000007
[1] found control 0x00980900, "Brightness", range 0,255
[1]     "Brightness", default 127, current 127
[1] found control 0x00980902, "Color", range 0,255
[1]     "Color", default 127, current 127
[1] mmap information:
[1] frames=4
[1] 0 length=32768
[1] 1 length=32768
[1] 2 length=32768
[0] httpd quit
[0] httpd - Read from client
[0] httpd Closing
[0] httpd thread exit
[1] 3 length=32768
[1] Error starting stream VIDIOC_STREAMON: Input/output error
[1] ioctl (VIDIOCGCAP): Inappropriate ioctl for device
[1] File of type 1 saved to: /tmp/motion/01-20120627171710-00.jpg
[1] Thread exiting
[0] Motion terminating
pi@raspberrypi:~$
Posts: 5
Joined: Tue Jun 26, 2012 7:12 pm
by ashbash » Wed Jun 27, 2012 7:03 pm
That doesn't look like a ps3 eye toy to me, is it an old eye toy?
Posts: 50
Joined: Fri Jun 01, 2012 9:20 am
by sleipner42 » Thu Jun 28, 2012 5:54 am
Its the ps2 eyetoy.
Posts: 5
Joined: Tue Jun 26, 2012 7:12 pm
by ashbash » Thu Jun 28, 2012 10:53 am
sleipner42 wrote:Its the ps2 eyetoy.


Is it a previously known supported webcam? I dont think it is ... http://elinux.org/RPi_VerifiedPeripherals#USB_Webcam

:cry:
Posts: 50
Joined: Fri Jun 01, 2012 9:20 am
by sleipner42 » Fri Jun 29, 2012 6:44 am
ashbash wrote:
sleipner42 wrote:Its the ps2 eyetoy.


Is it a previously known supported webcam? I dont think it is ... http://elinux.org/RPi_VerifiedPeripherals#USB_Webcam

:cry:


I tried a logitech quickcam with ext. power and i runs fine a while then i get this same error:
Code: Select all
[1] File of type 1 saved to: /tmp/motion/01-20120629084021-01.jpg
[1] v4l2_next: VIDIOC_QBUF: No such device
[1] Video device fatal error - Closing video device
[1] Closing video device /dev/video0
But the stream start to work again little later unlike the ps2 eyetoy :S
Posts: 5
Joined: Tue Jun 26, 2012 7:12 pm
by gosukuso » Wed Jan 22, 2014 7:35 am
hi i'm having similar problem . grey display on my ip http://172.20.131.149:8081/ when i stream my raspberry pi after enabling motion.
i've enable daemon and all settings running on low frame rates.

please advice . it states unable to open video device. but date and time is running
Posts: 13
Joined: Thu Jan 16, 2014 6:36 am
by gosukuso » Thu Jan 30, 2014 3:14 am
gosukuso wrote:hi i'm having similar problem . grey display on my ip http://172.20.131.149:8081/ when i stream my raspberry pi after enabling motion.
i've enable daemon and all settings running on low frame rates.

please advice . it states unable to open video device. but date and time is running



bumpz pls advice :(
Posts: 13
Joined: Thu Jan 16, 2014 6:36 am
by paali » Mon Feb 03, 2014 12:12 pm
i'm also facing the same problem with my pi. i wanted to check my camera compatibility so i installed mplayer sudo apt-get install mplayer and i got this line running from command line mplayer tv:// driver=412:width=640:height=480:device=/dev/video0 -fps 10

I got the Mplayer frame running with some noise pixels. i was able to capture some image portion but not all the frame was being processed i felt. i'm still trying to get the image from web cam. Please let me know if anyone cracks it.

Regards,
PAL
Posts: 1
Joined: Sat Jan 18, 2014 11:51 am