Il ne faut jamais gifler un sourd. Il perd la moitié du plaisir. il sent la gifle mais ne l'entend pas. Georges Courteline
Howto make Video monitoring
Video monitoring HowTo Author: Van hees Michel <michel_AT_vanhees.cc> Contributor: Wednesday,
|
|
|
|
Problem: You want to make video |
|
|
STEP 1: On your SME 5.6 probe your webcam
:
modprobe videodev
Depends on your webcam install type one of the
following
modprobe stv680 or modprobe cpia(See this
list) or modprobe ov511 (See
this list)
# modprobe videodev # modprobe stv680 or modprobe cpia or modprobe ov511 |
STEP 2:
size=2> Install vidcat RPM
Available
href="modules.php?op=modload&name=CmodsDownload&file=index&req=viewdownloaddetails&lid=129&ttitle=vidcat-0.7.2-2.i386.rpm">here
Make test to be sure, every thing working fine
Other format type(jpg,png) are not working
# rpm |
STEP 3: Install Motion 2.6.3 (Source
: http://motion.sourceforge.net)
Availabe
href="modules.php?op=modload&name=CmodsDownload&file=index&req=viewdownloaddetails&lid=127&ttitle=motion-2.6.3-1.i386.rpm">here
Motion take photo when it detect some movement
in front of your webcam.
After installing RPM, config example are in /usr/local/etc/
You need to launch motion from the directory
where the config file are.
# rpm -ivh --nodeps motion-2.6.3-1.i386.rpm |
STEP 4: Install mpeg_encode
Available
href="modules.php?op=modload&name=CmodsDownload&file=index&req=viewdownloaddetails&lid=128&ttitle=mpeg_encode-1.5b-4.i386.rpm">here
Motion can make mpg file of all pictures take,
mpg_encode is needed.
Uncomment line #mpeg_encode yes in the config
file
# rpm -ivh --nodeps mpeg_encode-1.5b-4.i386.rpm |
STEP 5: Making template of config
file
Create new directory
for the template
Copy the example
of the config file
# |
STEP 6: Create startup script
Create a shell script
in your startup directory
Include the following
line :
#!/bin/sh
# Description : Starts and stops an video survey
#/etc/rc.d/init.d/motion
MOTION_CONFIG_FILE=/etc/motion.conf
. /etc/rc.d/init.d/functions
case "$1" in
start)
KIND="MOTION"
echo -n $"Starting $KIND services: "
modprobe videodev
sleep 5
modprobe stv680
sleep 2
daemon /usr/local/bin/motion -f $MOTION_CONFIG_FILE -D
echo
;;
stop)
KIND="MOTION"
echo -n $"Shutting down $KIND services: "
killproc /usr/local/bin/motion
sleep 4
rmmod stv680
sleep 2
rmmod videodev
echo
;;
status)
status /usr/local/bin/motion
;;
*) echo "Usage: $0 { start,stop,status}"
exit 1
esac
exit 0
Adapte
line modprobe stv680 and rmmod stv680 with the parametre for your webcam
# # enter the script <CTRL-o><CTRL-x> |
STEP 7: See result
Motion create many
subdirectory beginning with ./[year]/[month]/[day]
Movie are placed in that directory.
Some more directory may exist, it contains pictures.