Can't get mjpeg stream from ESP32 to work

Forum for questions and support relating to 1.33.x development only.
Locked
Stulander
Posts: 2
Joined: Sat Oct 26, 2019 10:51 am

Can't get mjpeg stream from ESP32 to work

Post 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?
bbunge
Posts: 2931
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

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

Post by bbunge »

Get it to work with VLC and check the resolution VLC reports.
User avatar
iconnor
Posts: 2896
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

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

Post by iconnor »

The other thing you can try is the Remote Monitor type.
Stulander
Posts: 2
Joined: Sat Oct 26, 2019 10:51 am

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

Post by Stulander »

Unable to get it to work with VLC. I did try remote type too but no luck. Pretty strange.
bbunge
Posts: 2931
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

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

Post 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.
Wilfried
Posts: 1
Joined: Thu Dec 05, 2019 8:26 am

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

Post by Wilfried »

Did you have any luck getting it running ?
chrismalyon
Posts: 1
Joined: Sun Dec 29, 2019 3:38 pm

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

Post 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
Locked