Thank you.
With a minor adjustment, I was able to get it working - autofocus worked!
I changed line 22:lines 84-87 were replaced with the following:Thank you again!
With a minor adjustment, I was able to get it working - autofocus worked!
I changed line 22:
Code:
<img src="stream.mjpg" width="1280" height="960" />
Code:
# Initialize the camerapicam2 = Picamera2()# Configure the camera for video mode with autofocus enabledcamera_config = picam2.create_video_configuration(main={"size": (1280, 960)})picam2.configure(camera_config)# Enable autofocuspicam2.set_controls({"AfMode": 2}) # AfMode = 2 means continuous autofocus (auto mode)output = StreamingOutput()picam2.start_recording(MJPEGEncoder(), FileOutput(output))
Statistics: Posted by JohnA5656 — Thu Oct 17, 2024 7:23 pm