ESP32 CAM Snapshot to backup

Hi,

I have the web server firmware running on my ESP32, and I can see the stream via browser, or the Home Automation Picture card on my dashboard.

Now I also want to take a periodic snapshot of the current image on the stream, and save this image locally on the Pi running Home Automation. I’ve looked at ESPHome, and through the forums but can’t seem to find anything similar.

Is it the case with a stream, that until it is rendered (via the browser/home automation picture card), you cant take an image from it, and to take a periodic snapshot the stream would need to be rendered at all times ? In which case a snapshot cant be created.

I also can configure the ESP32 firmware to perform the snapshot, by sending a picture to a remote server periodically (a LAMP server with PHP+Apache etc) . Then I can see the snapshot images where they are being saved, but then I cant watch a live stream.

Is there a way to do both - the live stream whenever I want, and also a periodic snapshot (either generated at host or server).

Why not use camera.snapshot