.. Time Bandit 1.0 (uBasic CHDK script)…

A new camera script for the Canon a640, named after one of my favorite childhood films: Time Bandits.

... I wish these guys showed up when I was a kid ...

You will need to use CHDK to run the script.

The user inputs the amount of time in minute and seconds they want to capture. Then they put in the length of the final shot to be created and its frame rate. Presto chango! The camera starts to film the scene at the approriate time interval.

You can tell the camera you want to compress one hour into a ten second film that you will stitch together at 24 frames a second … and so on. You CAN’T have the camera shoot less than every 2 or 3 seconds. It will get really funky.

@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

Problems:
1)uBasic can’t do decimal numbers. 5/2=2. Not good. When estimating the time left to display to the user, it can be really off because of this. (That’s why the script says “About “) The time units calculated are good – it just doesn’t give and accurate report to you – the human.

2)I can’t seem to get it to understand hours. The number in milliseconds may be too large for it to understand.

In the video below, I set the script to turn one hour into ten seconds. The movie below actually caries over for a few minutes. This has been corrected (to a certain degree) in the script above. I recommend shooting with a fixed focus, so that the time it takes to focus is not added into the mix – lengthing your shooting period.

~2 mb

Doube click to play:

Tagged with: , , ,
Posted in camera script, movies, video experiment