M5Stack + ESP Cam + MJPG Stream

Stefan81
Posts: 2
Joined: Thu Apr 04, 2019 8:09 pm

M5Stack + ESP Cam + MJPG Stream

Postby Stefan81 » Thu Apr 04, 2019 8:28 pm

Hello,

i need help programming an esp32-mjpg Viewer.

Next to the House Door is an ESP Cam installed. In the rooms i have an M5Stack to view the pictures/video.

When displaying each single frame it works rather good, but the Frame-rate is really bad (1-3 fps).
(I took some ideas from this Project: M5Stack-Cam-Viewer https://github.com/moononournation/M5Stack-Cam-Viewer)

The official ESP-Cam example offers also an MJPG Stream ( CameraWebServer https://github.com/espressif/arduino-es ... aWebServer app_httpd.cpp in Line 304)
I hope the Frame-rate is much better when viewing the MJPG instead of each single frame.

I need help to split each single JPG from the Steam and show this on the M5Stack Display.

I tried to fetch out the „BONDARY“ (after each Frame) with this (on Serial Console)
  1. if(stream->find(PART_BOUNDARY)) {
  2.    USE_SERIAL.print("\n\r--JPG End--\n\r \n\r");
  3. }
code. But this works only sometimes.

Can somebody give me a hint how to fetch each „BONDARY“ from the Stream, remove the Headers, and split out the JPG.

Thank you very much

Stefan

P.S. Sorry for my bad english.

Who is online

Users browsing this forum: noweare and 65 guests