maximkulkin / esp32-homekit-camera

Firmware for esp32-camera module to act as Apple Homekit IP camera
MIT License
399 stars 79 forks source link

How change image resolusion? #85

Open feanor413 opened 3 years ago

feanor413 commented 3 years ago

Hello, how change image resolution?

okanduzyel commented 3 years ago

config.h

VIDEO_IMAGE_SCALE_DENOM 4

It is the divider of the main resolution that is 640x480.

VIDEO_IMAGE_SCALE_DENOM 4 -> 160x120 VIDEO_IMAGE_SCALE_DENOM 2 -> 320x240

ghost commented 3 years ago

Hello,

When i try to scale the resolution, there is CPU error ?

Thank you

E (88243) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time: E (88243) task_wdt: - IDLE0 (CPU 0) E (88243) task_wdt: Tasks currently running: E (88243) task_wdt: CPU 0: Camera Stream E (88243) task_wdt: CPU 1: IDLE1 E (88243) task_wdt: Print CPU 0 (current core) backtrace

okanduzyel commented 3 years ago

Disable the WDT.

ghost commented 3 years ago

Thank you for WDT, but now i have a new error :

x264 [error]: malloc of size 1064176 failed I (100052) esp32_camera: Encoded frame, size = -1 E (100062) esp32_camera: Image H264 encoding failed error = -1 I (100062) esp32_camera: Getting a frame I (100072) esp32_camera: Total free memory: 194396 I (100082) esp32_camera: JPEG output size: 640x480 I (100282) esp32_camera: JPEG finishing I (100282) esp32_camera: JPEG destroying I (100282) esp32_camera: Returning frame buffer I (100282) esp32_camera: Done grabbing a frame I (100292) esp32_camera: Encoding a frame I (100292) esp32_camera: Total free memory: 194396

okanduzyel commented 3 years ago

JPEG output size: 640x480 is too big. try to 320x240

ghost commented 3 years ago

Thank you 👍