Espressif/esp_camera library and support of JPEG output.
Posted: Mon Dec 29, 2025 10:08 am
Good morning,
I am quite new to ESP-IDF and so far quite enjoying it.
I have however got a couple questions about the ESP Camera library/driver.
https://github.com/espressif/esp32-camera
I am able to capture JPEG images with little issue with the OV2640 camera modules but it seems that I have issues when swapping it out with say the OV3660 or OV5640.
I am reading the datasheet for the OV3660 for example and it seems the register(s) for JPEG are not the same for the modules.
I.e.
OV2640 has at address `0xDA` 'IMAGE_MODE' which bit 4 enables JPEG output. I assume this is how the esp camera driver works when initialising the camera via config.
OV3660 seems to have different registers for "compression mode" and seems to generally have more "options":
0x3821 COMPRESSION ENABLE
0x4713 COMPRESSION MODE SELECT
The OV5640 seems to again be more similar to OV3660 but has even more options for example:
0x4713 JPG MODE SELECT
I keep scouring the library source code for where these registers are configured but cant seem to see it.
Or is this just the current state of the library and I will need to manually set the registers to get JPEG/Compression working well across the OV* range?
I assume my issues with the OV>2* models is that I am getting bad "jpeg frames" as the output from the sensors is not what the driver expects.
Thank you for any guidance.
I am quite new to ESP-IDF and so far quite enjoying it.
I have however got a couple questions about the ESP Camera library/driver.
https://github.com/espressif/esp32-camera
I am able to capture JPEG images with little issue with the OV2640 camera modules but it seems that I have issues when swapping it out with say the OV3660 or OV5640.
I am reading the datasheet for the OV3660 for example and it seems the register(s) for JPEG are not the same for the modules.
I.e.
OV2640 has at address `0xDA` 'IMAGE_MODE' which bit 4 enables JPEG output. I assume this is how the esp camera driver works when initialising the camera via config.
OV3660 seems to have different registers for "compression mode" and seems to generally have more "options":
0x3821 COMPRESSION ENABLE
0x4713 COMPRESSION MODE SELECT
The OV5640 seems to again be more similar to OV3660 but has even more options for example:
0x4713 JPG MODE SELECT
I keep scouring the library source code for where these registers are configured but cant seem to see it.
Or is this just the current state of the library and I will need to manually set the registers to get JPEG/Compression working well across the OV* range?
I assume my issues with the OV>2* models is that I am getting bad "jpeg frames" as the output from the sensors is not what the driver expects.
Thank you for any guidance.