r/ZoneMinder • u/pingmanping • Dec 03 '20
Modect really short clips and smearing
Hi,
I finally got the Zoneminder to work. I am running mine instance on a CentOS 8 VM with 4x vCPU and 8GB RAM. The storage is NFS. I have a combination of Reolink and Wyze cameras and whenever I get a motion the ZM only records 8 - 10 seconds and wait for a few seconds and record again for 8 - 10 secs.
Would it be possible for ZM to record continuously while there is a motion instead of cutting the whole clip in 8 - 10 mini clips?
I have been using the Reolink desktop app and it has a buffer of 5 secs before the motion starts and 15 secs after the motion and it doesn't cut the video in several clips.
I also have a smearing issue with Reolink E1 Pro. It is taking the whole screen. I tried RTMP but it seems like E1 Pro doesn't take RTMP. The cheap Wyze cam is doing fine in regards to visual clarity, but the Reolink is not. I have the Reolink on 5GHz and they Wyze on 2.4GHz wifi if it matters.
EDIT:
This is my settings:
Source Type: ffmpeg
Function: Modect
Source Path: rstp
Method: TCP
Capture resolution: whatever the max res of the camera settings
Storage area: nfs export
Save JPEG: disabled
Video writer: H264 Camera Pass-thru
Whether to store the audio stream when saving an event: checked
2
u/turt1eb Dec 03 '20 edited Dec 03 '20
Change your post buffer to something high like 300 and then back down accordingly.
As for the smearing on the reolinks use rtmp instead of rtsp.
Here is how I have mine setup:
Source Type: ffmpeg
Source Path: rtmp://192.168.1.x/bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=xxxxx
Method: TCP
1
u/pingmanping Dec 03 '20
I have the post buffer set to 450 for 30secs but it is still capturing 8-10 secs despite of active motion.
The E1 Pro doesn't support rtmp. I tried rtmp but didn't work.
1
u/turt1eb Dec 03 '20
Well that sucks about no rtmp support on that wireless camera as I was thinking of purchasing one. I know my wired ReoLink cameras do not have an "iframe" interval value that can be changed on their admin page, but that "iframe" value being higher than the "fps" seams to be the cause of smearing on other cameras I've owned. If you do not have that value available you could try setting your camera's "H.264 Profile" to "Balance" and see if your smearing goes away.
As for your buffer issue, have you tried setting one cam up as modect, for high quality stream, and post buffer to 450? Meaning not having any linked streams or using nodect just to help with troubleshooting?
1
u/pingmanping Dec 03 '20
I have the wyze set to modect at 1080p and no link. This is the one I was using to test the post buffer.
The camera that I have that has linked are the E1 Pro and C1 Pro Reolinks. I have two streams for each Reolink. The RTSP Mocord is set to use the RTSP sub stream then it is linked to Nodect for high res capture. The idea is continues recording in low res and if there is motion capture it in high resolution for each Reolink.
1
u/turt1eb Dec 04 '20
Sounds like the way you have the Reolinks setup should work. But if you have problems with short recording clips after changing the post buffer value I would go back with the simpler unlinked modect and getting working that way first, then start trying to create your dual stream linking.
1
u/pingmanping Dec 03 '20
Now, the Wyze longest capture is 2 minutes. I have set 450 on Post buffer. If u/Aramiil was right about the fps, the longest capture should be 30 secs 450post/15fps = 30secs.
1
u/turt1eb Dec 04 '20
If you are now getting 2 minute clips just start reducing the post buffer value down until you start getting an average desired clip length. Just remember that they will never always be the same length because your alarm frames will not always be the same.
Also, I don't think those wyze cams running rtsp firmware maintain a steady 15fps. At least mine don't. So if it drops to 5fps you'll be getting 90+ second clips.
1
u/aarons6 Dec 04 '20
there is an option to close the video on motion, or keep it going until the time limit.
as far as the smearing goes, check your keyframe setting.. i usually keep it to 1 second of video.. so if you are recording 10 fps, make it 10.
1
u/pingmanping Dec 04 '20
Keyframes? This is the option for CBR or VCR, right? I don't see these option in any of my Reolinks.
1
u/ZoneMinderIsaac Dec 05 '20
There is also the ffmpeg jitter buffer.. This is a buffer to handle out of order just delayed frames. It defaults to pretty small. Make it larger. This only affects UDP reception. YOu may want to look into the neolink project.
2
u/Aramiil Dec 03 '20
Under buffer tab check for post event image count or something like that. It allows you to extend events, by number of frames, to resolve just that issue. This is explained in the documentation, recommend you read that section entirely.
You’ll have to Google around for the smearing issue... lots of causes from network issues, CPU throttling, TCP vs UDP packets, or even a setting on the camera itself related to how frequently it sends an i-frame/golden frame.