20 lines
295 B
Python
20 lines
295 B
Python
from picamera import PiCamera
|
|
from time import sleep
|
|
|
|
camera = PiCamera()
|
|
|
|
|
|
camera.resolution = (640, 480)
|
|
|
|
#camera.start_preview()
|
|
|
|
print()
|
|
camera.start_recording('/home/pi/Desktop/video.h264')
|
|
|
|
camera.wait_recording(5)
|
|
|
|
camera.stop_recording()
|
|
camera.close()
|
|
|
|
print("video recording stopped")
|