Newb Hello and Help - Source Orange, Corrupt JPEG & Shared

Forum for questions and support relating to the 1.25.x releases only.
Locked
KarlD
Posts: 4
Joined: Mon Oct 08, 2012 2:12 pm

Newb Hello and Help - Source Orange, Corrupt JPEG & Shared

Post by KarlD »

Hi

New to ZM and loving it so far.

Running ZM on a HP Microserver but having some weird issues.

Was running a Tenvis outdoor IP camera without issue but now I've popped a Xenta "branded" IP camera on its all gone a bit Pete Tong.

Even with the monitor set to MoDect and enables the Source shows orange and wont trigger any events. I can see the camera without issue and all the config looks fine.

In the syslog I have the following errors

Oct 8 15:39:15 CCTV zmc_m4[2333]: WAR [Corrupt JPEG data: 1 extraneous bytes before marker 0xd9]
Oct 8 15:39:15 CCTV zmc_m4[2333]: WAR [Corrupt JPEG data: 2 extraneous bytes before marker 0xd9]
Oct 8 15:39:18 CCTV zmc_m4[2333]: WAR [Buffer overrun at index 2, image 202, slow down capture, speed up analysis or increase ring buffer size]
Oct 8 15:39:20 CCTV zmc_m4[2333]: WAR [Corrupt JPEG data: 1 extraneous bytes before marker 0xd9]
Oct 8 15:39:23 CCTV zmwatch[2023]: ERR [Shared data size conflict in shared_data for monitor Kitchen, expected 328, got 316]
Oct 8 15:39:23 CCTV zmwatch[2023]: ERR [Shared data size conflict in shared_data for monitor Kitchen, expected 328, got 316]
Oct 8 15:39:24 CCTV zmc_m4[2333]: WAR [Corrupt JPEG data: 1 extraneous bytes before marker 0xd9]
Oct 8 15:39:26 CCTV zmc_m4[2333]: WAR [Buffer overrun at index 2, image 242, slow down capture, speed up analysis or increase ring buffer size]
Oct 8 15:39:26 CCTV zmc_m4[2333]: WAR [Last image read from shared memory 16 seconds ago, zma may have gone away]
Oct 8 15:39:26 CCTV zmc_m4[2333]: WAR [Corrupt JPEG data: 1 extraneous bytes before marker 0xd9]
Oct 8 15:39:26 CCTV zmc_m4[2333]: WAR [Corrupt JPEG data: 2 extraneous bytes before marker 0xd9]
Oct 8 15:39:27 CCTV zmc_m4[2333]: WAR [Corrupt JPEG data: 1 extraneous bytes before marker 0xd9]
Oct 8 15:39:30 CCTV zmdc[1977]: INF [Starting pending process, zma -m 4]
Oct 8 15:39:30 CCTV zmdc[1977]: INF ['zma -m 4' starting at 12/10/08 15:39:30, pid = 2370]
Oct 8 15:39:30 CCTV zmdc[2370]: INF ['zma -m 4' started at 12/10/08 15:39:30]
Oct 8 15:39:30 CCTV zma_m4[2370]: INF [In mode 3/1, warming up]
Oct 8 15:39:32 CCTV zmc_m4[2333]: WAR [Corrupt JPEG data: 2 extraneous bytes before marker 0xd9]
Oct 8 15:39:32 CCTV zmc_m4[2333]: WAR [Corrupt JPEG data: 1 extraneous bytes before marker 0xd9]
Oct 8 15:39:33 CCTV zmwatch[2023]: ERR [Shared data size conflict in shared_data for monitor Kitchen, expected 328, got 316]
Oct 8 15:39:33 CCTV zmwatch[2023]: ERR [Shared data size conflict in shared_data for monitor Kitchen, expected 328, got 316]
Oct 8 15:39:33 CCTV zma_m4[2370]: INF [Got signal 11 (Segmentation fault), crashing]
Oct 8 15:39:33 CCTV zmdc[1977]: ERR ['zma -m 4' exited abnormally, exit status 11]

Any help would be much appreciated.

Cheers Karl
KarlD
Posts: 4
Joined: Mon Oct 08, 2012 2:12 pm

Re: Newb Hello and Help - Source Orange, Corrupt JPEG & Shar

Post by KarlD »

Thanks for that however it didn't seem to resolve my issue and I cant pick the MP4 stream or telnet that port either.

I tested it with my Tenvis IP cam thats waiting to be mounted outside and the monitoring goes straight to green without issue. I made all the other changes to the memory etc.. too.

Any other ideas?

The camera with the issue is a Xenta IP-5IR-58D 5 IR LED Wireless Indoor IP camera - only a cheap thing from an well known UK e-tailer
KarlD
Posts: 4
Joined: Mon Oct 08, 2012 2:12 pm

Re: Newb Hello and Help - Source Orange, Corrupt JPEG & Shar

Post by KarlD »

I've been searching for a resolution and it seems that I'm not the only one with the issue, here is a more recent log

2012-10-09 14:22:44.854767 zmc_m4 26588 WAR Corrupt JPEG data: 1 extraneous bytes before marker 0xd9 zm_jpeg.cpp 63
2012-10-09 14:22:43.453550 zmc_m4 26588 WAR Last image read from shared memory 4 seconds ago, zma may have gone away zm_monitor.cpp 2574
2012-10-09 14:22:43.447777 zmc_m4 26588 WAR Buffer overrun at index 8, image 12838, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 2568
2012-10-09 14:22:43.050888 zmc_m4 26588 WAR Corrupt JPEG data: 1 extraneous bytes before marker 0xd9 zm_jpeg.cpp 63
2012-10-09 14:22:42.450073 zmc_m4 26588 WAR Corrupt JPEG data: 1 extraneous bytes before marker 0xd9 zm_jpeg.cpp 63
2012-10-09 14:22:41.644969 zmc_m4 26588 WAR Corrupt JPEG data: 1 extraneous bytes before marker 0xd9 zm_jpeg.cpp 63
2012-10-09 14:22:41.451283 zmc_m4 26588 WAR Buffer overrun at index 8, image 12828, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 2568
2012-10-09 14:22:40.227826 zmc_m4 26588 WAR Corrupt JPEG data: 1 extraneous bytes before marker 0xd9 zm_jpeg.cpp 63
2012-10-09 14:22:40.027286 zmc_m4 26588 WAR Corrupt JPEG data: 1 extraneous bytes before marker 0xd9 zm_jpeg.cpp 63
2012-10-09 14:22:39.704640 zmdc 2309 ERR 'zma -m 4' exited abnormally, exit status 11 zmdc.pl
2012-10-09 14:22:39.694036 zma_m4 27756 INF Got signal 11 (Segmentation fault), crashing zm_signal.cpp 73
2012-10-09 14:22:39.653458 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:39.622175 zmc_m4 26588 WAR Corrupt JPEG data: 1 extraneous bytes before marker 0xd9 zm_jpeg.cpp 63
2012-10-09 14:22:39.458583 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:39.228374 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:39.027934 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:38.833350 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:38.638751 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:38.622494 zmc_m4 26588 WAR Corrupt JPEG data: 1 extraneous bytes before marker 0xd9 zm_jpeg.cpp 63
2012-10-09 14:22:38.443810 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:38.277153 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:38.059841 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:37.850597 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:37.650174 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:37.618694 zmc_m4 26588 WAR Corrupt JPEG data: 1 extraneous bytes before marker 0xd9 zm_jpeg.cpp 63
2012-10-09 14:22:37.547668 zma_m4 27756 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1083
2012-10-09 14:22:37.546856 zma_m4 27756 INF In mode 3/1, warming up zma.cpp 101
2012-10-09 14:22:37.448697 zma_m4 27756 ERR Got unexpected memory map file size 36865192, expected 9216952 zm_monitor.cpp 364
2012-10-09 14:22:37.225480 zmdc 27756 INF 'zma -m 4' started at 12/10/09 14:22:37 zmdc.pl
2012-10-09 14:22:37.222550 zmdc 2309 INF 'zma -m 4' starting at 12/10/09 14:22:37, pid = 27756 zmdc.pl
2012-10-09 14:22:36.814731 zmc_m4 26588 WAR Corrupt JPEG data: 1 extraneous bytes before marker 0xd9 zm_jpeg.cpp 63
2012-10-09 14:22:36.699580 zmwatch 2348 INF Restarting analysis daemon for Kitchen, time since last analysis 8 seconds (1349788956-1349788948) zmwatch.pl
2012-10-09 14:22:33.402737 zmc_m4 26588 WAR Corrupt JPEG data: 2 extraneous bytes before marker 0xd9 zm_jpeg.cpp 63
2012-10-09 14:22:32.602294 zmc_m4 26588 WAR Last image read from shared memory 4 seconds ago, zma may have gone away
KarlD
Posts: 4
Joined: Mon Oct 08, 2012 2:12 pm

Re: Newb Hello and Help - Source Orange, Corrupt JPEG & Shar

Post by KarlD »

just increased all the buffers to 25 and it seems to have sorted the issue - still getting lots of Corrupt JPEG data errors in the log.

The main issue is sorted though - its not sitting on MODECT and alarming away nicely.
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Newb Hello and Help - Source Orange, Corrupt JPEG & Shar

Post by knight-of-ni »

Corrupt JPEG data error is a known camera firmware issue. Not really a problem other than it fills up the logs. If you want to get rid of the message, you can either recompile zoneminder (what I did) or recompile libjpeg (what others have done).

Searching the forums, you will find several threads that discuss the details of these workarounds.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
dbu
Posts: 3
Joined: Fri Nov 30, 2012 11:51 pm

Re: Newb Hello and Help - Source Orange, Corrupt JPEG & Shar

Post by dbu »

I also got the Corrupt JPEG error on my Foscam cameras running on ZM 1.25. However I fixed it in what I think is perhaps a fairly straightforward way ...

First the clue to the problem is in the log (top right on ZM console) which contains an error like ...

Code: Select all

2012-11-24 16:26:41.634319	zmc_m3	15636	WAR	Corrupt JPEG data: 1 extraneous bytes before marker 0xd9	zm_jpeg.cpp	63
The key part of this error message is at the end where it shows that the problem is being generated by zm_jpeg.cpp on line 63.

If you open the zm_jpeg.cpp file at /usr/src/zm/src then it contains the following on lines 62 and 63 ...

Code: Select all

			(zmerr->pub.format_message)( cinfo, buffer ); 
			Warning( "%s", buffer );
These are the lines that actually generate the Corrupt JPEG warning message. If you comment them out as follows ...

Code: Select all

/*			(zmerr->pub.format_message)( cinfo, buffer ); */
/*			Warning( "%s", buffer ); */
... then save the file and re-compile / install ZoneMinder then the problem goes away. The good thing is that *only* the Corrupt JPEG messages are stopped. All the other warning and info messages are still generated.

To reinstall ZoneMinder (this is from memory, so caveat emptor) ...

Go to the source directory ...

Code: Select all

cd /usr/src/zm/src
... become root ...

Code: Select all

sudo su [for ubuntu]
... (re)install ZoneMinder

Code: Select all

make install
... then reboot

Ideally I think the logging in Zoneminder 1.25, which is generally great as all the entries are in the MySQL database, should have an option to completely suppress JPEG errors through "Options" settings.
rockets
Posts: 10
Joined: Thu Nov 29, 2012 12:55 am

Re: Newb Hello and Help - Source Orange, Corrupt JPEG & Shar

Post by rockets »

This is really upsetting..... I cannot find zm_jpeg.cpp anywhere on my installation.

The zm log reports "corrupt Jpeg" etc as coming from zm_jpeg.cpp.

I used "find", "locate", "nautilus" all report no file!!!!

Looking at my directory structure with nautilus I get /usr/src/ (no zm dir) ????

I'm sure I am doing something wrong, just spent 2 hours and am still spinning around...

Ubuntu 12.04 64bit on an amd desktop.

Code: Select all

2012-12-04 08:02:55.184692	zmc_m1	6792	WAR	Corrupt JPEG data: 1 extraneous bytes before marker 0xd9	zm_jpeg.cpp	63
2012-12-04 08:02:54.384304	zmc_m1	6792	WAR	Corrupt JPEG data: 1 extraneous bytes before marker 0xd9	zm_jpeg.cpp	63

Code: Select all

dan@desk3:~$ cd /usr/src
dan@desk3:/usr/src$ ls
cambozola-0.92                  linux-headers-3.2.0-32-generic
cambozola-latest.tar.gz         linux-headers-3.2.0-33
linux-headers-3.2.0-30          linux-headers-3.2.0-33-generic
linux-headers-3.2.0-30-generic  linux-headers-3.2.0-34
linux-headers-3.2.0-31          linux-headers-3.2.0-34-generic
linux-headers-3.2.0-31-generic  nvidia-current-295.40
linux-headers-3.2.0-32          vboxhost-4.1.22
dan@desk3:/usr/src$ 
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Newb Hello and Help - Source Orange, Corrupt JPEG & Shar

Post by knight-of-ni »

Well, you didn't state how you installed zoneminder, but I'm going to assume you added it via Synaptic or the Ubuntu Software Center.

The error message you are receiving is referring to the zonemidner source code, which is not included in the Ubuntu deb package you likely installed. You have to download the source code separately.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
dbu
Posts: 3
Joined: Fri Nov 30, 2012 11:51 pm

Re: Newb Hello and Help - Source Orange, Corrupt JPEG & Shar

Post by dbu »

Hi there

I installed ZoneMinder using the 64-bit version of the ZM 1.25 DVD for Ubuntu created by Elfking at http://www.zoneminder.com/forums/viewto ... =6&t=18782.

I guess that distro includes the source code which is why what I did worked for me. I didn't stop to think that other distributions might not include it. Sorry about that ... :(

I'm sorry I can't help with how to obtain the source since I haven't had to do it, although the ZoneMinder Documentation does include some instructions.
rockets
Posts: 10
Joined: Thu Nov 29, 2012 12:55 am

Re: Newb Hello and Help - Source Orange, Corrupt JPEG & Shar

Post by rockets »

Thanks for the reply. I suddenly realized you were recompiling zm, and forgot I posted here. Maybe someday I'll get smart.
Locked