Qbasic *cough* *cough*
Be careful, or you'll sound like a barbarian
Tcsh should be much to your liking then. OK back on topic I guess ...
Qbasic *cough* *cough*
Be careful, or you'll sound like a barbarian
Tcsh should be much to your liking then. OK back on topic I guess ...
hey don't underestimate the sheer power of qbasic
anyway, this is the latest version of the script, which gives a harddrive time to spin down by temporary storing the files in /tmp/imag
I tested it, and it worked great
here it is:
another example of the script result:Code:#!/bin/sh #Seconds of sleep before doing another copy SLEEP=15 #Source JPG file that needs to be copied. SOURCEJPG=/var/tmp/display.jpg #Output folder which will contain all the JPG files OUTPUT=/mnt/webcamimages #Choose between a counting name or date(not working yet) #COUNTING or DATE MODE=COUNTING #Optimize for Harddrive spindown? (TRUE or FALSE) OPTIMIZE=TRUE #Save files up to ... in flash #The max size of an jpeg file is about 65KB so 65*150=9,75MB wich leaves enough of the ~14,5MB flash. #And if the images are taken every 15sec you will leave the hdd untouched for 37min! #Please keep in mind that if you set it too high there won't be memory left in /tmp FLASHSAVE=150 #Flash directory to save in FLASHDIR=/tmp/imag COUNT=0 if [ $OPTIMIZE="TRUE" ]; then if ( [ ! -d $FLASHDIR ] ); then /bin/mkdir $FLASHDIR fi /bin/rm $FLASHDIR/* if [ $MODE="COUNTING" ]; then while /bin/true; do for i in $(seq 1 $FLASHSAVE); do /bin/cp $SOURCEJPG $FLASHDIR/$COUNT.jpg COUNT=$(($COUNT + 1)) /bin/sleep $SLEEP done /bin/cp $FLASHDIR/* $OUTPUT/ /bin/rm $FLASHDIR/* done fi else if [ $MODE="DATE" ]; then while /bin/true; do for i in $(seq 1 $FLASHSAVE); do /bin/cp $SOURCEJPG $FLASHDIR/img\_$(/bin/date '+%Y%m%d_%H%M%S').jpg /bin/sleep $SLEEP done /bin/cp $FLASHDIR/* $OUTPUT/ /bin/rm $FLASHDIR/* done fi fi else if [ $OPTIMIZE="FALSE" ]; then if [ $MODE="COUNTING" ]; then while /bin/true; do /bin/cp $SOURCEJPG $OUTPUT/$COUNT.jpg COUNT=$(($COUNT + 1)) /bin/sleep $SLEEP done fi else if [ $MODE="DATE" ]; then while /bin/true; do /bin/cp $SOURCEJPG $OUTPUT/img\_$(/bin/date '+%Y%m%d_%H%M%S').jpg /bin/sleep $SLEEP done fi fi
http://www.youtube.com/watch?v=5LW9RsETEBk
Thanks wpte & Edp -
This is great, I spent some time trying the rcamd commands but with no luck...
what does the -r setting do?
and why does it record 6 files - record0.jpg - record5.jpg?Code:rcamd -p 7777 -s 4 -z MET-1METDST,M3.5.0/2,M10.5.0/3 -a 0 -t 0 -r 0 -f 640x480 -m 100 -c 100 &
Really appreciate this, as there was no chance of me solving this in such an elegant way
Velcrow
Last edited by velcrow; 25-07-2009 at 19:48.
what about using the -h parameter
for me it only records 3 shotsCode:rcamd -h Usage: rcamd [options] -d <debug level> -m <max difference threshold=0-255> (lower->more updates, default=30) -s <seconds between frames> (default==1) -f <WidthxHeight obey supported size> define size of the output image (default:640x480) -p <port to listen for connections> -b <brightness=1-500> (default=400 available only cameratype=1) -g <gain=0-4> corresponding to a gain of 2^<gain> (default=0) -t <cameratype=0,1> corresponding to a camera driver (0:pwc or 1:ov511 default=0) -r <record interval=0-65535> (default=60 minutes) -a <alert=0,1> define if alert is on or off) -s <max count for difference threshold=0-999999> (default=100) -z <time zone string>
but I don't understand completely... couldn't you get the bash script working?
Last edited by wpte; 25-07-2009 at 20:48.
-h lol
No script is great - - just trying to see if rcamd has any "native" commands that could be used.
One question where should the script be created / saved - /opt/sbin/?
I plan to use cron to gzip the folder at night
Thanks again for the help...
Last edited by velcrow; 25-07-2009 at 21:28.
Thanks Edp - Yes, makes sense.
rcamd - our (my) misunderstood friend.
Does anyone have a webcam running on WL-500gP v2? I have two different cameras which no go. I checked them with spca, pwc and ovc and they are not recognized. Spent to much time trying make it work. Give me please a webcam name which is working for sure under Oleg or dd-wrt firmware and I will buy it.
Check out the WL500g Reported Compatible Hardware > Webcams section.