The example seems to be missing an import of Preview.
And also needs a QT preview 'option' set. (Because of the RGB888 format used)Edit PS if running outwith a GUI a Preview.DRM should also work - not checked though!
And also needs a QT preview 'option' set. (Because of the RGB888 format used)
Code:
from picamera2 import Picamera2,Previewfrom picamera2.encoders import H264Encoderfrom picamera2.outputs import CircularOutputlsize = (320, 240)picam2 = Picamera2(0)video_config = picam2.create_video_configuration(main={"size": (1280, 720), "format": "RGB888"}, lores={ "size": lsize, "format": "YUV420"})picam2.configure(video_config)picam2.start_preview(Preview.QT)
Statistics: Posted by sandyol — Wed Feb 21, 2024 1:10 pm