Frames Saved to DB Despite Save JPEGs Disabled

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
apber
Posts: 16
Joined: Sun Jun 27, 2021 3:14 pm

Frames Saved to DB Despite Save JPEGs Disabled

Post by apber »

Investigating fast database growth I found that it's due to the Frames table storing the frames for all events. I have Monitor > Storage > Save JPEGs set to Disabled. Is there any other setting needed to stop each frame from being saved to the db? My goal is to save the video of the event (which is working) but not the individual frames.

The monitor function is Modect and the Video Write is on Camera Passthrough.
ergamus
Posts: 27
Joined: Sat May 29, 2021 10:09 am

Re: Frames Saved to DB Despite Save JPEGs Disabled

Post by ergamus »

Well, if you use MoCord/MoDect mode, every single frame is analyzed for motion. And for every event recorded, every single frame in that event will have an entry in the table you've mentioned. There is also another table that stores per-frame per-zone information regarding pixel thresholds for alarmed/filtered/blob area settings in the motion zones.

If you want to cut down on that, don't use a mode that does motion analysis. Also, maybe configure a higher BULK_FRAME_INTERNAL for the regular Record mode:
Traditionally ZoneMinder writes an entry into the Frames database table for each frame that is captured and saved. This works well in motion detection scenarios but when in a DVR situation ('Record' or 'Mocord' mode) this results in a huge number of frame writes and a lot of database and disk bandwidth for very little additional information. Setting this to a non-zero value will enabled ZoneMinder to group these non-alarm frames into one 'bulk' frame entry which saves a lot of bandwidth and space. The only disadvantage of this is that timing information for individual frames is lost but in constant frame rate situations this is usually not significant. This setting is ignored in Modect mode and individual frames are still written if an alarm occurs in Mocord mode also.
Another thing, if you don't use the statistics gathered for captured frames to tweak your detection zones, you can disable that in settings as well. RECORD_EVENT_STATS:
This version of ZoneMinder records detailed information about events in the Stats table. This can help in profiling what the optimum settings are for Zones though this is tricky at present. However in future releases this will be done more easily and intuitively, especially with a large sample of events. The default option of 'yes' allows this information to be collected now in readiness for this but if you are concerned about performance you can switch this off in which case no Stats information will be saved.
Personally, I'd enable compression on the tables you've concerned about, that should cut your write amount and table size by a minimum of half.
apber
Posts: 16
Joined: Sun Jun 27, 2021 3:14 pm

Re: Frames Saved to DB Despite Save JPEGs Disabled

Post by apber »

Thanks. I had already done what you suggest, except enabling compression on the table. And was suspecting that Monitor > Storage > Save JPEGs does not apply to Modect.

I guess I'll compress the table or expand the db storage.
apber
Posts: 16
Joined: Sun Jun 27, 2021 3:14 pm

Re: Frames Saved to DB Despite Save JPEGs Disabled

Post by apber »

If I enable Save JPEGs images are saved to the event folder. I thought that this setting applied to the frames saved to the database. So, Save JPEGs saves frames to the file system. But putting them in the database depends on the monitor function.
Post Reply