M5Stack + ESP Cam + MJPG Stream
Posted: Sat Apr 06, 2019 8:29 pm
Hello,
i need some help for parsing an MJPG Stream on ESP32.
My Project:
I have a ESP-Cam Module next to my House Door.
On this module is a modified Version from the ESP-Cam Example https://github.com/espressif/arduino-es ... aWebServer
(No Face Detection, simple Webinterface)
In my Rooms i have some M5Stacks to view the Picture when somebody rings on the Door.
To view the pictures i took some inspiration from this Project https://github.com/moononournation/M5Stack-Cam-Viewer
This Sketch does an new HTTP Request for each Picture. I got a framerate from 2-5 fps - which is not so perfect.
I see in the SourceCode from the ESP-Cam that it also offers a URL where i can get an MJPG Stream. (File app_httpd.cpp in Line 304)
This works perfect on my Laptop and framerate is much better.
In the MJPG Steam there is only one GET Request and i got multiple JPG's separated by a "Boundary" and a Header.
I need some Ideas how to cut the Stream into each JPG.
For testing i tried this:
but this doesen't work Reliable.
Does anybody have an idea how to do this?
Thanks for your help
Stefan
i need some help for parsing an MJPG Stream on ESP32.
My Project:
I have a ESP-Cam Module next to my House Door.
On this module is a modified Version from the ESP-Cam Example https://github.com/espressif/arduino-es ... aWebServer
(No Face Detection, simple Webinterface)
In my Rooms i have some M5Stacks to view the Picture when somebody rings on the Door.
To view the pictures i took some inspiration from this Project https://github.com/moononournation/M5Stack-Cam-Viewer
This Sketch does an new HTTP Request for each Picture. I got a framerate from 2-5 fps - which is not so perfect.
I see in the SourceCode from the ESP-Cam that it also offers a URL where i can get an MJPG Stream. (File app_httpd.cpp in Line 304)
This works perfect on my Laptop and framerate is much better.
In the MJPG Steam there is only one GET Request and i got multiple JPG's separated by a "Boundary" and a Header.
I need some Ideas how to cut the Stream into each JPG.
For testing i tried this:
Code: Select all
if(stream->find(PART_BOUNDARY)) {
USE_SERIAL.print("\n\r--JPG End--\n\r \n\r");
}
Does anybody have an idea how to do this?
Thanks for your help
Stefan