Last night's storms were pretty interesting. I wasn't having much luck getting Zach's CHDK Canon A470 to capture lightning, so I decided to set my Nikon D50 to take 2 second exposures every 2 seconds and hope to get some lighting. I didn't realize it at the time, but I was also taking a time lapse. Here is the video that resulted
https://www.youtube.com/watch?v=7o1mZ4EjZ0I and the stills with the most lightning
http://imgur.com/a/MpkfF#0
I used a linux program called gphoto2 that runs from the command line and connected to my camera over USB to pull all the pictures down directly to my computer. Unfortunately this slowed things down a bit and I ended up with about 5 seconds between each 2 second exposure. I then used mencoder to compile all the pictures into a timelapse.
The code if anyone is interested:
gphoto2 -I 2 --capture-image-and-download --filename lightning%n.jpg
Run this in the directory you want the pictures to be in, you may need to look into a way to get leading zeros on the file name numbering, mencoder doesn't recognize that lightning2 comes before lightning3 and not before lightning20.
mencoder mf://*.JPG -o ../lightning.avi -ovc x264 -oac mp3lame -x264encopts subq=5:8x8dct:frameref=2:bframes=3:b_pyramid=normal:weight_b: -mf fps=24 -vf scale=1920:1080