Page 1 of 1

Zoneminder's behavior when receiving a bad image from camera

Posted: Wed Jun 01, 2011 10:48 pm
by harkind
OS: Fedora 14
Zoneminder: 1.24.2 RPM
Camera: Zmodo CM-I12316GY via hard wired Ethernet.

Monitor Settings:
Mocord or Record
Section Length 60 seconds
Break events on section length, not idle or alarm state.

Observations:
Sometimes in the event view of the GUI I will see events that are much longer than the set section length. The majority of the events are 60 seconds. The bad length varies from 60+ seconds to 660 seconds. When this is occurring, I see the following in /var/log/messages:

Code: Select all

Jun  1 16:37:00 monkey zma_m3[19490]: INF [cam_back: 847536 - Closing event 305512, section end]
Jun  1 16:37:00 monkey zma_m3[19490]: INF [cam_back: 847536 - Opening new event 305513, section start]
Jun  1 16:37:00 monkey zma_m9[19470]: INF [cam_porch: 1081336 - Closing event 305510, section end]
Jun  1 16:37:00 monkey zma_m9[19470]: INF [cam_porch: 1081336 - Opening new event 305514, section start]
Jun  1 16:37:00 monkey zma_m5[19480]: INF [cam_driveway: 762696 - Closing event 305511, section end]
Jun  1 16:37:00 monkey zma_m5[19480]: INF [cam_driveway: 762696 - Opening new event 305515, section start]
Jun  1 16:37:05 monkey zmc_m3[19485]: INF [cam_back: 848000 - Capturing at 16.13 fps]
Jun  1 16:37:14 monkey zmc_m5[32658]: INF [cam_driveway: 544000 - Capturing at 15.87 fps]
Jun  1 16:37:19 monkey zma_m5[19480]: INF [cam_driveway: 763000 - Processing at 15.87 fps]
Jun  1 16:37:26 monkey zmc_m9[9145]: WAR [Corrupt JPEG data: premature end of data segment]
Jun  1 16:37:26 monkey zmc_m9[9145]: ERR [Unsupported marker type 0xff]
Jun  1 16:37:26 monkey zmc_m9[9145]: ERR [Unable to decode jpeg]
Jun  1 16:37:26 monkey zmc_m9[9145]: ERR [Failed to capture image from monitor 9 (0/1)]
Jun  1 16:37:26 monkey zmdc[19441]: ERR ['zmc -m 9' exited abnormally, exit status 255]
Jun  1 16:37:26 monkey zmdc[19441]: INF [Starting pending process, zmc -m 9]
Jun  1 16:37:26 monkey zmdc[19441]: INF ['zmc -m 9' starting at 11/06/01 16:37:26, pid = 11092]
Jun  1 16:37:26 monkey zmdc[11092]: INF ['zmc -m 9' started at 11/06/01 16:37:26]
Jun  1 16:37:26 monkey zmc_m9[11092]: INF [Debug Level = 0, Debug Log = <none>]
Jun  1 16:37:26 monkey zmc_m9[11092]: INF [Starting Capture]
Jun  1 16:37:29 monkey zma_m3[19490]: INF [cam_back: 848000 - Processing at 15.87 fps]
Jun  1 16:37:34 monkey zmc_m9[11092]: WAR [Corrupt JPEG data: premature end of data segment]
Jun  1 16:37:34 monkey zmc_m9[11092]: ERR [Unsupported marker type 0xff]
Jun  1 16:37:34 monkey zmc_m9[11092]: ERR [Unable to decode jpeg]
Jun  1 16:37:34 monkey zmc_m9[11092]: ERR [Failed to capture image from monitor 9 (0/1)]
Jun  1 16:37:35 monkey zmdc[19441]: ERR ['zmc -m 9' exited abnormally, exit status 255]
Jun  1 16:37:40 monkey zmdc[19441]: INF [Starting pending process, zmc -m 9]
Jun  1 16:37:40 monkey zmdc[19441]: INF ['zmc -m 9' starting at 11/06/01 16:37:40, pid = 11094]
Jun  1 16:37:40 monkey zmdc[11094]: INF ['zmc -m 9' started at 11/06/01 16:37:40]
Jun  1 16:37:40 monkey zmc_m9[11094]: INF [Debug Level = 0, Debug Log = <none>]
Jun  1 16:37:40 monkey zmc_m9[11094]: INF [Starting Capture]
Jun  1 16:37:47 monkey zma_m9[19470]: INF [cam_porch: 1082000 - Processing at 14.71 fps]
Jun  1 16:38:00 monkey zma_m5[19480]: INF [cam_driveway: 763655 - Closing event 305515, section end]
Jun  1 16:38:00 monkey zma_m3[19490]: INF [cam_back: 848495 - Closing event 305513, section end]
Jun  1 16:38:00 monkey zma_m9[19470]: INF [cam_porch: 1082201 - Closing event 305514, section end]
Jun  1 16:38:00 monkey zma_m5[19480]: INF [cam_driveway: 763655 - Opening new event 305516, section start]
Jun  1 16:38:00 monkey zma_m3[19490]: INF [cam_back: 848495 - Opening new event 305517, section start]
Jun  1 16:38:00 monkey zma_m9[19470]: INF [cam_porch: 1082201 - Opening new event 305518, section start]
Jun  1 16:38:08 monkey zmc_m3[19485]: INF [cam_back: 849000 - Capturing at 15.87 fps]

As you can see from the log, the capture restarts after the error.

The events on disk do seem to have been stopped after 60 seconds, but not in the DB. This makes the events unplayable in the GUI.

My layman opinion as to what should happen in this instance is that a new event be created on disk and in the DB on receipt of a corrupt image.

Any information on this would be greatly appreciated. I can provide more info to anyone who requests it.

Re: Zoneminder's behavior when receiving a bad image from ca

Posted: Thu Jun 02, 2011 2:23 pm
by zoneminder
I know this may not be a lot of help as you are using the rpm version but this is an area which has received quite a bit of attention in versions since 1.24.2. Hopefully there will be an updated rpm soon. I don't create those but I was thinking of having a go myself to see if I could get them out a bit sooner.