arkhipenko / esp32-mjpeg-multiclient-espcam-drivers

ESP32 MJPEG Multiclient Streaming Server with latest Espressif drivers
BSD 3-Clause "New" or "Revised" License
168 stars 40 forks source link

Jpg page load finishes late #2

Open s0170071 opened 4 years ago

s0170071 commented 4 years ago

When loading the JPG, the image appears instantly in the browser but the network connection remains open for about 2 seconds.

grafik

arkhipenko commented 4 years ago

I am not doing anything special with the network connection as you can see from the code. Not sure what you are asking me to do about this?

arkhipenko commented 4 years ago

I was not paying much attention to the JPG aspect of it - the focus was on the video feed obviously. Would adding client.stop() after https://github.com/arkhipenko/esp32-mjpeg-multiclient-espcam-drivers/blob/master/esp32-cam/esp32-cam.ino#L368 help?

s0170071 commented 4 years ago

The issue is that the image is already displayed in the browser but it takes another two seconds until it stops loading. It seems the browser is expecting something, i.e. a \r\n.
I already tried Client.stop but that didn't help. The streaming (also jpg) is done asynchronously, that may be why.

The long loading times cause issues with my home automation. It times out.