You are not logged in.
Hi All
I have installed a couple of cameras at a friends property, all are working fine. The only supported motion detection system by the cameras is to upload a jpg to an ftp server. I am trying to write a script that monitors or the presence of such a jpg file, records for a few seconds then delete's the jpg file and waits for the new trigger. I am having problems with deetecting the file. Please bash kings (and queens) come to my rescue
#!/bin/bash
#Motion recorder script for edimax cameras
#Triggers from camera software
hall="/home/david/hall"
lounge="/home/david/lounge"
#Video output directories
hallout="/home/david/hall"
loungeout="/home/david/lounge"
#Record run time in seconds
halltime=5
loungetime=15
#Stream paths
hallstream=http://admin:pwd@192.168.2.11/mjpg/video.mjpg
loungestream=http://admin:pwd@192.168.2.12/mjpg/video.mjpg
while true
do
for F in $hall/motion*.jpg
do
rm $hall/*.jpg & curl -sS -o $hallout/`date +%y-%m-%d %T`.mjpg -m $halltime $hallstream
done
for F in $lounge/motion*.jpg
do
rm $lounge/*.jpg & curl -sS -o $loungeout/`date +%y-%m-%d %T`.mjpg -m $loungetime $loungestream
done
done
Offline
The motion detectors built into cameras almost always are horrid.
Use this instead. It is packaged in community.
Offline
Offline