Page 1 of 1

Can't get mjpeg stream from ESP32 to work

Posted: Sat Oct 26, 2019 9:09 pm
by Stulander
I used the code from this page: https://randomnerdtutorials.com/esp32-c ... assistant/

I would have thought it would just work with ZM like mjpeg-streamer does on the raspberry pi, after all it is generating an mjpeg stream. I tried FFMPEG with HTTP tunnel option, matching the resolution set in the code, which I changed to VGA (640x480) as per https://github.com/espressif/esp32-came ... e/sensor.h

If you want to try this out yourself you need to comment out the "dl_lib.h" library for it to compile.

I tried changing the stream URI and port. I thought maybe ZM wouldn't like "/" as a path. Didn't make any difference of course.

Stream works fine when I browse to the address in Firefox.

I get this error in the logs:

Code: Select all

Unable to open input http://192.168.1.59:8080/test due to: Immediate exit requested
I'm clueless. Any ideas?

Re: Can't get mjpeg stream from ESP32 to work

Posted: Sun Oct 27, 2019 12:13 pm
by bbunge
Get it to work with VLC and check the resolution VLC reports.

Re: Can't get mjpeg stream from ESP32 to work

Posted: Sun Oct 27, 2019 2:34 pm
by iconnor
The other thing you can try is the Remote Monitor type.

Re: Can't get mjpeg stream from ESP32 to work

Posted: Sun Oct 27, 2019 9:32 pm
by Stulander
Unable to get it to work with VLC. I did try remote type too but no luck. Pretty strange.

Re: Can't get mjpeg stream from ESP32 to work

Posted: Sun Oct 27, 2019 10:40 pm
by bbunge
It is possible that 640x480 is outside the range of the camera. I would recommend taking your camera code back to basics and a standard port 80. If it works in Firefox use the same URL in VLC. Then use VLC (Tools, Media Information, Codec) to check camera Display Resolution. That is the resolution to use in Zoneminder.

Re: Can't get mjpeg stream from ESP32 to work

Posted: Thu Dec 05, 2019 8:28 am
by Wilfried
Did you have any luck getting it running ?

Re: Can't get mjpeg stream from ESP32 to work

Posted: Sun Dec 29, 2019 3:40 pm
by chrismalyon
I have managed to get this working using the code on this page.
https://www.hackster.io/BnBe_Club/9-rts ... e-sketch-0