Multipart MJPEG stream not working

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
spynet
Posts: 11
Joined: Sun Sep 16, 2018 3:37 pm

Multipart MJPEG stream not working

Post by spynet » Wed Sep 19, 2018 9:52 pm

Hello,

I'm trying to setup a monitor to handle a multipart mjpeg stream.

If I use what I think it should be the correct configuration, I can't see anything on the monitor and no event is recorded:
protocol = HTTP
host = 192.168.1.6
port = 8080
path = video/mjpeg

If I use ffmpeg with same parameters, it doesn't work either.
path = http://192.168.1.6:8080/video/mjpeg

The connection to the camera is effective, the camera is streaming but the log continue to display the message:

zma_m1 26445 WAR Waiting for capture daemon zm_monitor.cpp 503

Can somebody help?

Thanks.

spynet
Posts: 11
Joined: Sun Sep 16, 2018 3:37 pm

Re: Multipart MJPEG stream not working

Post by spynet » Wed Sep 19, 2018 9:56 pm

One more information...

Just using the above URL in Firefox or Chrome on the same host running ZoneMinder I can see the stream natively with no issue.

Thanks again.

bbunge
Posts: 2705
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Multipart MJPEG stream not working

Post by bbunge » Wed Sep 19, 2018 11:45 pm

What about using VLC?

Double check the resolution you are using. That is the biggest cause for video to fail in Zoneminder.

spynet
Posts: 11
Joined: Sun Sep 16, 2018 3:37 pm

Re: Multipart MJPEG stream not working

Post by spynet » Thu Sep 20, 2018 8:45 pm

Do you mean libvlc? If so, it doesn't work but I'm not sure on how to set its parameters. VLC itself works perfectly.
I have tried different resolution without success.
In ZoneMinder 1.31.47, ffmpeg works but Remote does not.

spynet
Posts: 11
Joined: Sun Sep 16, 2018 3:37 pm

Re: Multipart MJPEG stream not working

Post by spynet » Thu Sep 20, 2018 10:18 pm

I found the problem: the mjpeg stream should contain the Content-Length header for each new frame, that is strange since the frame size should be detected based on the boundary tag.
Now I can see the stream but I have to set the image with 2 pixels less than the real or I'll get a skewed image. For example, with 640x480 image resolution, I need to set width=638, height=480. It seems to be true for all the resolutions.
Do somebody know why?
I'm testing with 1.31.47 now.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests