Intervalometer - Script Writing - CHDK Forum supplierdeeply

Intervalometer

  • 7 Replies
  • 2838 Views
Intervalometer
« on: 12 / September / 2013, 11:07:37 »
Advertisements
HI,

I would like achieve an reliable intervalometer with my powershot SX230HS.
But I really disappointed because my camera take picture as it want.... But not when I want...


My actual code is thereafter, must take one picture by seconde. Maybe you could see an error?

 repeat
   stime=get_tick_count()
   repeat
      sleep(20)
   until(get_exp_count()~=ecnt)
   release("shoot_full_only")

   sleep(1000 - (get_tick_count() - stime))
until (false)

Re: Intervalometer
« Reply #1 on: 12 / September / 2013, 11:15:56 »
 
Code: [Select]
sleep(1000 - (get_tick_count() - stime))
You problem is most likely related to your camera not being able to shoot at 1 shot per second.  Many Canon P&S cameras can only maintain a rate of just under 2 seconds per shot. 

In the code sample you posted,  CHDK will try to  sleep for a negative time interval if the camera takes more than 1 second to complete the shot.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Intervalometer
« Reply #2 on: 12 / September / 2013, 16:57:33 »
If you really-really need 1 shoot per second or even higher fps you can just record a movie, then, on PC, convert it into separated frames, take every n-th frame (n depends on recorded movie and the desired fps) and convert them back into a movie. Walk around, but works!
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: Intervalometer
« Reply #3 on: 13 / September / 2013, 01:09:31 »
If you really-really need 1 shoot per second or even higher fps you can.......
Or you can read through this thread,  download one of the patch files, compile your own version of CHDK, and use lapsers script.

http://chdk.setepontos.com/index.php?topic=8997.0
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Intervalometer
« Reply #4 on: 25 / September / 2013, 10:00:09 »
This script and continuous mode, SD4000 IS (IXUS 300 HS) can record one DNG under 2 seconds all the time.

Code: [Select]
press("shoot_full")
while(true)do sleep(1000) end

This script can take one DNG every 5+ seconds, but 4 seconds or lower and the camera will often skip shoots and simply wait until next shooting.

Code: [Select]
repeat
start = get_tick_count()

press("shoot_half")
repeat
    sleep(50)
    until get_shooting() == true
click("shoot_full")
release("shoot_half")
   
    sleep(a*1000 - (get_tick_count() - start))
until ( false )

Why that script can't keep up with anything lower than 5 seconds even though this camera can take one DNG every 2 seconds? I would like to have reliable interval shooting for 3-4 seconds because 5+ seconds is sometimes too high. This script is same as comes with CHDK, but I had to replace shoot() because the default script does nothing, if I lock AE via Canon's UI.
« Last Edit: 25 / September / 2013, 10:03:22 by Fotoni »

Re: Intervalometer
« Reply #5 on: 25 / September / 2013, 15:58:36 »
Why that script can't keep up with anything lower than 5 seconds even though this camera can take one DNG every 2 seconds?

Your first script causes the camera to focus and set exposure once when the script starts.  Your second script does this before every shot.   That accounts for the time difference between scripts.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Intervalometer
« Reply #6 on: 26 / September / 2013, 04:29:41 »
This doesn't do any better. Sometimes I get like 3 shots with 3 seconds interval, then one shot with 6 seconds interval and so on.
Code: [Select]
repeat
    start = get_tick_count()
   
repeat
    sleep(50)
    until get_shooting() == true
click("shoot_full")
   
    sleep(a*1000 - (get_tick_count() - start))
until ( false )

Weird thing is that when I don't use AEL from Canon's UI, the script actually performs better like taking about 6 shots with 3 seconds interval, then one with 6 seconds interval, etc. Screen is filled with black pixels between shots and it stays black longer with AEL lock. I have disabled review time.

When camera is taking shots with this script, the light blink red and orange/yellow
Code: [Select]
press("shoot_full")
while(true)do sleep(1000) end
but with those interval scripts, it only blink red. I wonder what causes the delays between shots with those interval scripts, if the camera actually could do 3 seconds interval somehow?

EDIT

It seems that this script can keep up with 3 seconds interval. I took about 60 shots and every of them stayed in 3 seconds delay. I used cell phone stopwatch (crude way :D) to measure it.

Code: [Select]
press("shoot_half")

repeat
start = get_tick_count()


repeat
    sleep(50)
    until get_shooting() == true
click("shoot_full_only")
   
    sleep(a*1000 - (get_tick_count() - start))
until ( false )

press("shoot_half") works with click("shoot_full_only"), but it doesn't work with click("shoot_full") when talking about 3 seconds interval and using AEL from Canon's UI. Basically I just removed release("shoot_half") and moved press("shoot_half") out of the loop. 
« Last Edit: 26 / September / 2013, 04:56:56 by Fotoni »

*

Offline lapser

  • *****
  • 1093
Re: Intervalometer
« Reply #7 on: 26 / September / 2013, 14:19:02 »
It seems that this script can keep up with 3 seconds interval. I took about 60 shots and every of them stayed in 3 seconds delay. I used cell phone stopwatch (crude way :D) to measure it.
get_shooting() is always true when shoot_half is pressed.

click("shoot_full") is equivalent to:
  press("shoot_half")
  press("shoot_full_only")
  release("shoot_full_only")
  release("shoot_half")

press("shoot_half") focuses and measures exposure. Then, get_shooting() becomes true when it's finished. It takes a second or two depending on lighting conditions and how hard it is to acquire focus.

Code: [Select]
press("shoot_half")
repeat sleep(10) until get_shooting()
repeat
  click("shoot_full_only")
  sleep(3000) -- or whatever interval you want
until false
You can see what's happening, without CHDK, by holding the shutter down half way, then repeatedly pressing it all the way down, then releasing it half way. You can only go so fast until is starts missing pictures.

To take pictures at night, i.e. with long exposures, the best way is just to hold shoot_full in continuous mode, as you discovered. You can set the exposure manually, or with the CHDK overrides in the menu, and just do:

Code: [Select]
press("shoot_full")
repeat until false

I always use sleep(10) in wait loops, since 10 msec is the minimum sleep time possible. A longer sleep time just delays the exit from the wait loop by a random amount.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos


 

Related Topics