Fundamentally don't understand Frames database table

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
jdharm
Posts: 2
Joined: Mon Feb 05, 2024 5:27 pm

Fundamentally don't understand Frames database table

Post by jdharm »

I'm a complete n00b to ZM. I've been tweaking and refining my new ZM server for a couple weeks now trying to self-help my way out of all the initial setup issues and false starts. These forums have been a big help and I appreciate the info.

However, I'm stumped on one particular matter, the last outstanding big issue I can't figure out. I can't seem to find the right search terms to get what I'm looking for. I can't figure out why records would be written to the Frames database table if there is no analysis happening on a given monitor. It seems I don't truly understand what that table is for. I had thought it was to store stats about motion analysis being done, possibly mpeg delta analysis, but when neither of these things is to be done there should be no records written, yet there is. (My Frames table is fricken huge, 153 million records after 2 weeks of service.)

Not really relevant to this question (I don't believe) but in the interest of FYI: ZM v1.36.33 on Rocky 9.3 with Apache, 75 monitors (one continuous record camera and 37 lowres trigger/highres passthrough pairs) on a dual Intel Xeon Silver 2.4GHz 16C/32T with 64GB RAM, 122TB RAID 6 array for event storage, everything coming in via rtsp. When motion is detected on the lowres, the highres counterpart records a 120s clip. Load: 1.98 DB: 112/250 events: 4% /dev/shm: 5% The thing is barely above an idle. I tried to eliminate one of the pairs and just go to the single 4K cam with motion detection, but one of the virtual cores pegged and RAM usage jumped up an additional 12GB. Looks like I'm either woefully underpowered or ridiculously overpowered, depending on how I configure things. I've decided overpowered is probably the way to go.

An example of my quandary (my typical config): I have a monitor in NODECT mode with Decode and Analysis disabled, JPEG saving disabled, video writer set to passthrough, with no existing zones. Events are triggered by a linked monitor, the lowres rtsp stream from the same camera. Now, in my mind there should be no analysis being done on any of the frames of video being recorded by this monitor and therefore there should be no reason to write a record to the Frames table or capture a thumbnail. Motion detection is being done on the linked monitor, not this one, there are no zones associated with this monitor so there's nothing to analyze, and the mpg is getting passed through with no decode or rendering required. Why does every single frame of video captured by this camera get a record in the Frames table and a thumbnail stored somewhere (I haven't figured out where yet)?

The diagram in the System Overview section of the documentation seems to suggest that all incoming video gets converted to individual frames and motion analysis is happening whether I want it to or not. There is no path drawn on that diagram that bypasses the ZMC and ZMA steps as I imagined "Camera Passthrough" would. But the fact that there are options for disabling analysis suggests that there should be some path not shown that bypasses these steps.

There's something fundamental to the function of the system that I'm not understanding here.

Josh
jdharm
Posts: 2
Joined: Mon Feb 05, 2024 5:27 pm

Re: Fundamentally don't understand Frames database table

Post by jdharm »

OK, I think I've figured it out. Posting details here for the next person who needs it.

I believe that in my lowres trigger/highres passthrough setup the Frames records being generated and associated with events of the passthrough monitor is for the purpose of marking the timeline with detections when playing back the event video. The trigger monitor is generating the info, the passthrough monitor is inheriting the info from the linked monitor for marking purposes. It is done for every frame of the video so that the timeline can be marked in the specific place within the event video timeline.

For cameras in RECORD mode where there is truly no detection or analysis going on there will still be Frames records generated. By default, one every 100 frames. This is controlled by the setting BULK_FRAME_INTERVAL in Options > Config of the webgui.

My next question for anyone who knows: are there any implications for truncating and optimizing the Frames table on a daily basis via script?

We don't care anything about marking the events because all our events are only 2 min long so we don't mind to watch the whole thing to find the motion in the video.
Post Reply