Hi, i'm sending the picture's buffer rgb888 format via regular TCP connection with the client, using client.print or client.write , but the streaming is too slow. i'm getting the data by 4kbs . Is there any way to get the data faster in the client ?
void sendData()
{
for (int i = 0; i < out_len ; i++)
{
client.print(out_buf [i]);
//client.write(out_buf [i]);
}
}
Thank you.
Frank
Esp32 CAM sending image buffer over TCP
Re: Esp32 CAM sending image buffer over TCP
CameraWebServer app_httpd.cpp does send the whole framebuffer.
Add serial monitor output like below and enable output of timestamps in console.
Then you can measure what speed that method of framebuffer transfer does:
You can add an external Wifi antenna (bottom right), it greatly improved connectivity for one of my ESP32-CAM modules that was not near the router.
Hermann.
P.S:
No need for the Serial prints, normal "Get Still" output reveils time (including small time for getting framebuffer from ov2640):
Much faster than 4KBps:
Add serial monitor output like below and enable output of timestamps in console.
Then you can measure what speed that method of framebuffer transfer does:
Code: Select all
Serial.println("Camera capture send before");
res = httpd_resp_send(req, (const char *)fb->buf, fb->len);
Serial.println("Camera capture send after");
Hermann.
P.S:
No need for the Serial prints, normal "Get Still" output reveils time (including small time for getting framebuffer from ov2640):
Code: Select all
16:03:30.423 -> JPG: 22793B 335ms
16:03:32.648 -> JPG: 22777B 220ms
16:03:33.942 -> JPG: 21681B 171ms
Code: Select all
22793/0.335 = 68038.8
22777/0.220 = 103531.8
21681/0.171 = 126789.5
Re: Esp32 CAM sending image buffer over TCP
The Serial prints are useful with Serial monitor timestamps:
Pure http transfer is MUCH faster, 640KBps
Code: Select all
16:16:08.410 -> Camera capture send before
16:16:08.444 -> Camera capture send after
16:16:08.444 -> JPG: 22291B 174ms
16:16:09.973 -> Camera capture send before
16:16:10.007 -> Camera capture send after
16:16:10.007 -> JPG: 21786B 127ms
Pure http transfer is MUCH faster, 640KBps
Code: Select all
22291/0.034 = 655617.6
21768/0.034 = 640235.3
Who is online
Users browsing this forum: No registered users and 51 guests