I’m running the ESP32 Camera Webserver on an S3 Sense with an OV5640 camera. I would like to be able to stream the camera at at least 60 frames per second, even if it has to be at a lower resolution, but I’ve had no luck configuring the sketch to use a higher framerate than 25 fps. Is there a way to run the S3 Sense at a higher framerate or is there a limitation with the board itself?
So, I have some demo’s on here with code on the Focus and different configs, The ~25 fps wall you’re running into is fundamentally a hardware bus and memory bandwidth bottleneck on the ESP32-S3 architecture, not a sensor limit with the OV5640.
While the OV5640 can output 60+ fps at lower resolutions, the standard Camera Webserver setup hits several bottlenecks simultaneously:
8-bit DVP Parallel Bus & XCLK: The camera links over an 8-bit DVP (Digital Video Port) parallel bus clocked by XCLK (typically 20 MHz). Transferring pixel data via DMA into the S3 at higher frame rates pushes the interface timing to its limits and risks DMA overrun / frame corruption.
Octal PSRAM Contention: When streaming video, frame buffers are allocated in external PSRAM (fb_location = CAMERA_FB_IN_PSRAM). The shared memory bus gets heavily saturated as the DMA controller writes incoming camera frames while the CPU/Wi-Fi stack reads them for transmission.
HTTP MJPEG Streaming Overhead: Serving multipart HTTP MJPEG streams over Wi-Fi adds significant TCP chunking, packetization, and CPU overhead per frame compared to dedicated streaming protocols like RTSP.
If you do want to dive deeper…
Squeezing the maximum FPS out of the S3 Sense:
If you want to push the framerate as high as possible on this board, try these config adjustments in camera_config_t:
Drop Resolution to QVGA (320x240) or QQVGA (160x120): At QVGA or below, you can fit the buffers directly in internal SRAM (fb_location = CAMERA_FB_IN_DRAM), which bypasses the PSRAM bus bottleneck completely.
Increase Frame Buffers: Set config.fb_count = 2 (or 3) with config.grab_mode = CAMERA_GRAB_LATEST so the camera driver doesn’t stall waiting for the HTTP handler to finish sending the previous frame.
Optimize Clock & JPEG Quality:
Keep config.xclk_freq_hz = 20000000 (20 MHz).
Lower the compression quality slightly by increasing config.jpeg_quality to 15–20 (higher number = smaller payload), which drastically reduces Wi-Fi transmission time per frame.
With those tweaks at QVGA/QQVGA in internal SRAM, you can usually reach around 30–40 fps, but a consistent 60 fps over HTTP Wi-Fi isn’t realistically achievable on the ESP32-S3.