Page 1 of 1

Corrupt JPEG data

Posted: Mon Jul 12, 2004 8:40 pm
by sgocken
My second problem. (Created 2 threads)
Based on what I have read The Corrupt JPEG lines mean that it can't stream the images fast enough.
But, this seems strange to me. I have tried this on 2 different Axis 2100s.
Both show this error. The first was also being accessed by different server software, so I had figured the error was caused by that.
But the Axis 2100 that the logs are refering to is only be accessed by ZoneMinder on a 100Mbit switched connection.


'zmc -m 2' started at 04/07/12 15:15:25
'zmc -m 2' starting at 04/07/12 15:15:25, pid = 4149
Corrupt JPEG data: premature end of data segment
Invalid JPEG file structure: two SOI markers
'zmc -m 2' crashed at 04/07/12 15:15:25, exit status 1
Use of uninitialized value in hash element at /usr/local/bin/zmdc.pl line 332, <CLIENT> line 1.
'zmc -m 2' started at 04/07/12 15:15:25
'zmc -m 2' starting at 04/07/12 15:15:25, pid = 4149
Corrupt JPEG data: premature end of data segment
Invalid JPEG file structure: two SOI markers
'zmc -m 2' crashed at 04/07/12 15:15:25, exit status 1

Posted: Tue Jul 13, 2004 8:45 am
by zoneminder
There have been a number of issues with this kind of thing on Axis cameras. I've done a patch which hopefully addresses it and which will be in the next release. Unfortunately as I don't get the problem I can't tell if it fixes it but if you want I can mail it to you to try out. Assuming you have the same problem of course.

It's nothing to do with network speed or resources, and more to do with rather inconsistent stream structure. Are you using the mpjpeg stream from the camera or just the jpeg one? I have a 210 and don't see any problems.

Phil,

Posted: Tue Jul 13, 2004 1:01 pm
by sgocken
I am just using the jpeg stream. I would be happy to try the patch. I have both Axis 2100s and Axis 205s to test with. Just e-mail it to me. Thanks

Posted: Tue Jul 13, 2004 1:19 pm
by zoneminder
I would suggest using the mpjpeg stream first as it's much more efficient and also faster!

If you don't get anywhere with that then I'll mail you the patch. I'm trying to get a release out shortly anyway.

The paths I'm using on my cameras for mpjpeg streams are as follows, though I think it depends on your firmware to some degree.

205: /mjpg/video/mjpg

210: /axis-cgi/mjpg/video.cgi?resolution=320x240

Phil

Posted: Tue Jul 13, 2004 2:13 pm
by sgocken
Well changing to the mpeg stream seems to have stopped the jpeg errors.
The capture daemon is using alot more CPU using the mpeg stream.
Well I am going to add a bunch more cameras to this system and see how it works.

Posted: Tue Jul 13, 2004 2:40 pm
by zoneminder
It is using more CPU because you are probably getting 25fps or more rather than about 4-5 before. I usually find it worthwhile setting the 'max client FPS' in the Axis admin pages to about 10fps otherwise you can get overwhelmed.

Phil,

Posted: Tue Jul 13, 2004 3:50 pm
by sgocken
I turned the frame rate down, but I am now getting about 2 minutes of lag time on the live view.

Posted: Tue Jul 13, 2004 4:24 pm
by zoneminder
Did you turn it down in the Axis admin pages rather than the ZM monitor config? If you do the latter for network cameras it will just end up with all the images in a huge long queue.

Phil,

Posted: Tue Jul 13, 2004 4:32 pm
by sgocken
Well I made the change in ZM. I can't find a place to change the frame rate in the Axis 2100.

Posted: Tue Jul 13, 2004 7:05 pm
by sgocken
Well can you send me the patch to:
sgocken at icsincorporated dot com

I would like to see how it works with the jpg stream. The mpeg stream is using way too much CPU.
I am going to have about 36 cameras running on this server.
And 640 x 480 is a requirement.