Time Bandit!!! - Completed and Working Scripts - CHDK Forum

Time Bandit!!!

  • 6 Replies
  • 10141 Views
*

Offline ab

  • *
  • 17
Time Bandit!!!
« on: 20 / May / 2008, 00:13:27 »
Advertisements
This script can be seen in action on my blog:

 .. Time Bandit 1.0 (uBasic CHDK script)… @ Arman Bohn


How long do you want to shoot for?

How long do you want your movie to be?

What frame rate is your final film going to be?

Answer these questions and Time Bandit will do the math!

The script reports "about" how long the camera will pause in between shots.

Hints:

Don't shoot any timelapse in which the shooting speed is less than 3 seconds in between frames. Certain cards are faster than others so the script needs about a three second buffer.

I repeat - It is not exact!  It approximates! [Problem is ... CHDK can't do decimals so number get rounded]

The script is based on cards that write at x150.  Your milage may vary...


@title Time Bandit

@param b Time to capture (min)
@default b 0
@param c Time to capture (sec)
@default c 0
@param e Time output (min)
@default e 0
@param f Time output (sec)
@default f 0
@param g frame rate
@default g 24

c=c*1000
b=b*60000
e=e*60000
f=f*1000
t=b+c
o=e+f
o=o/1000
o=o*g
print "# of frames ",o
t=t/o
w=(t/1000)*o
for s = 1 to o
   print "shot # ",s," of ",o
   print "Waiting about ",(t/1000)," sec"
   print "About " , w/60; "min", " left"
   shoot
   sleep (t-3000)
   w=(t/1000)*(o-s-1)
next s





*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: Time Bandit!!!
« Reply #1 on: 20 / May / 2008, 02:27:29 »
if you are worried about rounding, you can get MUCH better results reversing the order of certain operations, when you first divide and then multiply:

fictional case

let's say t=3800 and o=7

w=(t/1000)*o

the exact result is 26.6

If you do the operations in your order you get:
(3500/1000) -> 3
3*7 -> 21 (huge rounding error)

Try and reverse the operations: w=(t*o)/1000
3800*7 -> 26,600
26,600/1000 -> 26 (reasonable rounding error)

The result is much closer to the exact one.

The same is true in every case when you first divide and then multiply, for example:
Code: [Select]
o=o/1000
o=o*g
and:
Code: [Select]
w=(t/1000)*(o-s-1)

*

Offline ab

  • *
  • 17
Re: Time Bandit!!!
« Reply #2 on: 21 / May / 2008, 12:42:22 »
Thanks ... I'll check this out.

I think the problem is mostly in the way it conveys the estimated time to the user.

Re: Time Bandit!!!
« Reply #3 on: 21 / May / 2008, 20:19:25 »
I just posted a script with a mode similar to yours. Mine rounds all intervals down to the nearest second, so it's a bit different.
Flexible Intervelometer Script

*

Offline ab

  • *
  • 17
Re: Time Bandit!!!
« Reply #4 on: 21 / May / 2008, 20:41:43 »
cool ... I'll test it out!

Re: Time Bandit!!!
« Reply #5 on: 26 / May / 2008, 23:04:17 »
It crashes on my sd 700 IS, but other timelapse scripts seem to work.

*

Offline ab

  • *
  • 17
Re: Time Bandit!!!
« Reply #6 on: 27 / May / 2008, 00:25:12 »
What parameters are you inputing?


 

Related Topics


SimplePortal © 2008-2014, SimplePortal