Circular video recording possible? - Feature Requests - CHDK Forum

Circular video recording possible?

  • 2 Replies
  • 6080 Views
Circular video recording possible?
« on: 27 / December / 2010, 06:53:19 »
Advertisements
Hello everyone, I'm new to CHDK but already deeply impressed with the possibilities it opens up!
I'm thinking of a security camera like application, doing circular video recording, but I don't know if that's possible or not.

Is it technically possible to have the camera alternate between 2 or more output files, switching over after a predefined duration or file size? This would then function as a kind of circular buffer. If something interesting happens, you can just stop the recording; by playing the video fragments in the correct order, you always have nearly a memory card's worth of video data leading up to that event (for N possible fragments, you'll have N-1 complete fragments and 1 smaller fragment where the recording was stopped).

*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
Re: Circular video recording possible?
« Reply #1 on: 27 / December / 2010, 11:24:31 »
...I'm thinking of a security camera like application, doing circular video recording, but I don't know if that's possible or not.
There is a script that you might want to check out: Motion detect surveillance camera "mdCCTV". Here is a link http://chdk.setepontos.com/index.php?topic=1596.msg14337#msg14337

I modified @fudgey's script ("mdCCTV-20080603.bas") from his posting to work on my SX20 IS. http://chdk.setepontos.com/index.php?topic=1596.msg55688#msg55688

I got distracted, so I didn't test it any further other than to make sure it recognized movement and it triggered the video recording. It's not the "circular" script you mentioned, but could probably be modified to fit your needs. The script would save space on the card, however if the movement wasn't sufficient to trigger the recording to start you might miss some of the actions. That's where a "circular" recording as you mentioned might be needed in your case. At least it's a starting point. Good luck!
« Last Edit: 27 / December / 2010, 11:26:35 by SkyWalker9 »

*

Offline reyalp

  • ******
  • 14118
Re: Circular video recording possible?
« Reply #2 on: 27 / December / 2010, 12:19:56 »
You can delete files from lua, so you could make a script recorded for set intervals, and started deleting the oldest files once the SD card was nearly full. Note that the camera probably won't want to run indefinitely like this, so you'd have to throw in a reboot occasionally too.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal