Closed philippedc closed 5 months ago
Hi Philipp, EloquentEsp32Cam is the reference library. I archived just now the EloquentSurveillance repository to make it clear that it is no longer manteined.
To do what you want, you have to combine 2 sketches:
MJPEG streaming happens in the background, so the "merged" loop will be the loop from the motion detection sketch. You may try to remove the block
// capture picture
if (!camera.capture().isOk()) {
Serial.println(camera.exception.toString());
return;
}
since the MJPEG daemon is already taking frames in background. Not tested, so try both options (with and without).
You don't actually take a photo when motion is detected, since the photo is already be taken to detect motion. You can access the camera_frame_t
object with camera.frame->buf
and camera.frame->len
to do what you need (e.g. save to SD card).
Many thanks for your explanation. I will test soon ;)
Hi @eloquentarduino, sorry, I'm not an expert in C programming, nor in ESP32, no more in using github; however I have a question:
I want to make a cam project which stream video on demand and take a photo with the motion detection feature. Before taking a very long time to try to understand how I could make both jobs on a single code, I can see 2 deposits that propose video streaming and motion detection: this deposit EloquentEsp32cam and this one: https://github.com/eloquentarduino/EloquentSurveillance As they are quite different.... Why keeping both on github? Which one should I better use (the simplest)?
Thanks,