Time sync problem

Omaha

n3wb
Joined
Dec 14, 2014
Messages
24
Reaction score
1
Location
Oklahoma
I have 10 Hikvision cameras connected to a dedicated Windows 10 Pro machine, running Blue Iris. I'm having trouble getting the camera clocks to synchronize. I followed the article here: How to Create a Standalone NTP Server With Windows and went through the process of setting up the W32Time service as an NTP server. I've opened UDP port 123 on both outbound and inbound settings and allowed private network connections within Windows. I still don't seem to have this set up correctly. When I run the w32tm /query /configuration command, the VMICTimeProvider doesn't show up under the Time Providers section. And, the camera clocks still aren't synched. Can somebody point this poor feeble mind in the right direction?

--O
 

Omaha

n3wb
Joined
Dec 14, 2014
Messages
24
Reaction score
1
Location
Oklahoma
Thanks for the reply. Have NetTime setup and running as a service. Turned off Windows Time Service. Still don't have perfect agreement between clocks. When viewing all cameras at once in BI, the clocks can be seen to differ from system time. Some are off by 30 seconds or more. All cams except 1 always lag behind system time. One is always ahead. But, when you click on a specific camera to make it the active window, that screens camera clock will race ahead to match or nearly match the system time. Then, when you change focus to another camera, the first camera's clock stops incrementing for several seconds until it is again lagging system time. It's not a mission critical problem. Just seems very odd to me. Anybody else have trouble getting cam clocks to sync?
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,910
Reaction score
21,308
Thanks for the reply. Have NetTime setup and running as a service. Turned off Windows Time Service. Still don't have perfect agreement between clocks. When viewing all cameras at once in BI, the clocks can be seen to differ from system time. Some are off by 30 seconds or more. All cams except 1 always lag behind system time. One is always ahead. But, when you click on a specific camera to make it the active window, that screens camera clock will race ahead to match or nearly match the system time. Then, when you change focus to another camera, the first camera's clock stops incrementing for several seconds until it is again lagging system time. It's not a mission critical problem. Just seems very odd to me. Anybody else have trouble getting cam clocks to sync?
This could be caused by network or pc lag...you need to optimize your setup.
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
yeah, sounds more like a display lag issue on your BI machine. the selected camera gets more lovin so it's more real-time, but the unselected cams are not updating as quickly. what bitrate are you cams running at? maybe show the 'cameras' tab of the BI status page. and what are the specs of your BI PC? what sort of switch(es) are the cams and BI connected to? you have D2D and hardware accaleration enabled, right? etc, etc...
 

Omaha

n3wb
Joined
Dec 14, 2014
Messages
24
Reaction score
1
Location
Oklahoma
Yeah that makes sense. The cams which are lagging on their display times are all running through a 16 port Nway POE switch. The cam with the clock which is running ahead is connected to an injector. Seems surprising that it would be running fast, though. Yes, direct to disk and hardware accel are active. PC is custom Intel i7 5775c on an ASUS H97i Plus mobo. 8 gigs of RAM. I'm using the mobo graphics feeding a 27" 4k display. Cam bitrates are around 500 kB/sec. Here's the camera page:

upload_2019-4-2_22-32-19.png
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
ok, that's more info, but i meant the camera's tab in the 'stats' page. the one that shows all the connected cams and their current fps & bitrates, etc...
 

Omaha

n3wb
Joined
Dec 14, 2014
Messages
24
Reaction score
1
Location
Oklahoma
Oh, duh. That would make more sense. Here is what I have:
upload_2019-4-3_19-27-23.png

Thanks for your help. FWIW, it's the "Cube" on xxx.101 that is connected to it's own POE injector. Not sure what to do with this information or your line of thinking. Is there a practical limit on bitrate at which point you can expect network congestion?
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
my thinking was that you have overloaded your switch, which would explain why the cam that's NOT on the poe switch is fine.

try unplugging or turning off 2-3 cams on the switch and see if the others get better.

what's the make/model of the switch? if it doesn't have at least a gigabit uplink port (to your BI server) , you might need to upgrade...
 

Omaha

n3wb
Joined
Dec 14, 2014
Messages
24
Reaction score
1
Location
Oklahoma
I’ll be out of town for several days and will try unplugging some cameras when I get back. The switch is made by Nway. It’s a gigabit switch. Is this total bitrate unusually large?
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
the sum of your bitrates is getting close to what a 100Mbps link could handle, but a gigabit switch should not be a bottleneck.

how are your GB Poe switch and BI server connected to your network? maybe show us a diagram of your network?
If they are all hanging off a 10/100 router, the bottleneck might be there...
 

Omaha

n3wb
Joined
Dec 14, 2014
Messages
24
Reaction score
1
Location
Oklahoma
I think you may have hit upon something. I do have a switch behind the router that I had forgotten about since it is in a remote location. I suspect it could be a 10/100. Will have to check when I get back. Thanks so much for your help. I really appreciate it.
 

catcamstar

Known around here
Joined
Jan 28, 2018
Messages
1,659
Reaction score
1,193
Just an idea: are any of the cams doing "multicast"? Dahua doorbells for example can run into multicast broadcast storms. Then you need to turn that feature off before the leds on your switches burn out :)
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,701
Reaction score
14,085
Location
USA
But, when you click on a specific camera to make it the active window, that screens camera clock will race ahead to match or nearly match the system time. Then, when you change focus to another camera, the first camera's clock stops incrementing for several seconds until it is again lagging system time.
This sounds like you've enabled Blue Iris's "Limit decoding unless required" feature without understanding it.
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
good point! What are your cam's FPS and Iframe intervals set at?

As I read it, the 'limit decoding unless required' setting only decodes keyframes, so if this were causing the problem,
the OP would be seeing un-focused cams lagging by up to 1 full keyframe. if keyframe interval matches FPS as we
always suggest, that would be at most 1 second. If the OP is seeing lags longer than that, he's either got a really long i-frame interval (possible)
or the issue is elsewhere...
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
good to know. sounds more like that is the cause...
 

Omaha

n3wb
Joined
Dec 14, 2014
Messages
24
Reaction score
1
Location
Oklahoma
Thanks guys. Lots of good information. Can someone explain keyframe vs i frame? I will look at this stuff when I get back.
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
iframe == keyframe, mostly. the iframe interval is how often a full frame of video (or key frame) is sent instead of just the differences from the previous frame. it's a setting in the camera's 'video' config page , usually...
 
Top