Skip to content

Instantly share code, notes, and snippets.

@suadanwar
Created October 2, 2020 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suadanwar/c8578708cb5d35bd2e7c94f8d974df6f to your computer and use it in GitHub Desktop.
Save suadanwar/c8578708cb5d35bd2e7c94f8d974df6f to your computer and use it in GitHub Desktop.
This sample code is for Getting Started with Raspberry Pi Camera(Record A Video).
from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.rotation = 180
camera.start_preview(fullscreen = False, window = (1300,10,640,480))
camera.start_recording('/home/pi/Desktop/video.h264')
sleep(5)
camera.stop_recording()
camera.stop_preview()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment