In-camera Video Editing

  • 15 Replies
  • 2095 Views
Re: In-camera Video Editing
« Reply #10 on: 02 / December / 2017, 09:16:20 »
Advertisements
then an error says: Error failed to load mdetect.flt
That error means you have not installed CHDK correctly on your SD card.  There are files missing.  What steps did you follow when you put the CHDK software onto your card?
Ported : A1200  SD940  G10  Powershot N  G16*

Re: In-camera Video Editing
« Reply #11 on: 03 / December / 2017, 03:59:29 »
This is quite strange, as i'm able to use other scripts involving motion detection succesfully, as well as other different scripts like various intervalometers, etc. This is the first time a received an error message, and i thought is was because of camera model's functions name or similar...

*

Offline srsa_4c

  • ******
  • 3474
Re: In-camera Video Editing
« Reply #12 on: 03 / December / 2017, 07:27:11 »
FWIW, the script appears to start video recording right after it is started. The first call to md_detect_motion() happens later. On many (or all?) cameras, CHDK file operations stop working when a video is being recorded. So, when the script attempts to call md_detect_motion(), the underlying module (mdetect.flt) can no longer load.

Yimiblu:
Try enabling "Enable Unsafe IO" in the miscellaneous menu and see if that makes a difference. Or, you could try changing
Code: [Select]
press("video")
sleep(2000)
release("video")
 
-- Get original scene
zones = md_detect_motion( ma, mb, mc, 200, 100, 900, mg, mh, mi, mj, mk, ml, mm, mn, mo, mp)
fill_md_array(md_original)
into
Code: [Select]
-- Get original scene
zones = md_detect_motion( ma, mb, mc, 200, 100, 900, mg, mh, mi, mj, mk, ml, mm, mn, mo, mp)
fill_md_array(md_original)

press("video")
sleep(2000)
release("video")
I don't know whether it will work, though.

*

Offline Davo

  • ***
  • 144
Re: In-camera Video Editing
« Reply #13 on: 03 / December / 2017, 08:12:43 »
It's been 4 years since I wrote this so I had to refresh my memory before I answered. Not sure why it don't work on your cam but you have some ideas above to try. It works fine on my A810.

I actually rewrote this as a Windows app so I could use my non-Canon cameras. The app scans a collection of video files and extracts those scenes with motion. The difference is that it now combines the motion events in a Shotcut video edit file which will load in the free Shotcut video editor. However, DaveCam has the advantage that it deletes unwanted video files as it goes along so you don't need a huge card.

If I was going to code DaveCam again I would definitely export to Shotcut. You could try this yourself as you would only need to change the lines that write to the AviSynth file (assuming you get it to work first).


Re: In-camera Video Editing
« Reply #14 on: 03 / December / 2017, 14:37:16 »
Thank you men!
I'll try to make those changes.
The 'only' thing i'd like to get is to reecord some video after motion_detection, as a Wildlife trap-cam but with better quality.

I'm playing with other diy 'gadgets' last year, using Arduino and Raspberry Pi, exploring posibilities of PIR sensors, IR barriers, laser barriers, and so on, and i think that the option of using this cam as 'sensor+camera' all in one could give interesting results... As i'm pretty new in CHDK and it's scripting universe, i need some time to understand lots of new things! Sorry for the brick :D

thank you again, for your time, your knowledge and your patience. :)

Re: In-camera Video Editing
« Reply #15 on: 03 / December / 2017, 14:47:05 »
The 'only' thing i'd like to get is to record some video after motion_detection, as a Wildlife trap-cam but with better quality.
Well, FWIW the most popular "motion detection" script for CHDK also supports exactly what you are looking for.

link> MDFB2013.lua

You will probably want to read the bug notes about using video starting at line 394 in the MDFB2013.txt documentation file included with the script download.  No "show stoppers" but something you'll probably want to verify on your camera.
« Last Edit: 03 / December / 2017, 15:11:34 by waterwingz »
Ported : A1200  SD940  G10  Powershot N  G16*

 

Related Topics