I looked into the documentation of the picamera and wondered whether there would be a way to use the splitter option to have the picamera capture a video in 640x480 and asynchronously capture stills in three different resolutions: 1296x972, 640x480 and 2592x1944. So far I am using this command to capture the video.
camera = picamera.PiCamera() camera.resolution = (2592, 1944) camera.framerate = 24 camera.start_recording(output, splitter_port=1, format='yuv', resize=(640,480))
I now run a web server with three endpoints in a different thread accessing the same camera object.
camera.capture('./hd.png', format='png', use_video_port=True) camera.capture('./sd.png', format='png', resize=(1296,972), use_video_port=True) camera.capture('./mb.png', format='png', resize=(640,480), use_video_port=True)
However this does not seem to work or rather it takes forever to take a still and sometimes it does not work at all.