Skip to content

Instantly share code, notes, and snippets.

@mathiasose
Created September 29, 2015 16:27
Show Gist options
  • Select an option

  • Save mathiasose/508295f6b0a9f9172fd6 to your computer and use it in GitHub Desktop.

Select an option

Save mathiasose/508295f6b0a9f9172fd6 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3.4
from picamera import PiCamera
from sys import stdout
RES = (640, 480)
FPS = 30
STREAM = stdout.buffer
with PiCamera(resolution=RES, framerate=FPS) as cam:
cam.start_recording(STREAM, format='rgb')
try:
while True: pass
except KeyboardInterrupt:
cam.stop_recording()
exit(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment