shariltumin / esp32-cam-micropython-2022

MicroPython esp32-cam firmware with camera support compiled with esp-idf-4.4.0. Python script files for live streaming
MIT License
174 stars 33 forks source link

How to use a pixformat other than 5 (JPEG)? #41

Closed robtinkers closed 3 months ago

robtinkers commented 7 months ago

Platform: (possibly cloned) ESP32-CAM

>>> import camera
>>> camera.init()
True
>>> camera.pixformat(1)
>>> print(repr(camera.capture()))
b'\xff\xd8\xff\xe0\x00\x10JFIF [snip!]
>>> print(repr(camera.capture()))
False

The first camera.capture() returns a JPEG (maybe because of buffering in the sensor module?)

The second camera.capture() returns False, as it does for every combination of pixformat and framesize that I have tried, other than pixformat=5 (JPEG).

Is there a way to get other pixformat values working?

robtinkers commented 3 months ago

A couple of firmware releases (Christmas-2023-Edition and X23) have come out since this report, and both are documented to fix the issue, so closing this!