s60sc / ESP32-CAM_MJPEG2SD

ESP32 Camera motion capture application to record JPEGs to SD card as AVI files and stream to browser as MJPEG. If a microphone is installed then a WAV file is also created. Files can be uploaded via FTP or downloaded to browser.
GNU Affero General Public License v3.0
888 stars 209 forks source link

Record save time in forced record #433

Closed alexandrumot closed 4 months ago

alexandrumot commented 4 months ago

Firstly, great library. I didn't expect this module to support so many features. All I want is to record indefinitely and to save a video to SD every 10 secs. I've looked at #271 but without success. What I tried was to change maxFrames to close the video earlier:

bool useMotion  = true; // whether to use camera for motion detection (with motionDetect.cpp)
bool dbgMotion  = false;
bool forceRecord = true; // Recording enabled by rec button

// motion detection parameters
int moveStartChecks = 5; // checks per second for start motion
int moveStopSecs = 2; // secs between each check for stop, also determines post motion time
int maxFrames = 100; // maximum number of frames in video before auto close 

But it doesn't affect forcedRecord at all.

Arduino IDE 2.3.2 AI Thinker ESP32-CAM with FTDI

Any help is much appreciated.

s60sc commented 4 months ago

Thanks.

Not designed for that purpose, but could:

but will need to experiment

alexandrumot commented 4 months ago

Ok, I understand. Will experiment with pirPin to keep it recording with gaps for saving video to SD.