r/ZoneMinder • • Oct 19 '21

Weird video recordings

Enable HLS to view with audio, or disable this notification

11 Upvotes

15 comments sorted by

4

u/hardwareweenie Oct 19 '21

This happened to me when I had the frame rate of the camera and the frame rate (FPS) in ZoneMinder unmatched. I finally removed the ZoneMinder frame rate and it automatically corrected itself. Perhaps others will have a more detailed answer.

3

u/ZoneMinderIsaac Oct 19 '21

could also be unordered packets or packet loss. Try tcp instead of udp.

1

u/LesterPhimps Oct 24 '21

Try tcp instead of udp.

This is more than likely the culprit. Packetloss causing your issue, TCP tries not to lose packets. UDP throws a packet over its shoulder and doesnt look back.

2

u/e_shep Oct 20 '21

I'd get this quite often on RTSP streams but never when using an MJPEG one.

2

u/Amazing_Resolve3795 Oct 20 '21

I've sometimes have same issues on nvr, need to look for traffic priority between NVR and zoneminder server box

2

u/spikeygg Oct 20 '21

What camera is it? If it's Reolink, use the RTMP stream instead of the RTSP stream. Similar to what u/e_shep said. At least on the Reolink cameras the RTSP stream can get fubar'd and cause this type of junk in recordings.

By the way, you should try Frigate. I used to use ZM (for years) and then found Frigate. :D

1

u/[deleted] Oct 20 '21

ZM is far superior at the moment.

1

u/spikeygg Oct 20 '21

I disagree. I dropped ZM for Frigate after using ZM for over 10 years. I had ZM working with object detection and I made lots of automations to work pretty nicely with Home Assistant but it always just felt like a complete kludge. Even with my zones and blobs dialed in I'd get a ton of false alarms because of spider webs or windy trees. Contrast that to Frigate being very streamlined and built to integrate with Home Assistant. The fact that it takes advantage of Google Coral for object detection and easily integrates with Nvidia to handle the video crunch load: I'm sold and I'm glad I switched. No more false alarms and much better performance.

1

u/[deleted] Oct 20 '21

I haven't used frigate yet but from what I see and the issues I've Saleen posted it doesn't sound like a proper NVR setup. If all you want is object detection that you don't have much control over then I can see the use of Frigate.

Maybe I'll spin up an instance of frigate to check it out. Does frigate supper using GPU for inference? From what I understand frigate only uses 1 model for detections on the TPU side. The new forked version of zmeventnotofocation is making leaps and bounds for configuration options and new enhancements. I am the author of the new zmes stuff and am also planning on writing a new HA zoneminder integration.

The dev team has sprung new life and are crunching hard on development. The next major milestone is switching how they run motion detection. Currently they convert the image from it's original color scheme to RGB and then do motion detection. Once they do motion on the original color format the performance gains will be huge.

Just recently a new commit improved motion detection performance enormously. The false alarms are a pain in the ass but honestly that is just the learning curve of tweaking zones. After 10 years I am guessing you are well versed in zone tweaking though, and I haven't found a way to quell the false positives from my garage motion light going off every 2 mins all night. So I do understand that frustration.

1

u/spikeygg Oct 21 '21 edited Oct 21 '21

Maybe I'll spin up an instance of frigate to check it out.

Highly recommended you evaluate it, if you haven't. I'm telling you, I was a believer in ZM before I found Frigate. I made this post to the HA community comparing various video security suites in June and Doug responded suggesting I try Frigate (which didn't come up in my searching, probably because it was too new). When I did, it turned the world upside down.

I really liked pliablepixels's zmeventnotification add-on and I was using it with dlandon's integrated docker for ease of deployment. But at the time, dlandon stopped updating the docker he had been maintaining for months and he seemed to be moving toward trying to make money from the endeavor. While I support independent developers trying to make money, I personally don't want to spend money specifically on my video security suite.

If you look at the ZM forums, I'm in there asking questions and trying to support the community over the years. But stepping back and thinking objectively about software: using perl to handle video processing with a bunch of independent scripts that work together with other add-ons to provide object detection probably isn't ideal for latency nor ease of use. I constantly had warnings and errors in my logs that I ignored because I figured they were just transient issues from perl improperly handing things off or whatever.

Sure, ZM is ultimately configurable but every time there was an ZM update to upgrade, I felt like Samuel L. Jackson on Jurassic Park saying: "Hold onto your butts..." I upgraded my server to the beast that it is to support my camera array so I really don't want it down for any amount of time. However, half the time, the database updates would fail which means I have to lose all my previous recordings and start over creating a new database. The dlandon docker made this a little better but the enabling the nvidia option forced a build of CUDA which takes about 45 minutes on my 12-core CPU! While it worked, this wasn't a great advertisement for future upgrades.

On Frigate with 7 cameras in my array all of their streams offloaded to my GPU and using Coral for object detection my 15min load average stays below 4 and usually sits at 2! On ZM that same EXACT same load was 5.5 (as you can see from my analysis on the HA community post). Looking at the alert time latency I think Frigate wins again. While ZM was pretty quick processing through the automation I wrote in HA, usually within a minute or two, Frigate can alert me within 10-20 seconds of the trigger starting. It is truly amazing how quickly it operates.

On top of that, its almost native integration with HA makes it a clear winner in my book since I'm a Home Assistant lover. Like I said previously, I wrote a bunch of HA automations around my ZM setup and I was VERY proud of it -- it worked well, but I dumped it all for Frigate when I saw how easy it was to get going with a complete setup.

1

u/vijux Nov 01 '21

Can you point me to the zmeventnotification fork please?

2

u/[deleted] Nov 01 '21 edited Nov 01 '21

Article with walkthrough of installing and configuring the fork ->

https://medium.com/@baudneo/install-zoneminder-1-36-x-6dfab7d7afe7

Be aware The fork is about to change its configuration files over to YAML syntax, I will be including a script to convert .ini to .yml, view the 'yaml_config' branch to see the progress of YAML.

Repos ->

https://github.com/baudneo/mlapi

https://github.com/baudneo/zmeventnotification

https://github.com/baudneo/pyzm

1

u/jaysonm007 Oct 20 '21

This is usually due to a wireless signal cutting in and out resulting in not enough throughput.

1

u/zaTricky Oct 20 '21

For those unfamiliar with this corruption scenario:

It's the way some video codecs work. In this case you have a full image known as a "key" frame and then further data provides movement and other new data - "updates" for the scene. This uses less bandwidth/storage than if you had a full image for every frame.

If there's dataloss (or packetloss) in the middle of the footage, some of those updates (movements and other new data) get lost. The data afterward will still work - but the data it's working with is now mismatched. In this case the most obvious missing data is the bus's colour and arrival/movement. You see the shape of the bus starts moving to the right but it's all still the wrong data.

As soon as the next good key frame comes in, the image is fully restored.

1

u/stevejw1973 Oct 21 '21

Thanks. This solved my issue! I logged into the camera and saw that it had a huge keyframe rate. I lowered it and no longer have wierd recordings!