Analysis FPS

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
montagdude
Posts: 62
Joined: Fri Nov 10, 2017 6:05 pm

Analysis FPS

Post by montagdude » Tue Nov 14, 2017 5:22 pm

Hi,

I don't see any documentation on this setting. There is a little bit of info on the forums, but not a lot, so I wanted to get some clarification. I have my IP camera set to stream at 5 FPS. That seems to be plenty for recording events, and my wifi bandwidth handles it fine. If the Analysis FPS does what the name implies, it seems like it would be a good way to reduce the server load a bit while still being able to record at the stream's framerate. Is that true? Are there any caveats to this setting like there are for the Maximum FPS and Alarm FPS settings? Also, if the Analysis FPS is less than the framerate of the stream, should it be set to a number such that the frame skip is constant? In other words, if I set my Analysis FPS to 3 while the stream is at 5, is ZoneMinder going to analyze two frames in a row, then skip 1, then analyze 1, then skip 1, then analyze 2, etc.?

Thanks for the info, and thanks to the developers for providing such excellent software for free.

montagdude
Posts: 62
Joined: Fri Nov 10, 2017 6:05 pm

Re: Analysis FPS

Post by montagdude » Wed Nov 15, 2017 1:35 pm

Well, I can partially answer my own question. For one thing, the Analysis FPS doesn't have to be an integer, so I set it to 2.5 while my cameras stream at 5 FPS. It does pretty much what I thought, except that when in Modect mode the events will be saved at the Analysis FPS, not the stream FPS. When looking at the live stream, it will be at the stream FPS. This makes a lot of sense, actually, but also makes the Analysis FPS setting not so useful for what I wanted to do (detect motion at 2.5 FPS and record events at 5 FPS). I decided to just erase this setting and bump the stream from my camera down a bit to 3 FPS, which still seems to be plenty for motion detection and person identification from recordings.

I didn't try Analysis FPS = 3 while the stream was at 5 FPS to see whether frames are skipped unevenly, because the ability to make this setting a float makes it pretty much a moot point IMO.

nirv199
Posts: 23
Joined: Wed May 13, 2015 11:55 am

Re: Analysis FPS

Post by nirv199 » Mon Nov 27, 2017 6:07 pm

I was just researching this very same question and bumped into this post. I even tried going through the online github repo to see if I could find how AnalysisFPS info is used for the image/event storing but no luck so far. I also had the same expectation as you did (analysis FPS would be orthogonal to the max/alarm FPS) when trying to guess what that feature did. That would be really good.

I was thinking on opening a github issue for this, but wanted first to try on an alternate OS (I am currently using ZM on FreeBSD 11.1) to see if that behaviour was consistent or if that was only happening on the OS I am using.

It would be nice if one of the developers reading this could comment on about the AnalysisFPS feature.

nirv199
Posts: 23
Joined: Wed May 13, 2015 11:55 am

Re: Analysis FPS

Post by nirv199 » Wed Nov 29, 2017 3:56 pm

Not sure if this is the key, but it seems there's a dedicated (different) buffer is analysis_fps is set:

https://github.com/ZoneMinder/ZoneMinde ... 1369:L1419

Maybe this is only copying the frames being analyzed to it, and therefore only storing those as opposed to the other buffer (which has a complete set including *all* frames) ?

montagdude
Posts: 62
Joined: Fri Nov 10, 2017 6:05 pm

Re: Analysis FPS

Post by montagdude » Wed Nov 29, 2017 4:35 pm

nirv199 wrote:
Wed Nov 29, 2017 3:56 pm
Not sure if this is the key, but it seems there's a dedicated (different) buffer is analysis_fps is set:

https://github.com/ZoneMinder/ZoneMinde ... 1369:L1419

Maybe this is only copying the frames being analyzed to it, and therefore only storing those as opposed to the other buffer (which has a complete set including *all* frames) ?
I think that's the case. When I set Analysis FPS, my events showed only the analyzed frames. Using a different buffer for the analysis task makes sense too, because it is much cleaner to do it that way than to keep all the frames from the stream in the buffer and then implement some convoluted logic about which ones to analyze. You would also end up with an awkward situation where stats would be skipped for frames that were not analyzed, making viewing events more confusing. Considering these complications, I can see why the developers would implement it the way they did.

That said, with Analysis FPS being implemented this way, it makes the feature mostly useless. The only benefit I can see is being able to reduce the load on your server while still being able to view the live stream at a higher framerate. But I don't care much about the framerate of the live stream.

nirv199
Posts: 23
Joined: Wed May 13, 2015 11:55 am

Re: Analysis FPS

Post by nirv199 » Wed Nov 29, 2017 7:16 pm

Need to track where this got added (will check changelogs) to find any information around as it seems it hasnt been documented (found this other post below)

viewtopic.php?t=25513

nirv199
Posts: 23
Joined: Wed May 13, 2015 11:55 am

Re: Analysis FPS

Post by nirv199 » Thu Nov 30, 2017 1:38 pm

Here's where it was added (1.29):

https://github.com/ZoneMinder/ZoneMinder/pull/956

I read through all the notes, and there is no explicit mention to the behaviour we think it should be, however there are some notes on the different buffers and variable FPS frames and so on. Not sure if the author is around in the forums that could comment on it, or maybe knnniggett could comment about it as he merged that to the code?

SkippyDo
Posts: 98
Joined: Mon Nov 20, 2017 6:49 pm

Re: Analysis FPS

Post by SkippyDo » Fri Jan 19, 2018 11:04 am

I just stumbled across this thread after having difficulties finding any documentation on this setting. Reason I was looking at this setting was because I was wanting to do some tweaking on my cameras' frame rates. My cameras are all streaming at 20FPS and I thought that this was unnecessarily high and that perhaps reducing it might allow me to bump up the analytics*. I have "Analysis FPS" currently set to "1." No issues with system loads or anything else.

* Thinking about bumping up my resolution and increasing the Analysis FPS.

What sort of impact on performance would I expect if I were to drop the cameras' FPS from 20 FPS to 5 FPS and set "Analysis FPS" to 5 (discounting any resolution changes)?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests