This is a little test of time lapse photography using CHDK to take the pictures and ffmpeg to put together the video.
I think it was pretty neat. Of course I wish I had set the interval to 15 or 30 seconds to get a smoother transition it was a good test.
The script that I used is a simple LUA script that I edited from the CHDK wiki/forum:
--[[
@title My First Intervalometer
@param a Shooting interval, min
@default a 0
@param b ...sec
@default b 10
@param c max number of shots
@default c 0
--]]
Interval = a*60000 + b*1000
if c == 0 then Shots = 9999 else Shots = c end
function TakePicture()
press("shoot_half")
repeat sleep(50) until get_shooting() == true
press("shoot_full")
release("shoot_full")
repeat sleep(50) until get_shooting() == false
release "shoot_half"
end
Shot = 0;
while (Shot < Shots) do
StartTick = get_tick_count()
TakePicture()
print("Waiting: " .. Shot .. " of " .. Shots);
sleep(Interval - (get_tick_count() - StartTick))
Shot = Shot + 1;
end
(original code here)
To convert the pictures to video I had to rename the files. I did this with a little help from the scripting guys at Microsoft:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='C:/Users/Nicholas/Desktop/TL - buttercups'} Where " _
& "ResultClass = CIM_DataFile")
count = 0
For Each objFile In colFileList
strNewName = objFile.Drive & objFile.Path & "img-" & _
count & "." & objFile.Extension
errResult = objFile.Rename(strNewName)
count = count + 1
Next
and then I use ffmpeg to convert these to mp4:
C:/Users/Nicholas/Desktop/TL - buttercups>k:/ImageMagick-6.6.8-9/ffmpeg.exe -r 10 -b 2Mb/s -i img-%02d.jpg out.mp4
I also did some long exposure test as well and the camera works very well BUT here is an area where RAW files are very important. The JPGs come out very dark even if they seem ok in the camera. It is important to note that photography in general and especially CHDK photography is NOT WYSIWYG!
I have also done a POC on a USB remote trigger. With my camera I seem to need about 5v to register the trigger but thats not a problem. I don't know if I will have a change to use this but I have some ideas that I would like to play with if I can find the time.
0 Comments On This Entry
Tags
My Blog Links
Recent Entries
-
-
-
-
-
CHDK: Programming Photography IIon Apr 07 2011 02:10 PM
Recent Comments
Search My Blog
0 user(s) viewing
0 member(s)
0 anonymous member(s)
|
|



Leave Comment










|