Page 1 of 1

Analysis daemon restarts during a motion triggered event.

Posted: Mon Jul 23, 2018 4:39 am
by McFuzz
Hi all,

I recently added a SV3C 1080p cam configured as ffmpeg device. The camera works great but I did have to set it via TCP as UDP has too much packet loss.

Anyway - I have a very odd situation. I have my buffers set to 400 image buffer size, 40 warmup frames, 200 for both pre and post count, 1000 stream replay buffer and 10 alarm frame count. Camera transmits at about 20 fps consistently.

Whenever an alam occurs, zoneminder will either generate an alarm that has 10 seconds before the alarm and 10 seconds after the alarm (under the alert tag). OR, it will generate one that has the 10 seconds before the alarm, then 10 alarm frames and then the recording stops. I cannot figure out why it is doing so and, with the previous non ffmpeg camera (0.3 MP one...) it worked perfectly every time.

Can someone give me a pointer here?

Thanks!

Re: Inconsistent alarm recording after adding high-def cam.

Posted: Mon Jul 23, 2018 6:40 am
by McFuzz
Hrm - looking at the logs, it appears that the analysis daemon quits prematurely, terminating the alarm after the initial 10 alarm frames that I've setup.

Any ideas?

Code: Select all

Analysis daemon for porchcam needs restarting, time since last analysis 10 seconds (1532325870-1532325860)

Re: Inconsistent alarm recording after adding high-def cam.

Posted: Tue Jul 24, 2018 1:54 am
by McFuzz
Bueller....? :D :(

Re: Inconsistent alarm recording after adding high-def cam.

Posted: Tue Jul 24, 2018 7:54 am
by McFuzz
Halp? Someone? Please? :(

Re: Analysis daemon restarts during a motion triggered event.

Posted: Wed Jul 25, 2018 5:55 pm
by iconnor
Why 40 warmup frames? That means it will not start doing motion detection until it has received 40 frames. I think this feature was more for local cameras.

It may be that with that many pre frames, it is taking more than 10 seconds to write out the initial frames, during which it is not doing motion detection. The zmwatch daemon is noticing that, and so restarting zma. Maybe try increasing your WATCH_CHECK_INTERVAL and WATCH_MAX_DELAY values.

Re: Analysis daemon restarts during a motion triggered event.

Posted: Wed Jul 25, 2018 11:27 pm
by McFuzz
iconnor wrote: Wed Jul 25, 2018 5:55 pm Why 40 warmup frames? That means it will not start doing motion detection until it has received 40 frames. I think this feature was more for local cameras.

It may be that with that many pre frames, it is taking more than 10 seconds to write out the initial frames, during which it is not doing motion detection. The zmwatch daemon is noticing that, and so restarting zma. Maybe try increasing your WATCH_CHECK_INTERVAL and WATCH_MAX_DELAY values.
Thanks! I did 40 frames at first because this high def camera is replacing a low def camera that had 15 fps max during day time; this one is at 30 FPS max during day time (and there are enough resources to maintain that so system load is not an issue).

I did play with different warmup values and still, intermittently, the analysis daemon would fail. I've increased the watch check and max delay values (doubled them) to see how that will affect things.

Another interesting thing I observed is that if I go to that new camera and change buffer settings, once saved, /dev/shm suddenly jumps to 100% capacity and ZM is unable to spin the camera up; logs just state that zma exited abnormally (exit status 255) for that camera and that shared data is not initialized by capture daemon for that particular camera.

Re: Analysis daemon restarts during a motion triggered event.

Posted: Sat Jul 28, 2018 1:04 am
by McFuzz
So it looks like increasing the timers definitely helped prevent the daemon from crashing - yay! But another issues arose now - video playback can lag significantly - as in a 5 second clip takes 20+ seconds to play. If I download the raw AVI (or any other format) - it plays perfectly fine.

Any ideas?

Thanks!