I must be missing something
I've set the monitor to Record for continuous recording.
I want recordings 1 hour lenght.
So according to the docs, I've set in MISC Section Length to 3600 seconds (1 hour)
I'm still getting 1 hour + X minutes lengths (not a few seconds extra but even extra half hour), like 5400 seconds, 6000 seconds and so on...
But I want 3600 seconds lenghts (could be 3605, 3595 seconds or something like that, but not 4000 seconds!)
After some observation, I've noticed that for some weird reason Zoneminder tries to round it up to each hour
For example if I start at 9.37am the section is from 9.37am to 11.00am so the section lenght is at least 3600s but each recording finish at .00... This doesn't make sense to me. I'm looking for just 3600s recordings: From 9.37am to 10.37am, from 10.37am to 11.37am and so on.
Screenshot:
Blows my mind.
[SOLVED] Is Section Length parameter a broken functionality?
[SOLVED] Is Section Length parameter a broken functionality?
Last edited by SirLouen on Sat Mar 20, 2021 12:50 pm, edited 2 times in total.
Re: Section Lenght wrong?
I'm not sure how to solve this. It's extremely weird.
For example when I set up 2 minutes, sections where like 11:01:36am to 11:04:00am then 11:04:00am to 11:06:00am the first section had to forcefully do the extra 24 seconds to round up the first 2 minutes.
This is obviously hardcoded somewhere in the CPP scripts, but I'm not sure where and more importantly WHY. Looks weird as f***.
Re: Section Lenght wrong?
I'm checking the code in zm_monitor.cpp and this has exploded my mind
In the line 1513 there is a conditional that doesn't make any sense:
Why? Why the timestamp has to be a modulus of section_length????
It doesn't make any sense.
As long as this condition is fulfilled
It's more than enough, both in MOCORD and RECORD.
Also, I'm checking that min_section_lenght which is executed under different circumstances. It's true that I've set up min_section_lenght to 3600s and still getting way longer recording lengths (like 5400 seconds), so I'm not 100% confident what's going on there (how frequently these conditionals are checked).
In the line 1513 there is a conditional that doesn't make any sense:
Code: Select all
! ( timestamp->tv_sec % section_length )
It doesn't make any sense.
As long as this condition is fulfilled
Code: Select all
timestamp->tv_sec - video_store_data->recording.tv_sec ) >= section_length
Also, I'm checking that min_section_lenght which is executed under different circumstances. It's true that I've set up min_section_lenght to 3600s and still getting way longer recording lengths (like 5400 seconds), so I'm not 100% confident what's going on there (how frequently these conditionals are checked).