from picamera import PiCamera
from time import sleep


def take_video(time):
    camera = PiCamera()	
    camera.start_preview()
    camera.start_recording('/home/pi/patniChipy2019/working-code/video-result.h264')
    sleep(time)
    camera.stop_recording()
    camera.stop_preview()


def take_photo():
    camera = PiCamera()
    camera.resolution = (1024, 768)
    camera.start_preview()
    sleep(3)
    camera.capture("/home/pi/patniChipy2019/working_code/photo.jpg")



