mjpeg issues

Forum for questions and support relating to the 1.27.x releases only.
Locked
linuxman84
Posts: 4
Joined: Wed Jan 26, 2011 3:41 am

mjpeg issues

Post by linuxman84 »

I'm wondering if any one else out there is encountering these issues. I'm in the process of testing ne hd ip cameras for possible deployment in my home and several friends homes. I have the camera showing up in zonminder and I get some video, but the error log is huge I'm not sure what I need to do to fix it. Below are the errors I'm seeing. Zoneminder I'm running the latest version 1.27 is installed ubuntu 12.04, located in my esxi cluster. Below are the settings I'm using for my cameras. I would prefer to stay with mjpeg as I do us the motion detection built into zonminder. the camera is a Dahua, I'm trying to move from my out of date ccd Cameras to something that is a bit newer. any help is appreciated.

Monitor settings -
Source type - Remote
Function - monitor
remote protocol - http
remote host name username:password@192.168.0.108
remote host port 80
remote host path /axis-cgi/mjpg/video.cgi?date=1
target colorspace - 32 bit
width 1280
height 720
everything else is standard settings.

2014-06-03 21:34:12.845779 zmc_m1 4145 ERR Found bogus jpeg header '7b22' zm_remote_camera_http.cpp 969
2014-06-03 21:34:12.847200 zmc_m1 4145 ERR Unable to get response zm_remote_camera_http.cpp 1110
2014-06-03 21:34:13.346593 zmc_m1 4145 ERR Found bogus jpeg header '7b22' zm_remote_camera_http.cpp 969
2014-06-03 21:34:13.348081 zmc_m1 4145 ERR Unable to get response zm_remote_camera_http.cpp 1110
2014-06-03 21:34:15.545745 zmc_m1 4145 ERR Found bogus jpeg header '7b22' zm_remote_camera_http.cpp 969
2014-06-03 21:34:15.547727 zmc_m1 4145 ERR Unable to get response zm_remote_camera_http.cpp 1110
2014-06-03 21:34:15.844229 zmc_m1 4145 ERR Found bogus jpeg header '7b22' zm_remote_camera_http.cpp 969
2014-06-03 21:34:15.845828 zmc_m1 4145 ERR Unable to get response zm_remote_camera_http.cpp 1110
2014-06-03 21:34:19.045029 zmc_m1 4145 ERR Found bogus jpeg header '7b22' zm_remote_camera_http.cpp 969
2014-06-03 21:34:19.046810 zmc_m1 4145 ERR Unable to get response zm_remote_camera_http.cpp 1110
2014-06-03 21:34:21.345898 zmc_m1 4145 ERR Found bogus jpeg header '7b22' zm_remote_camera_http.cpp 969
2014-06-03 21:34:21.347525 zmc_m1 4145 ERR Unable to get response zm_remote_camera_http.cpp 1110
2014-06-03 21:34:24.648308 zmc_m1 4145 ERR Found bogus jpeg header '7b22' zm_remote_camera_http.cpp 969
2014-06-03 21:34:24.650374 zmc_m1 4145 ERR Unable to get response zm_remote_camera_http.cpp 1110
2014-06-03 21:34:26.751515 zmc_m1 4145 ERR Found bogus jpeg header '7b22' zm_remote_camera_http.cpp 969
2014-06-03 21:34:26.755313 zmc_m1 4145 ERR Unable to get response zm_remote_camera_http.cpp 1110
2014-06-03 21:34:27.043495 zmc_m1 4145 ERR Found bogus jpeg header '7b22' zm_remote_camera_http.cpp 969
2014-06-03 21:34:27.045478 zmc_m1 4145 ERR Unable to get response zm_remote_camera_http.cpp 1110
2014-06-03 21:34:30.670872 zms 4167 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: mjpeg issues

Post by linuxsense »

Did you install from source or use a deb? What is the make and model of the camera?
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: mjpeg issues

Post by mastertheknife »

Hi,

Looks like your camera is using Chunked Encoding, which is a HTTP/1.1 feature that ZM's "Remote" source type does not support. If this is ZM v1.27 or newer, you can use the cURL source type, which does support chunked encoding.
Kfir Itzhak.
linuxman84
Posts: 4
Joined: Wed Jan 26, 2011 3:41 am

Re: mjpeg issues

Post by linuxman84 »

linuxsense wrote:Did you install from source or use a deb? What is the make and model of the camera?

It was installed via deb using the pa repository, the camera is a generic dahua 1080p ip dome camera.
mastertheknife wrote:Hi,

Looks like your camera is using Chunked Encoding, which is a HTTP/1.1 feature that ZM's "Remote" source type does not support. If this is ZM v1.27 or newer, you can use the cURL source type, which does support chunked encoding.
I've tried cURL and it certainly helps but doesn't seem to fix the issue, I think the camera has the option of using http 1.0 I'll give that a shot to see if it fixes the issue.
linuxman84
Posts: 4
Joined: Wed Jan 26, 2011 3:41 am

Re: mjpeg issues

Post by linuxman84 »

Looks like cURL gives me the same error, Below is a copy of the log, unfortunately there is not way for me to change the http type on the camera. Any other ideas?

2014-06-08 20:28:57.536800 zmdc 1518 ERR 'zmc -m 1' exited abnormally, exit status 255 zmdc.pl
2014-06-08 20:28:57.531472 zmc_m1 1662 FAT Maximum number (25) of JPEG errors reached, exiting zm_jpeg.cpp 43
2014-06-08 20:28:57.530006 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:56.114466 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:55.861810 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:55.609240 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:55.355429 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:55.152224 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:54.899458 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:54.646725 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:54.393864 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:53.382072 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:53.129395 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:52.876438 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:52.421563 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:52.168869 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:51.764376 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:51.511183 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:51.258309 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:49.641181 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:49.388692 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:49.136012 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:48.933867 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:48.681172 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:48.428589 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:48.175376 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:47.922575 zmc_m1 1662 ERR Not a JPEG file: starts with 0x7b 0x22 zm_jpeg.cpp 40
2014-06-08 20:28:47.125635 zmc_m1 1662 INF Starting Capture zmc.cpp 195
2014-06-08 20:28:47.027380 zmdc 1662 INF 'zmc -m 1' started at 14/06/08 20:28:47 zmdc.pl
2014-06-08 20:28:47.027320 zmdc 1518 INF 'zmc -m 1' starting at 14/06/08 20:28:47, pid = 1662 zmdc.pl
2014-06-08 20:28:46.917890 zmwatch 1554 INF Restarting capture daemon for Monitor-1, time since last capture 10 seconds (1402277326-1402277316) zmwatch.pl
hesral
Posts: 44
Joined: Sun Apr 06, 2014 12:11 pm

Re: mjpeg issues

Post by hesral »

What have you set for fps? Does the errors keep coming if you set fps to 1?

The image decoder is complaining that the start of the file doesn't start with 0xffd8, which is how jpeg files should start, but instead with 0x7b22. 0x7b22 translates into the asci characters {". This may be the start of a json encoded text file, or something like that. Its not html, and not jpeg. Headers should be pruned off already, and I can't imagine that those characters are allowed as http header fields anyway. My best guess is that the html server is sending some sort of error in plain text, or that this is some part of the mjpeg stream you are trying to use. I don't remember if mjpeg streams have the 0xffd8 header stripped from the individual frames or not.

I see that you use an axis path to get the stream?
/axis-cgi/mjpg/video.cgi?date=1

That should either not work at all, or axis may have licensed their software to the producer of your camera. If it's the latter, then you may try the following path instead:
/jpg/image.jpg
It works well on my axis cameras.
Locked