from picamera import PiCamera
from time import sleep
camera = PiCamera
camera.hflip = True #camera ad effetto specchio (flip orizzontale)
def registra_video():
camera.start_recording('video.h264')
camera.start_preview()
def stop_video():
camera.stop_recording()
camera.stop_preview()
while True:
registra_video()
这是第一个草图,然后该功能将由运动传感器的输出进行管理,但现在我已经在循环中尝试开始录制和预览,但我得到的错误在标题。为什么呢?
抱歉,我是python和raspberry开发中的菜鸟。