Page 1 of 1

Corrupt JPEG data

Posted: Sat Feb 07, 2009 5:36 pm
by snugle
hello,

i set up a new zm machine with following specs.

core2, 2gb ram, suse 11 64bit, 2 arecont vision ip cams

apache2, php5.25, mysql5, zm1.24 (with 1.23.3 the same behavior)

I have the problem now that zmc brings without break a jpeg error under /var/log/messages.

: ...zmc_m2[]: WAR [Corrupt JPEG data: 12 extraneous bytes before marker 0xd9]

Bytecount is different but marker 0x9d is always the same.

Machine and cams are ok, zm is working fine, machine load is heavy because of the jpeg warnings, imagequality is absolute perfect.

Where can I start debugging, any Idea ???

Thanx for your answer and best regards...

ps: sorry for my english, i hope it is understandable.

Posted: Sun Feb 08, 2009 12:27 pm
by snugle
hello again,

after a long night, reading many threads and studing code I found a first solution.

In file zm_jpeg.c I disabled content of function

void zm_jpeg_emit_message( j_common_ptr cinfo, int msg_level ); (Line 48-76)
.

This stops error reporting from zmc. That don't solve the problem why jpeg's are corrupt,
but helps to reduce machine load.

I find many threads with similare problems so that I think it would be helpful to
add a config value for deactivating jpeg error checking.

Have a nice day...

Posted: Mon Feb 09, 2009 8:16 pm
by hrabe
Try upgrade camera firmware... I had the same problem with panasonic camera.

Re: Corrupt JPEG data

Posted: Mon Jul 04, 2011 3:48 pm
by dvarapala
I, too, have an Arecont Vision IP camera that exhibits the same problem. It appears there is a bug in the Arecont MJPEG encoder that puts some extra junk into each frame right before the end-of-image marker. libjpeg complains about this, and zmc dutifully relays the error message from libjpeg to the log, hammering my disk with multiple error messages every second.

The workaround proposed earlier int his thread does get rid of the log hammering, but at the risk of filtering other (perhaps important) error messages.

The workaround I chose was to modify the libjpeg source to ignore the specific error while allowing other error messages to still be reported. Look in the jdmarker.c source file, in the next_marker() function. I added an if statement to suppress the error message when the next marker is 0xd9.

The true solution, of course, is for Arecont Vision to fix their firmware. ;)