mjpeg-proxy icon indicating copy to clipboard operation
mjpeg-proxy copied to clipboard

No data returned, response 'pending'

Open humphd opened this issue 2 years ago • 1 comments

I feel like I'm missing something, so forgive me if this is obvious.

I have 2 cameras that I want to proxy. I tried creating a JSON file with their sources. When I run ./mjpeg-proxy --sources sources.json I see it starting, but nothing ever gets returned from the connections to localhost:8080/camera1 or localhost:8080/camera2:

chunker[/camera1]: serving from http://192.168.2.139/mjpg/1/video.mjpg
chunker[/camera2]: serving from http://192.168.2.139/mjpg/2/video.mjpg
server: starting on address :8080
pubsub[/camera1]: added subscriber [::1]:58014 (total=1)
chunker[/camera1]: connecting to http://192.168.2.139/mjpg/1/video.mjpg
chunker[/camera1]: started

In the browser, it just blocks like this forever:

Screen Shot 2022-03-01 at 8 17 49 PM

If I hit my cameras (which work) I get back a response like this:

curl -I http://192.168.2.139/mjpg/2/video.mjpg
HTTP/1.0 200 OK
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Connection: close
Content-Type: multipart/x-mixed-replace; boundary=--myboundary

What am I missing?

humphd avatar Mar 02 '22 01:03 humphd

You can check if it works correctly with the sources.json included in the repo. If that is working than it has some problems reading from the provided sources. To debug maybe try tcpdump to see the traffic or add some additional debugging to the receiver code.

vvidic avatar Mar 03 '22 20:03 vvidic