Page 1 of 2

WAR Corrupt JPEG data: 1 extraneous bytes before marker 0xd9

Posted: Sat Sep 10, 2011 5:54 am
by christophe_y2k
Hello, have permanently this warning in my log.
With this IP Camera PT Foscam FI8918W under wifi 802.11b

This a ZM V1.25.SVN bug or an internal bug of this Foscam?

Thanks

Code: Select all

2011-09-10 07:48:12.376707	zmc_m2	19976	WAR	Corrupt JPEG data: 1 extraneous bytes before marker 0xd9	zm_jpeg.cpp	63
2011-09-10 07:48:12.293799	zmc_m2	19976	WAR	Corrupt JPEG data: 2 extraneous bytes before marker 0xd9	zm_jpeg.cpp	63
2011-09-10 07:48:12.258448	zmc_m2	19976	WAR	Corrupt JPEG data: 1 extraneous bytes before marker 0xd9	zm_jpeg.cpp	63
2011-09-10 07:48:11.089237	zmc_m2	19976	WAR	Corrupt JPEG data: 1 extraneous bytes before marker 0xd9	zm_jpeg.cpp	63
2011-09-10 07:48:10.005381	zmc_m2	19976	WAR	Corrupt JPEG data: 2 extraneous bytes before marker 0xd9	zm_jpeg.cpp	63
...
...
...

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sat Sep 10, 2011 8:47 am
by gmar_87
I don't think this is 1.25.0 related. I was also receiving this error in the logs in 1.24.4, but i would also like to know how to fix!

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sun Sep 11, 2011 9:14 pm
by christophe_y2k
Hello,

the only way i found on another forum (i no try)
is to desactivate the error logging in the libjpeg library that return this error
but with my other cam no errors this is foscam relevant

wait and see...

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sun Oct 09, 2011 7:02 pm
by koolb
I was getting this one my newly added foscam monitors. I just disabled them with the following code @ zm_jpeg.cpp:63

(zmerr->pub.format_message)( cinfo, buffer );
if (!strstr(buffer, "Corrupt JPEG data:")) // add this line before warning. It was quite annoying.
Warning( "%s", buffer );

There's probably a better way. Have not done a deep dive into the code. Busy setting up monitors.

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Mon Oct 10, 2011 10:09 pm
by gmar_87
How to analyse JPEG from Foscam cameras to check for corrupt data? I want to provide Foscam with proof so they may investigate the issue.

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Tue Dec 27, 2011 5:10 pm
by px03afk
Is there any progress on this problem. I've only just installed some Foscam cameras and have exactly the same issue.

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sat Dec 31, 2011 4:19 am
by leyton01
Similar issue here

*Foscam FI8918W on 1.2.5

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sat Dec 31, 2011 5:00 am
by koolb
Just got an email asking how I fixed this. Again, simply add the following line just before the Warning(...) line at or near line 63 of zm_jpeg.cpp:

if (!strstr(buffer, "Corrupt JPEG data:")) // this is the new line of code that will eliminate the Foscam 8918W camera...

The above code instructs the program to only send warnings if the message does *not* contain the string "Corrupt JPEG data:".

Once this is done, simply run:

make && sudo make install # from your zoneminder code directory. A zm restart may be in order to activate the change.

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sat Dec 31, 2011 6:42 am
by leyton01
that was me :)

I hadn't done the make and make install to include the change - working now thanks!

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sat Dec 31, 2011 6:41 pm
by px03afk
It's a good workaround but should it really be necessary? Surely there is something wrong somewhere else to need such a fix.

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sun Feb 19, 2012 3:54 am
by koolb
@px03afk - Yes there's some extraneous data in the jpg and that's probably a bug that needs to be fixed. However firmware changes are a bit more risky so I prefer to work around it until "they" get it working someday. For the price/performance I am not complaining if this is the only issue I have had. I did notice that I'm getting more 1 frame signal drops. Could be the cam or my overloaded wireless network using multiple cams/puters/printers. However the trouble of running the new line (which is more suseptible to very close lighting strike on frying quipment) I am also willing to ignore for now with some workarounds.

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sun Feb 19, 2012 10:06 pm
by px03afk
Don't disagree at all about the price/performance and at least there is a workaround, which as far as I am cocerned provides me with a working solution. I've been using ZoneMinder for about a month now and I think it is a great product. Only problem I've been having is understanding how to set up the motion sensing so it catches everything I want and ignores what I don't want, but that is something I'm working on.

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sun Feb 26, 2012 11:27 pm
by koolb
We are always tuning our zones. This warning has *nothing* to do with motion detection at all. Just a few errounous bytes on the jpeg envelope, not the contents.

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sun Mar 11, 2012 5:26 am
by Blazer
I have seen this error in my logs across many versions of Zoneminder, on different servers, operating systems, etc. I think it is an issue with libjpeg, but it has also occured to me with various versions of libjpeg as well. I have scratched my head many times trying to figure this out and finally gave up. I think it may (or may not) be related to my cams randomly going black for a moment, both USB and IP cams. I just give up and accept it now, LOL.

Re: WAR Corrupt JPEG data: 1 extraneous bytes before marker

Posted: Sun Mar 11, 2012 6:34 pm
by dvarapala
It's definitely a camera firmware issue. Other brands of cameras also have this bug (or perhaps the Foscam units with this bug are OEM'd by Arecont Vision?)

My solution was basically the same as mentioned above: add an if statement to the libjpeg code to suppress the error message.

http://www.zoneminder.com/forums/viewto ... 410#p70410