Created
November 19, 2017 11:57
-
-
Save ftpyz/1b44d961fd9eff19c83fbb2f5c8c1aec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#!/usr/bin/python | |
from client import RaspiKameraClient | |
import datetime,picamera | |
def recordVideo(): | |
try: | |
with picamera.PiCamera() as camera: | |
camera=picamera.PiCamera() | |
camera.framerate = 25 | |
camera.annotate_background = picamera.Color('black') | |
camera.resolution = (640, 480) | |
camera.start_preview() | |
camera.annotate_text = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') | |
camera.start_recording('%s.h264' % file_name) # dosya formatı | |
camera.wait_recording(60*60) # 1 saat kayıt yap | |
camera.stop_recording() | |
except Exception as st: | |
print str(st) | |
if __name__ == "__main__": | |
recordVideo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment