Hi all!
I have been some days with my new raspberry pi trying to setup motion properly.
I have been testing with fswebcam and the results were fine - image was captured - so i guess the webcam is working:
$this->bbcode_second_pass_code('', '[jonander@OuterHeaven ~]$ sudo fswebcam test1.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Adjusting resolution from 384x288 to 320x232.
--- Capturing frame...
Captured frame in 0.00 seconds.
--- Processing captured image...
Writing JPEG image to 'test1.jpg'.
')
Now, I installed motion and its depends, but when I try to run it, i guess these messages:
$this->bbcode_second_pass_code('', '[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Unknown config option "sql_log_image"
[0] Unknown config option "sql_log_snapshot"
[0] Unknown config option "sql_log_mpeg"
[0] Unknown config option "sql_log_timelapse"
[0] Unknown config option "sql_query"
[0] Motion 3.2.12 Started
[0] Exit motion, cannot create process id file (pid file) /var/run/motion/motion.pid: No such file or directory
[0] Motion going to daemon mode
')
Commenting out the sql entries in the config file should be way to go? is this correct?
Also, manually creating the folder /var/run/motion?
If I do these two things, motion seems to work, but then I get this message:
$this->bbcode_second_pass_code('', 'motion.service - Motion daemon
Loaded: loaded (/usr/lib/systemd/system/motion.service; disabled)
Active: active (running) since Fri 2014-01-10 21:56:50 CET; 24s ago
Process: 1008 ExecStart=/usr/bin/motion (code=exited, status=0/SUCCESS)
Main PID: 1009 (motion)
CGroup: /system.slice/motion.service
`-1009 /usr/bin/motion
Jan 10 21:57:13 OuterHeaven motion[1009]: [1] Restarting Motion thread to reinitialize all image buffers to new picture dimensions
Jan 10 21:57:13 OuterHeaven motion[1009]: [1] Calling vid_close() from motion_cleanup
Jan 10 21:57:13 OuterHeaven motion[1009]: [1] Closing video device /dev/video0
Jan 10 21:57:14 OuterHeaven motion[1009]: [0] Motion thread 1 restart
Jan 10 21:57:14 OuterHeaven motion[1009]: [1] Thread 1 started
Jan 10 21:57:14 OuterHeaven motion[1009]: [1] config image height (232) is not modulo 16
Jan 10 21:57:14 OuterHeaven motion[1009]: [1] Could not fetch initial image from camera
Jan 10 21:57:14 OuterHeaven motion[1009]: [1] Motion continues using width and height from config file(s)
Jan 10 21:57:14 OuterHeaven motion[1009]: [1] Resizing pre_capture buffer to 1 items
Jan 10 21:57:14 OuterHeaven motion[1009]: [1] Started stream webcam server in port 8081
')
And I'm stuck here..... the webcam is detected right:
$this->bbcode_second_pass_code('', '[ 918.199266] usb 1-1.2: New USB device found, idVendor=0ac8, idProduct=307b
[ 918.199303] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 918.199322] usb 1-1.2: Product: PC Camera
[ 918.199337] usb 1-1.2: Manufacturer: Vimicro Corp.
[ 918.413992] media: Linux media interface: v0.10
[ 918.443744] Linux video capture interface: v2.00
[ 918.465702] gspca_main: v2.14.0 registered
[ 918.477553] gspca_main: gspca_zc3xx-2.14.0 probing 0ac8:307b
[ 919.234615] input: gspca_zc3xx as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/input/input0
[ 919.238726] usbcore: registered new interface driver gspca_zc3xx
')
Thanks!!
EDIT/UPDATE:
The tests i mentioned previously were wrong... the image wasn't right, so, I'm testing another webcam, but I'm getting this issue:
$this->bbcode_second_pass_code('', 'Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Adjusting resolution from 384x288 to 352x288.
--- Capturing frame...
spca561_decode() failed
Captured frame in 0.00 seconds.
--- Processing captured image...
Writing JPEG image to 'test0.jpg'.
')