Friday, March 11, 2016

Python Web Cam Time lapse

I was tired of using this bloated Java software to do my time captures. So I did a couple searches and found out Python can do it in just a few lines of code.

First I had to install pygame. I had some trouble doing this using the standard PIP command. I ended up finding the whl here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame

I downloaded the whl file and ran

pip install pygame-1.9.2a0-cp27-none-win32.whl

From there I found a quick sample script to capture image. I had multiple cameras on my laptop so I just disabled the one I didn't want. I assume you can pick a camera using pygame but "ain't nobody got time for that".

So this will loop through 1000 times snapping a picture every 5 minutes. I turned it loose and will see what happens over the weekend.


0 comments:

Post a Comment