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
931 stars 214 forks source link

Free more sram #401

Closed NaxGH closed 7 months ago

NaxGH commented 7 months ago

I have discord library, that work alongside with this app, it able to login and read message from discord but fail to send a message, it error 0x7002 ESP_ERR_HTTP_CONNECT because insufficient heap?!

And I try to disable all of this and still not enough

define INCLUDE_FTP_HFS false // ftp.cpp (file upload)

define INCLUDE_SMTP false // smtp.cpp (email)

define INCLUDE_MQTT false // mqtt.cpp

define INCLUDE_TGRAM false // telegram.cpp

define INCLUDE_CERTS false // certificates.cpp (https and server certificate checking)

define INCLUDE_TELEM false // telemetry.cpp

define INCLUDE_MIC false // mic.cpp (microphone)

define INCLUDE_UART false // uart.cpp (use another esp32 as IO extender)

Without discord library I have 95kb free heap and 45kb when using discord library.

If you have any idea or solution, I'll take a look at it

Version use 9.5

Thank you

s60sc commented 7 months ago

Excluding files reduces sketch size not ram. The 50k ram diff when including discord is due to TLS. However the error is more likely a timeout.