camera-streamer icon indicating copy to clipboard operation
camera-streamer copied to clipboard

Request: Snapshot delay

Open giddyhup opened this issue 1 year ago • 2 comments

I am trying to create snapshots for a time-lapse project. I do this by CURLing the snapshot endpoint. It appears my (V3) pi camera the API returns a picture before the camera completed its adjustments. The pictures appear over- or underexposed. It makes sense that this only happens when there is no client connected to watch a stream.

When I stop the service and use libcamera-jpeg (with sudo, regrettably) I can see output in the console which looks like it is taking over hundred samples before a file gets saved.

Is there a better way to solve this other than faking a streaming client?

giddyhup avatar Feb 28 '23 16:02 giddyhup

I need to correct myself. The output I was observing comes from the preview. When I disable it the image appears faster (still not at once). The request remains yet I need to test how libcamera-jpeg behaves without preview.

giddyhup avatar Feb 28 '23 16:02 giddyhup

@giddyhup There is a currently a few frames delay when doing a snapshot if no video output. I need to add a method that will fetch camera frame every some time to ensure that camera is always hot and in-focus. For time being you can make camera to be forced active (with all processing) via --camera-force_active. This comes with higher usage, but gives an accurate image.

ayufan avatar Feb 28 '23 17:02 ayufan