from picamera2 import Picamera2 picam2=Picamera2() picam2.start() picam2.capture_file("image1.jpg") picam2.stop() #from picamera2 import Picamera2 #picam2=Picamera2() #picam2.start_and_record_video("image.mp4", duration = 10)