|
|
|
|
| Author |
Message |
webonomic Guest
|
Posted: Thu Nov 30, 2006 9:36 pm Post subject: Webcam time interval solutions |
|
|
Is there any software out there, open source or not, to give me full
control over my webcam?
I want to do something like record a new video every 5 minutes.
Further to that, I don't want the video to begin using up too much hard
drive space. So when there are around 4 interval videos (totalling 20
minutes of record time), the earliest created one should be deleted.
I could use 2 separate solutions. The first is software to create
video in intervals and save it to my local machine.
The second is some sort of solution to delete a file if 4 video's
exist. On Linux, this would probably have been easy (cron and some
scripting). On Windows, who the heck knows how to solve this (Batch
programming maybe, or maybe cygwin would help). I suppose I could
program a file-watcher of sorts in .Net/C#, but I rather hope there is
some flexible stuff out there already. Maybe a perl script I could run
using the Windows scheduler?
I need to figure this out for security reasons.
j. |
|
| Back to top |
|
 |
|
|
(PeteCresswell) Guest
|
Posted: Thu Nov 30, 2006 11:48 pm Post subject: Re: Webcam time interval solutions |
|
|
Per webonomic:
| Quote: | The second is some sort of solution to delete a file if 4 video's
exist. On Linux, this would probably have been easy (cron and some
scripting). On Windows, who the heck knows how to solve this (Batch
programming maybe, or maybe cygwin would help).
|
Here's a .BAT file that I wrote to keep 30 backup copies of a file database.
It's a little different from your situation in that it all hinges on the fact
that it only runs at night - when nobody's using the DB.
But at least you can get a little bit of the syntax....
--------------------------------------------------------------------------
:* --------------------- Begin ---------------------------
:*
:* PROGRAM: CEP_BAK.BAT
:* AUTHOR: Pete Cresswell
:* DATE: 11/24/97 (original version)
:* PURPOSE: To keep 30 copies of the Charitable
:* Endowment database.
:* ADSTAR only keeps 3. To be used until
:* a better solution is available.
:*
:* REQUIRED: (nothing)
:*
:* -------------------------------------------------------
ECHO OFF
:* ---------------------------------------
:* Set app description, source DB location and backup directory
SET bakDir=\\VCEP\Charity\Backups
SET srcDir=\\VCEP\Charity"
SET bakDir=\\DevSrv4\Charity\CepTest\Backups
SET srcDir=\\DevSrv4\Charity\CepTest
SET srcName=Cep_Dat
SET srcType=mdb
SET appDescr=Charity DB Backup
SET batFileName=CEP_BAK.BAT"
:* ---------------------------------------
:* See if source DB exists
if NOT EXIST %srcDir%\%srcName%.%srcType% GOTO NoGotSource
:* ---------------------------------------
:* Ensure that backup directory exists
MD %bakDir%
:* ---------------------------------------
:* Delete oldest backup copy
DEL %bakDir%\%srcName%.30
:* ---------------------------------------
:* Rename existing files
RENAME %bakDir%\%srcName%.29 *.30
RENAME %bakDir%\%srcName%.28 *.29
RENAME %bakDir%\%srcName%.27 *.28
RENAME %bakDir%\%srcName%.26 *.27
RENAME %bakDir%\%srcName%.25 *.26
RENAME %bakDir%\%srcName%.24 *.25
RENAME %bakDir%\%srcName%.23 *.24
RENAME %bakDir%\%srcName%.22 *.23
RENAME %bakDir%\%srcName%.21 *.22
RENAME %bakDir%\%srcName%.20 *.21
RENAME %bakDir%\%srcName%.19 *.20
RENAME %bakDir%\%srcName%.18 *.19
RENAME %bakDir%\%srcName%.17 *.18
RENAME %bakDir%\%srcName%.16 *.17
RENAME %bakDir%\%srcName%.15 *.16
RENAME %bakDir%\%srcName%.14 *.15
RENAME %bakDir%\%srcName%.13 *.14
RENAME %bakDir%\%srcName%.12 *.13
RENAME %bakDir%\%srcName%.11 *.12
RENAME %bakDir%\%srcName%.10 *.11
RENAME %bakDir%\%srcName%.09 *.10
RENAME %bakDir%\%srcName%.08 *.09
RENAME %bakDir%\%srcName%.07 *.08
RENAME %bakDir%\%srcName%.06 *.07
RENAME %bakDir%\%srcName%.05 *.06
RENAME %bakDir%\%srcName%.04 *.05
RENAME %bakDir%\%srcName%.03 *.04
RENAME %bakDir%\%srcName%.02 *.03
RENAME %bakDir%\%srcName%.01 *.02
RENAME %bakDir%\%srcName%.00 *.01
:* ---------------------------------------
:* Copy current DB to backups
COPY %srcDir%\%srcName%.%srcType% %bakDir%\%srcName%.00
ECHO OFF
CLS
ECHO .------------ %appDescr%
ECHO .
ECHO . Backup completed.
ECHO .
ECHO . %batFileName%
ECHO .
ECHO .------------------------------------------
PAUSE
EXIT
:NoGotSource
ECHO OFF
CLS
ECHO .------------ Cannot Run %appDescr%
ECHO .
ECHO . %srcDir%\%srcName%.%srcType% not found.
ECHO .
ECHO . %batFileName%
ECHO .
ECHO .------------------------------------------
PAUSE
EXIT
:* ---------------------- End ----------------------------
--
PeteCresswell |
|
| Back to top |
|
 |
Simon Guest
|
Posted: Fri Dec 08, 2006 11:31 pm Post subject: Re: Webcam time interval solutions |
|
|
"webonomic" <webonomic@gmail.com> wrote in message
news:1164900996.057677.266260@l12g2000cwl.googlegroups.com...
| Quote: | Is there any software out there, open source or not, to give me full
control over my webcam?
I want to do something like record a new video every 5 minutes.
Further to that, I don't want the video to begin using up too much hard
drive space. So when there are around 4 interval videos (totalling 20
minutes of record time), the earliest created one should be deleted.
I could use 2 separate solutions. The first is software to create
video in intervals and save it to my local machine.
The second is some sort of solution to delete a file if 4 video's
exist. On Linux, this would probably have been easy (cron and some
scripting). On Windows, who the heck knows how to solve this (Batch
programming maybe, or maybe cygwin would help). I suppose I could
program a file-watcher of sorts in .Net/C#, but I rather hope there is
some flexible stuff out there already. Maybe a perl script I could run
using the Windows scheduler?
I need to figure this out for security reasons.
j.
|
If you don't mind doing some coding:
You can do all these things in Java using the Java Media Framework (JMF).
The Lundycam website at http://www.sgurr.co.uk/lundycam/index.html uses the
JMF to grab frames from a webcam and do various stuff to them. I've also
used it to grab video sequences from webcams. OTOH, the JMF doesn't seem to
be well supported and isn't the most stable API I've ever used.
If you don't mind spending some more money, one of the Axis Communications
cameras will probably allow you to do whatever you want. Their APIs are
based on HTTP so you have a wider choice of programming languages, and
compared to JMF I've found them to be easier to use and more stable. |
|
| Back to top |
|
 |
|
|
| |