Live view zmNinja buffers and throttling

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
ameterasu
Posts: 14
Joined: Thu Jun 16, 2022 9:53 am

Live view zmNinja buffers and throttling

Post by ameterasu »

Hello Everyone,

When I start montage view from zmninja with a vpn connection, I start to get these warnings below;

9/20/22, 2:04:24 PM GMT+3 zms_m8 13072 WAR Exceeded temporary buffer, resuming live play zm_monitorstream.cpp

&

9/20/22, 2:05:44 PM GMT+3 zms_m10 13242 WAR Frame send time 2235 msec too slow, throttling maxfps to 0.40 zm_monitorstream.cpp 425

This is due to the network delay caused by the VPN I believe, but the buffer mentioned in the first warning, is that something I can adjust?

Thanks in advance.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Live view zmNinja buffers and throttling

Post by Magic919 »

It's not really a delay, it's a lack of bandwidth. Changing buffers can't fix that.
-
User avatar
iconnor
Posts: 2880
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Live view zmNinja buffers and throttling

Post by iconnor »

The buffer in question is set using streamreplayimage buffer in buffers tab of mo itor. I suggest a valued of 0.
ameterasu
Posts: 14
Joined: Thu Jun 16, 2022 9:53 am

Re: Live view zmNinja buffers and throttling

Post by ameterasu »

I've tried stream replay image buffer but nothing changed. I think magic919 is right. This is only about bandwidth or latency of the vpn connection.

However, I figured something out, before I was using multi-port, zmninja was updating thumbnails less frequently. Now its trying to keep up with something. Watching a single camera feed is working good but when there are multiple cameras updating thumbnails, network cant keep up.
Setting this update interval in zmninja is not helping. Therefore performance in zmninja was better before the multi-port configuration.

Is there something I can do about this?
ameterasu
Posts: 14
Joined: Thu Jun 16, 2022 9:53 am

Re: Live view zmNinja buffers and throttling

Post by ameterasu »

While there is no network/internet trafic, watching montage page at zmninja, I'm getting perfect flow with about every second update of the monitors.

But the zoneminder logs are filled with thousands of the warning below;

9/21/22, 10:33:39 PM GMT+3 zms_m14 16257 WAR Exceeded temporary buffer, resuming live play zm_monitorstream.cpp 741

What I also observed that when I click on a monitor, start viewing livestream, then go back to the montage screen, first 10 cameras immediately get image and video starts. But the rest takes about 30-60 seconds to load.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Live view zmNinja buffers and throttling

Post by asker »

This paragraph describes the difference between zmNinja multi-port and not using multi-port. In short, when you don't use multiport, zmNinja does not use ZM streaming at all. It just grabs snapshots every single time, and the interval specifies how often if will grab images. The lesser you make it, the more impact it will have on bandwidth, because each time, it will make a new connection to ZM, grab an image and keep repeating the process. In multi-port, ZM is continously streaming images over a single connection per monitor. So switching back to multiport may be the best option. You may also want to play with image quality - its in developer settings (montage image scale - reduce it)
ameterasu wrote: Wed Sep 21, 2022 6:19 am I've tried stream replay image buffer but nothing changed. I think magic919 is right. This is only about bandwidth or latency of the vpn connection.

However, I figured something out, before I was using multi-port, zmninja was updating thumbnails less frequently. Now its trying to keep up with something. Watching a single camera feed is working good but when there are multiple cameras updating thumbnails, network cant keep up.
Setting this update interval in zmninja is not helping. Therefore performance in zmninja was better before the multi-port configuration.

Is there something I can do about this?
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: Live view zmNinja buffers and throttling

Post by pat2 »

Hi Asker,

first of all many thanks for your fantastic ZMNinja app. I'm using it on my Iphone, Android mobile, my mac, my win pc and on ubuntu 16.04. Great, great job!
Many thanks to Isaac too for ZM, a fantastic suirvellance tool.

I have 12 cameras. I tried both methods, multi port method https://medium.com/zmninja/multi-port-s ... 836a336c93 and firefox tweaking https://zoneminder.readthedocs.io/en/1. ... in-firefox

both are working fine with ZM web interface and ZMNinja!

To have a confirm from you: in terms of performace (speed, ZM Web and ZM Ninja promptness, etc,) what do you suggest? Multi-port or Firefox tweaking? what's the fastest method?

thanks a lot

Note: a little difference.
sometimes in ZM Ninja with multi-port method the images of my last 2 cams remain blurry and stopped. And a little warning road sign appears at the bottom left of the 2 blurry cams. I never noticed a such behaviour with firefox tweaking method.
Last edited by pat2 on Fri Sep 23, 2022 12:23 pm, edited 2 times in total.
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
ameterasu
Posts: 14
Joined: Thu Jun 16, 2022 9:53 am

Re: Live view zmNinja buffers and throttling

Post by ameterasu »

asker wrote: Thu Sep 22, 2022 1:00 pm This paragraph describes the difference between zmNinja multi-port and not using multi-port. In short, when you don't use multiport, zmNinja does not use ZM streaming at all. It just grabs snapshots every single time, and the interval specifies how often if will grab images. The lesser you make it, the more impact it will have on bandwidth, because each time, it will make a new connection to ZM, grab an image and keep repeating the process. In multi-port, ZM is continously streaming images over a single connection per monitor. So switching back to multiport may be the best option. You may also want to play with image quality - its in developer settings (montage image scale - reduce it)
I understand this part. The issue is my logs are filled with warnings of "Exceeded temporary buffer, resuming live play".

This starts as soon as I click on montage at zmninja. Without any bandwidth errors.

What buffer this may be?

Edit: I assume this warning and my first cameras having higher refresh rate than last ones at montage page might have a common cause.

Edit2: Also, montage image scale is not going below 10%, and I think it has no effect. Below are comparison of montage view of 10% and 100% montage image scale.
10% Montage Image Scale
10% Montage Image Scale
10.jpg (44.83 KiB) Viewed 6820 times
100% Montage Image Scale
100% Montage Image Scale
100.jpg (44.79 KiB) Viewed 6820 times
Montage Image Scale Settings
Montage Image Scale Settings
photo_5866217009375721749_y.jpg (62.22 KiB) Viewed 6814 times

Edit3: I also think that settings below have no effect as well (Options>LowB/W>WEB_L_DEFAULT_SCALE & WEB_L_VIDEO_MAXFPS). My camera feeds are 8fps. I've tried to limit it to 3fps for live+montage views. I still see throttling errors starting from 6.67 and so on. Same for live+event scale in zoneminder. Setting it as low as 25% has no effect.
Post Reply