Skipped frames when when having minimum_motion_frames > 0. #79
2konrad
started this conversation in
Enhancements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Did you read the guide?
Yes
What is the base version number of MotionPlus being used?
0.1.x
What was the install method?
Built from source code
What is base architecture?
ARM-64bit
What is the distro being used?
Raspbian
Disto version number
bullseye
Camera/Sound type(s) being used?
PI camera via libcam
Describe the issue/problem and steps to reproduce
Problem found
A) Skipped frames when when having minimum_motion_frames > 0.
B) Picture jumps every second after system load increases, e.g. writing all
minimum_motion_frames
at one timeMy analysis
A) Having set e.g.
minimum_motion_frames 30
leads to a situation where themlp_ring_process
is running in 31 loops to save all images after the motions has been recognised. This leads to almost one second of loop, with no more frames captured.B) Moreover the writing of the 30 frames (or any other event which drags performance) distorts the
mlp_frametiming
logic. In period of high system load to sleep time gets smaller (to mitigate longer processing time).After the high load the smaller sleep time leads to quicker capture and a jump at the end of the second.
Mitigation
A) I corrected this with a max of 3 loops inside of
mlp_ring_process
(see pull request), to even out the load a bit.B) To mitigate, the AVGCNT shall be rather small (e.g. 3) to adapt quickly to new load situations.
Relevant MotionPlus log output (at log_level 8)
cannot be seen in log output
Beta Was this translation helpful? Give feedback.
All reactions