PDA

View Full Version : webcam, 'motion' software



kf6kmx
15th September 2004, 12:52 PM
I may have asked this before, but I dont think so..
Anyone using the software "motion" for webcam?
http://www.lavrsen.dk/sources/webcam/motion_guide.htm
I'm trying to set it up on a webcam, but every time I try to install it I get dependancies that I cant satisfy.
I'm wondering if anyone has successfully set it up in FC2 or if it just wont work in it..

Below is the output of the make command:


gcc -g -O2 -I/usr/local/include -DHAVE_CURL -DHAVE_FFMPEG -Wall -DVERSION=\"3.1.16\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\" -c -o motion.o motion.c
In file included from motion.c:22:
ffmpeg.h:5:22: avformat.h: No such file or directory
In file included from motion.c:22:
ffmpeg.h:10: error: syntax error before "AVFormatContext"
ffmpeg.h:10: warning: no semicolon at end of struct or union
ffmpeg.h:11: warning: type defaults to `int' in declaration of `video_st'
ffmpeg.h:11: warning: data definition has no type or storage class
ffmpeg.h:12: error: syntax error before '*' token
ffmpeg.h:12: warning: type defaults to `int' in declaration of `c'
ffmpeg.h:12: warning: data definition has no type or storage class
ffmpeg.h:14: error: syntax error before '*' token
ffmpeg.h:14: warning: type defaults to `int' in declaration of `picture'
ffmpeg.h:14: warning: data definition has no type or storage class
ffmpeg.h:15: error: syntax error before '*' token
ffmpeg.h:15: warning: type defaults to `int' in declaration of `video_outbuf'
ffmpeg.h:15: warning: data definition has no type or storage class
ffmpeg.h:31: error: syntax error before '}' token
make: *** [motion.o] Error 1


yet when I run ./configure it show


************************
* Configure status *
************************

pthread Support: Yes
jpeg Support: Yes
Curl Support: Yes
V4L included: Yes
FFmpeg Support: Yes
xmlrpc-c Support: No
MYSQL Support: No
PostgreSQL Support: No

showing that FFmpeg support IS installed.. First program I've tried to use that uses FFmpeg, so I have no idea if there is something weird with its install or not..


Or is there anoither good, stand alone, stilll capture software that you can suggest to feed stills to a website.. I'm doing a 60sec capture cycle, and saying the last 10hrs of still (it doubles as a 'security' cam).

Thanks

xorp
15th September 2004, 05:01 PM
Been using motion on a FC1 machine for sometime know.

What version of motion are you trying to build?

I'll see what results I get on my FC2 machine.

xorp
16th September 2004, 02:04 AM
Looks like your building 3.1.16, get the same error here.

If you did make install in the ffmeg-version, looks like avformat.h is located at:
/usr/locol/include/ffmpeg/

Seems to me, based on the compile line in your post, #include "avformat.h"
should be
#include <ffmpeg/avformat.h>

kf6kmx
16th September 2004, 04:07 AM
Looks like your building 3.1.16, get the same error here.

If you did make install in the ffmeg-version, looks like avformat.h is located at:
/usr/locol/include/ffmpeg/

Seems to me, based on the compile line in your post, #include "avformat.h"
should be
#include <ffmpeg/avformat.h>

Thanks! Got it compiled.. But I dont think its working.. I try running it and it drops out, without appearing to save anything..
I have a Logitech pro 4000.. its on /dev/video0 I think ( thats the only device option that motion says its able to open, all other /dev/video* cause non-open errors)

Thanks

kf6kmx
16th September 2004, 04:33 AM
Dont know if this gives any clues as to my problem, but when I run motion, it turns on the camera status led, turns it right back off, and gives the result:


Thread0 device: /dev/video0 input: 8


I try camE and get the same status light blink, and the following:


can't load font arial/8
can't load offline image /home/kf6kmx/.block.jpg, ignoring
ioctl VIDIOCMCAPTURE: Numerical result out of range
no image captured


And in gspy I get:


VIDIOCMCAPTURE failed
image capture failed


All refer to the VIDIOCMCAPTURE...


Thanks

xorp
21st September 2004, 05:06 PM
Are you logged into X when you run motion, or are you logged into the command line/terminal?

kf6kmx
21st September 2004, 05:58 PM
Are you logged into X when you run motion, or are you logged into the command line/terminal?

Logged into X when I try each of the programs listed in my previous post.. I drop to a terminal window.. dont remember off hand which terminal it is in..

xorp
25th September 2004, 02:13 AM
Logged into X when I try each of the programs listed in my previous post.. I drop to a terminal window.. dont remember off hand which terminal it is in..

I did not think it was a permission problem, since the driver is turning on the LED, but just wanted to make double sure it was not.

Are you using the pwc module for the Pro 4000?

xorp
25th September 2004, 02:22 AM
One more thing, after trying to run motion, camE, or Gspy. Log in a root, and do:

tail /var/log/messages

Do you see anything pertaining to the camera?

Liunx in general leaves some pretty good bread crumb trails, I should have though of that one earlier.

majnam2002
9th July 2005, 04:32 PM
I cannot get Motion to install, rpm complains of libpq.so.3 missing, but I have installed postgresql-libs and postgresql-devel which privides that file.

and then I get this when I run make, configure seems fine:

************************
* Configure status *
************************

pthread Support: Yes
jpeg Support: Yes
V4L included: Yes
FFmpeg Support: Yes
MYSQL Support: Yes
PostgreSQL Support: Yes

CFLAGS: -I/usr/include/ffmpeg -g -O2 -DHAVE_FFMPEG -DHAVE_MYSQL -I /usr/include/ mysql -DHAVE_PGSQL -I/usr/include -DTYPE_32BIT="int" -DHAVE_BSWAP -march=i686
LIBS: -lm -lpthread -ljpeg -L/usr/lib -lavformat -lavcodec -lm -lz -L/usr/lib/my sql -lmysqlclient -lz -L/usr/lib/pgsql -lpq
LDFLAGS: -Wl,-rpath,/usr/lib

Install prefix: /usr/local

[root@localhost motion-3.2.1]# make clean
Welcome to the setup procedure for Motion, the motion detection daemon! If you g et
error messages during this procedure, please report them to the mailing list. Th e
Motion Guide contains all information you should need to get Motion up and runni ng.
Run "make updateguide" to download the latest version of the Motion Guide.

Version: 3.2.1
Platform: Linux (if this is incorrect, please read README.FreeBSD)

Removing compiled files and binaries...
[root@localhost motion-3.2.1]# make
Welcome to the setup procedure for Motion, the motion detection daemon! If you g et
error messages during this procedure, please report them to the mailing list. Th e
Motion Guide contains all information you should need to get Motion up and runni ng.
Run "make updateguide" to download the latest version of the Motion Guide.

Version: 3.2.1
Platform: Linux (if this is incorrect, please read README.FreeBSD)

Generating dependencies, please wait...

Compiling Motion object files...
----snip
--------
motion.c:185: warning: pointer targets in passing argument 5 of ‘alg_draw_locati on’ differ in signedness
motion.c:187: warning: pointer targets in passing argument 4 of ‘alg_switchfilte r’ differ in signedness
motion.c:203: warning: pointer targets in passing argument 3 of ‘event’ differ i n signedness
motion.c:221: warning: pointer targets in passing argument 3 of ‘event’ differ i n signedness
motion.c:229: warning: pointer targets in passing argument 3 of ‘event’ differ i n signedness
motion.c:237: warning: pointer targets in passing argument 3 of ‘event’ differ i n signedness
motion.c:243: warning: pointer targets in passing argument 5 of ‘alg_draw_locati on’ differ in signedness
motion.c:254: warning: pointer targets in passing argument 5 of ‘alg_draw_locati on’ differ in signedness
motion.c:264: warning: pointer targets in passing argument 3 of ‘event’ differ i n signedness
motion.c: In function ‘motion_loop’:
motion.c:480: warning: pointer targets in assignment differ in signedness
motion.c:565: warning: pointer targets in assignment differ in signedness
motion.c:700: warning: pointer targets in passing argument 1 of ‘draw_text’ diff er in signedness
motion.c:708: warning: pointer targets in passing argument 1 of ‘draw_text’ diff er in signedness
motion.c:710: warning: pointer targets in passing argument 1 of ‘draw_text’ diff er in signedness
motion.c:717: warning: pointer targets in passing argument 1 of ‘draw_text’ diff er in signedness
motion.c:724: warning: pointer targets in passing argument 1 of ‘draw_text’ diff er in signedness
motion.c:853: warning: pointer targets in passing argument 3 of ‘event’ differ i n signedness
motion.c:918: warning: pointer targets in passing argument 3 of ‘event’ differ i n signedness
motion.c:934: warning: pointer targets in passing argument 3 of ‘event’ differ i n signedness
motion.c:936: warning: pointer targets in passing argument 3 of ‘event’ differ i n signedness
motion.c:937: warning: pointer targets in passing argument 3 of ‘event’ differ i n signedness

----------- snip ----------------------------------

ffmpeg.c: In function ‘mpeg1_write_trailer’:
ffmpeg.c:111: warning: pointer targets in passing argument 2 of ‘put_buffer’ differ in signedness
ffmpeg.c: In function ‘ffmpeg_open’:
ffmpeg.c:275: error: ‘struct AVCodecContext’ has no member named ‘frame_rate’
ffmpeg.c:276: error: ‘struct AVCodecContext’ has no member named ‘frame_rate_base’
make: *** [ffmpeg.o] Error 1
[root@localhost motion-3.2.1]#

bitrain
9th July 2005, 07:14 PM
run ./configure -CC=gcc32 (or small letters cc, I don't know that) This will use gcc version 3 which is less strict than gcc 4
You will need to have gcc-compat installed

sbsoo111
17th November 2005, 03:13 AM
./configure CC=gcc32 is the correct command