supplierdeeply

In-camera Video Editing

  • 8 Replies
  • 1438 Views
*

Offline Davo

  • ***
  • 143
In-camera Video Editing
« on: 16 / April / 2013, 06:06:45 »
Advertisements
Hi,

I have now got my DaveCam video motion detection script to work pretty reliably and it is detailed here.

http://chdk.wikia.com/wiki/Birding_with_CHDK#DaveCam_Script

It continuously records a series of video clips, deletes any clips without motion detection events and then produces a single edited clip file containing all the detected events. It will also add frames before or after each event.

Many thanks to the gurus who helped me with this - especially Waterwingz for the new motion detection routine.

Feel free to try it out and let me know of any problems.

Dave

Re: In-camera Video Editing
« Reply #1 on: 22 / February / 2015, 04:23:38 »
I look forward to try this script. I see that is written for A810, which other models could be used?

*

Offline Davo

  • ***
  • 143
Re: In-camera Video Editing
« Reply #2 on: 22 / February / 2015, 05:38:10 »
I look forward to try this script. I see that is written for A810, which other models could be used?

I think it would work with any CHDK camera. The script is very simple but you may need to change a few lines to suit whatever camera you get. I got your pm and it sounds like a very interesting project but I am not an expert on the Canon range. Why not copy it here and tap into the wealth of experience on this forum?

One thing I would say is that the generated AviSynth file seems to be a bit flaky with the .MOV files my A810 generates when I load it in VirtualDub. Maybe try for a camera that creates .AVI? (if Canon do this)

fyi, there is another thread on here about weatherproof camera enclosures.

Dave

Re: In-camera Video Editing
« Reply #3 on: 26 / February / 2015, 12:50:45 »
Thanks for reply. I didn't manage to run it on my G9, but I have bought A2200 and will try this next week  :)

Quote
The script is very simple but you may need to change a few lines to suit whatever camera you get.

I wish I knew how to do this...


*

Offline Davo

  • ***
  • 143
Re: In-camera Video Editing
« Reply #4 on: 27 / February / 2015, 04:40:50 »
Quote
I wish I knew how to do this...

It's very easy and you may not even have to do it if my script works OK with your new cam. Lua is a doddle and you already have my script as the starting point. There is also an extremely helpful bunch on the board who will help you.

Tip - get NotePad++ to code on.

Re: In-camera Video Editing
« Reply #5 on: 27 / February / 2015, 05:20:13 »
Quote
Tip - get NotePad++ to code on.
I will give it a try  :)

Re: In-camera Video Editing
« Reply #6 on: 10 / April / 2015, 12:46:58 »
Hi,

Just received a A810 and its now running by the use of this script :D Looking forward to testing it properly.

Regards,
Kes

Re: In-camera Video Editing
« Reply #7 on: 15 / April / 2015, 03:16:58 »
I am currently running the Davecam script on my PowerShot A810. The script works and I wish to optimize the parameters for my needs.

I will arrange a “cafeteria” experiment providing different food for a small passerine bird. I wish to record every visit. Each visit is expected to be short (5-10 sec), and only one visitor will be present simultaneously. Each experiment will last for about 1 hour. For later analyses I wish to access each unique video clip (i.e. each visit).

I need some help on choosing the right parameters, I have provided what I think will be the proper settings and also have some questions, see below.

Subject distance (cm) - the camera focus is locked at this distance. Use default 20 cm
Video FPS - the frame rate of your video. Use default 30 fps
Trigger threshold - change in scene brightness that will trigger the start of an event. [i]Use default 30 fps[/i]
Release threshold - the event will be judged to have ended when the scene brightness returns to within this value. Use default 10
Grid options - standard motion detection grid options. Use default 0
Detection lag 1/10s - time taken for camera to recognise an event (my A810 value is 14). Use default 14, not sure what the pros/cons will be for lower and higher value…
Interval between events (s) - time to wait for a subsequent event before closing the clip. Allows for several closely spaced events on each clip. I am not sure what this means, but would it be better with a higher value in case the feeding site is visited frequently? If set to “0”, then it will need to close the clip for each visit?
Longest event (s) - maximum event duration. Used to prevent false events keeping clip open. 20 sec should be a good margin since I expect each visit to last for about 5-10 sec
Frames before event - adds frames to AviSynth file before event occurs. This lets you see the bird landing. I will use 60 frames (i.e. s sec)
Frames after event - similar to above. I will use 60 frames (i.e. s sec)
Clip length (s) - clip will be deleted if no events occur during this time. Not sure what will be the most optimal.

Hope I could get some help on this.

Best regards,
Kes


*

Offline Davo

  • ***
  • 143
Re: In-camera Video Editing
« Reply #8 on: 15 / April / 2015, 04:08:52 »
Sounds very interesting to me as a keen twitcher. What I suggest is that you do a dummy run first with dummy birds (cutout on a stick) to check the script out and fine tune the variables. Specific answers to your queries are:

Interval between events (s): This is to catch multiple visits on one clip if needed. For instance, set it to 10s and the script will wait 10s after the latest event has ended before it closes the current video file. If another visit occurs within 10s then the clip will keep recording.

Clip length: I would leave this at 300s which means you could have 300s of nothing with a visit at the end. However, the AviSynth edl will show only the visit.

Hope you will post some results,
Dave

 

Related Topics