Looped recording video - Script Writing - CHDK Forum  

Looped recording video

  • 3 Replies
  • 2344 Views
Looped recording video
« on: 20 / March / 2010, 22:29:10 »
Advertisements
Hello

It is possible to record video script cyclic?
The idea is to put camera in the car and take evidence if there is an accident. Video camera running continuously until power off. And recording when power on returns.
It would also be very useful for surveillance. Only in cases of theft or event, it stops recording. Having recorded the last hours (or minutes). Ideal as a supplement to motion detection.

It's very very useful and can not find it here.

You can take videos of 5 or 10 minutes and automatically delete the oldest?
It is a way to do it.

Sorry for my bad English.

Thank you.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Looped recording video
« Reply #1 on: 21 / March / 2010, 08:44:52 »
This has been discussed before, try to find the old thread (I can't remember if anyone cooked up a real script for this).

In short, this is possible but not reliable for shooting car crashes because it's very likely that the camera will lose power during the crash (or when parking, actually, unless you build smarter power handling for the camera). Loss of power means the camera will fail to save the video file properly, possibly losing or corrupting the entire file or the entire filesystem on the SD card. A DIY computer forensics sort of a person may be able to retrieve the video data of interest, though.

it is possible to write a Lua script that will shoot video for a given time, stop, delete an older one and restart. If you shoot reasonably long videos, those pauses are not excessively likely to happen during a crash. It is also possible to set any script autostart at camera power-on, and it is possible to have the camera startup upon rise of external power by mechanically forcing the power button down permanently or (the better choice) rewiring it to external electronics.

But basically... to make sure your SD card filesystem won't get corrupted (even during normal car crash free use), you need to build external power electronics to buffer some energy for your camera power supply and e.g. use the USB remote trigger to start and stop to signal the script to stop video record and power off whenever car 12 V voltage is lost (and to not start until you have enough energy buffered for a safe startup + shutdown sequence).


Re: Looped recording video
« Reply #2 on: 22 / March / 2010, 15:12:06 »
I see no problem in power. There are many solutions.
Loop recording is very useful for surveillance. Please, you know where I can find a script to delete a file, or read the creation date?, So I could learn how.
Where can I find information on the commands you can make a script?


Thank you and sorry for my bad English.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Looped recording video
« Reply #3 on: 22 / March / 2010, 15:59:40 »
I see no problem in power. There are many solutions.
Loop recording is very useful for surveillance. Please, you know where I can find a script to delete a file, or read the creation date?, So I could learn how.
Where can I find information on the commands you can make a script?

A monolithic & more reliably powered camera would be better for car crash purposes. Note for instance that your camera's internal battery gets disconnected upon connection of external power meaning the camera shuts down immediately upon loss of external power (and external supply connector is no good under mechanical stress) -- it does not revert back to battery power.

Anyway, mattkime's lua libs may be of help:
http://chdk.setepontos.com/index.php/topic,3291.msg34010.html#msg34010.


 

Related Topics