Page 1 of 1

Idiot trying to set up motion... help

Posted: Wed Jul 02, 2014 8:20 pm
by r00x
Hi! I can't get motion to run. It's killing me.

I've looked at numerous guides online, they all more or less follow the same steps. I'm at the stage I should be able to run motion and connect to it via web browser.

When run from command line (motion -n) it bombs out with a segfault (last few lines of output follow):

Code: Select all

[1] 0 length=40960
[1] 1 length=40960
[1] 2 length=40960
[1] 3 length=40960
[1] Using V4L2
[1] Resizing pre_capture buffer to 1 items
Segmentation fault
If I run it as root (sudo motion -n) it bombs out in the exact same place but doesn't report a segfault.

Once (once it went further, firing up and beginning to snap photos (all of which were grey, but had text overlayed inside them). Stopping and attempting to load it again went back to the above behaviour.

I am able to view my webcam output using mplayer with:

Code: Select all

mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -fps 1
which works just fine, so the camera appears to be OK.

Entire output from motion to follow in second post (guess I need to copy it from the RPi).

Re: Idiot trying to set up motion... help

Posted: Wed Jul 02, 2014 8:24 pm
by r00x
Output from Motion (motion -n):

Code: Select all

pi@raspberrypi ~ $ 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 3478785
[0] Motion running in setup mode.
[0] Thread 1 is from /etc/motion/motion.conf
[0] Thread 1 is device: /dev/video0 input 8
[0] Webcam port 8081
[0] Waiting for threads to finish, pid: 14592
[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: "spca1528"
[1] cap.card: "General Image Devic"
[1] cap.bus_info: "usb-bcm2708_usb-1.3"
[1] cap.capabilities=0x85000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Test palette JPEG (320x240)
[1] Using palette JPEG (320x240) bytesperlines 320 sizeimage 38990 colorspace 00000007
[1] found control 0x00980900, "Brightness", range 0,255 
[1] 	"Brightness", default 128, current 128
[1] found control 0x00980901, "Contrast", range 0,8 
[1] 	"Contrast", default 1, current 1
[1] found control 0x00980902, "Saturation", range 0,8 
[1] 	"Saturation", default 1, current 1
[1] found control 0x00980903, "Hue", range 0,255 
[1] 	"Hue", default 0, current 0
[1] mmap information:
[1] frames=4
[1] 0 length=40960
[1] 1 length=40960
[1] 2 length=40960
[1] 3 length=40960
[1] Using V4L2
[1] Resizing pre_capture buffer to 1 items
Segmentation fault
Output from mplayer:

Code: Select all

pi@raspberrypi ~ $ mplayer tv:// driver=412:width=640:height=480:device=/dev/video0 -fps 1
MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
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: General Image Devic
 Capabilities:  video capture  read/write  streaming
 supported norms:
 inputs: 0 = spca1528;
 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
[VO_XV] It seems there is no Xvideo support for your video card available.
[VO_XV] Run 'xvinfo' to verify its Xv support and read
[VO_XV] DOCS/HTML/en/video.html#xv!
[VO_XV] See 'mplayer -vo help' for other (non-xv) video out drivers.
[VO_XV] Try -vo x11.
[gl] no GLX support present
==========================================================================
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: [x11] 640x480 => 640x480 Planar YV12 
[swscaler @ 0xb647b640]No accelerated colorspace conversion found from yuv420p to rgb565le.
[swscaler @ 0xb647b640]using unscaled yuv420p -> rgb565le special converter
V:   0.0  26/ 26 ??% ??% ??,?% 0 0 
No bind found for key 'CTRL-c'.
V:   0.0  51/ 51 ??% ??% ??,?% 0 0 


MPlayer interrupted by signal 2 in module: flip_page
V:   0.0  52/ 52 ??% ??% ??,?% 0 0 
v4l2: ioctl set mute failed: Invalid argument
v4l2: 53 frames successfully processed, 46 frames dropped.

Exiting... (Quit)


Re: Idiot trying to set up motion... help

Posted: Sun Aug 30, 2015 9:34 am
by biGdada
sorry to necro an old thread, but i am experiencing the same (with same driver, spca1528).
motion works ok with another usb cam.
have you resolved this issue?