Skip to content

Instantly share code, notes, and snippets.

@enko
Last active August 29, 2015 14:23
Show Gist options
  • Save enko/e83435105057d1201b29 to your computer and use it in GitHub Desktop.
Save enko/e83435105057d1201b29 to your computer and use it in GitHub Desktop.
A simple webcam timelaspe script. Windows only since [VideoCapture](http://videocapture.sourceforge.net/) runs only on windows.
# -*- coding: utf-8 -*-
import VideoCapture
import datetime
import time
device = VideoCapture.Device()
device.setResolution(1920,1080)
while True:
now = datetime.datetime.now()
filename = "output/image-%d-%d-%dT%d_%d_%d.jpg" % (now.year,now.month,now.day,now.hour,now.minute,now.second)
print filename
device.saveSnapshot(filename,quality=100)
time.sleep(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment