Invalid Jpeg Structure...failed to capture

Forum for questions and support relating to the 1.24.x releases only.
Locked
jnk1690
Posts: 30
Joined: Wed Jul 30, 2008 1:52 pm

Invalid Jpeg Structure...failed to capture

Post 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
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post 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.
jnk1690
Posts: 30
Joined: Wed Jul 30, 2008 1:52 pm

Post 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
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post 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!
jnk1690
Posts: 30
Joined: Wed Jul 30, 2008 1:52 pm

Post 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
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post 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.
liviab
Posts: 87
Joined: Wed Oct 15, 2008 11:54 am
Location: Brazil [MG]

Unable to decode JPEG

Post by liviab »

And the problem with JPEG?
Did anyone resolve it?
:(
dmcelvy
Posts: 8
Joined: Sat Jul 26, 2008 10:36 pm

Jpeg problem

Post 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.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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.
dmcelvy
Posts: 8
Joined: Sat Jul 26, 2008 10:36 pm

Regular Expressions

Post 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.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Good glad it sorted you out, hopefully others will be able to report the same.
liviab
Posts: 87
Joined: Wed Oct 15, 2008 11:54 am
Location: Brazil [MG]

Post 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.
Locked