Page 1 of 1
Invalid Jpeg Structure...failed to capture
Posted: Wed Mar 11, 2009 3:46 pm
by jnk1690
Hi,
I'm testing a new 1.24.1 install against an existing 1.23.x install. On the new one, I am receiving the following messages (only one test IP cam installed)
zmc_m1[7908]: ERR [Invalid JPEG file structure: two SOI markers]
zmc_m1[7908]: ERR [Unable to decode jpeg]
zmc_m1[7908]: ERR [Failed to capture image from monitor 1 (0/1)]
zmdc[5323]: ERR ['zmc -m 1' exited abnormally, exit status 255]
I also get the following:
Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
[Unable to store frame as shared memory invalid]
For shared memor, what is the most recent calculation? Although I didn't think it would be an issue for only one test cam.
On the 1.23.xinstallation, the messages do not happen, even with the same IP cam.
Using RHEL5.3
Just installed ffmpeg from the ffmpeg site
Any suggestions on where to look to resolve this? It seems to be capturing with motion-detect, but I'm not sure if the results are complete.
Thanks in advance.
Joel
Posted: Wed Mar 11, 2009 6:55 pm
by Blazer
Welcome to my world. I get this same issue on CentOS 5.2/5.3, and Fedora Core 10 (see my post
http://www.zoneminder.com/forums/viewtopic.php?t=13252). It acts like a libjpeg issue, but Zoneminder 1.23.x (even 1.22.x) works fine on the same machines. I have yet to figure it out
I also noted that the jpeg errors were frequent but random, and everytimg zmc crashes, zm restarts it, so it will work for a bit, and capture several frames, then zmc gets the jpeg error, crashes, repeat.
Posted: Wed Mar 11, 2009 7:21 pm
by jnk1690
I don't know how I missed your post when I searched!
Anyway, it looks like I might need to download the 1.23.3 and stick with it for a while.
I'll post again if I have any 'break throughs'
Thanks,
Joel
Posted: Wed Mar 11, 2009 7:47 pm
by Blazer
I switched to ffmpeg ver 0.5 instead of using an svn build. It did not have any effect on the jpeg decode errors, (in case wondering, yes I recompiled/reinstalled zm afterwards) so again this acts like a libjpeg problem, yet ZM 1.23.3 and even an rpm version of 1.22.3 work fine on the same server. So strange!
Posted: Wed Mar 11, 2009 8:11 pm
by jnk1690
By the way, for the 1.23.3 "make install", it can't find ffmpeg/avformat.h and swscale.h, although they both exist. How do I specify the location? (They are in /usr/local/include/libavformat/avformat.h and /usr/local/include/libswscale/libswscale.h
I had a tough enough time making the 1.24.1 compile and I just can't find the option....
Thanks again
Posted: Wed Mar 11, 2009 10:27 pm
by Blazer
Add "--with-ffmpeg=/usr/local" to your ./configure statement
Also, if you installed ffmpeg to /usr/local/bin, do not forget to add /usr/local/lib to your ld config. To do so I created a file called "ffmpeg.conf" in /etc/ld.so.conf.d, which contains a single line that says "/usr/local/lib", after which you run the "ldconfig" command. This enables the installed zm binaries that are in /usr/local/bin to find the ffmpeg libs that are in /usr/local/lib.
Unable to decode JPEG
Posted: Wed Jul 01, 2009 2:10 pm
by liviab
And the problem with JPEG?
Did anyone resolve it?

Jpeg problem
Posted: Fri Jul 03, 2009 12:46 pm
by dmcelvy
I also have the corrupt jpeg problem with 1.24 and from what I can tell it seems to be related to ip cameras, in my case Dlink 5300. I have another remote monitor to a local camera from another computer and don't see the issue. I did not have the jpeg problem in 1.23.
Posted: Tue Jul 07, 2009 6:22 am
by cordel
Give a try at setting combinations Regex and maybe http protocol. If it worked in an earlier version it should work fine now. Some settings that used to be global only are now per camera setup including Regex.
Regular Expressions
Posted: Tue Jul 07, 2009 11:50 am
by dmcelvy
Cordel, Thanks for the suggestion!
So far regular expressions seems to have solved my problem with two SOI headers and my ip cam.
Posted: Tue Jul 07, 2009 12:53 pm
by cordel
Good glad it sorted you out, hopefully others will be able to report the same.
Posted: Wed Jul 08, 2009 5:43 pm
by liviab
I was using a remote camera with http protocol and simple method. I was not working.
I changed to regexp method and now it is working. However, there are warnings and errors with/about JPEG.