You are using RTSP as video inputs in Multicam and notice a time lag between the video and the audio. RTSP streams carry audio and video with independent timestamps (RTP timestamps). If the clocks on the cameras drift, the two streams gradually become out of sync by a few seconds per hour. To fix that, a reliable NTP synchronization needs to be configured for each camera. To do so, we will configure an local NTP server on the Multicam PC and use it as a source for the cameras.
Set up NTP sources on the computer
To ensure your PC serves as a reliable source for your cameras, it’s best to use multiple sources so that Windows can compare any discrepancies. For the NTP sources,
- 0 = national NTP sources
- 1 = continental NTP source
- 2 = global NTP source
For France, this will look like
0.fr.pool.ntp.org 1.europe.pool.ntp.org 2.pool.ntp.orgFind the corresponding national and continental NTP source for your country here : https://www.ntppool.org/zone/@
If you are not sure, you can use the global one for the 3 sources. The global address uses IP geolocation. When you query pool.ntp.org from France for example, the NTP Pool project's DNS system automatically tries to return IP addresses of servers located in France or Europe. This is the “one-size-fits-all” solution for users who don't want to configure their zone.
And don't worry, Windows won't query the same source three times. Even though the root domain name is the same (pool.ntp.org), the prefixes 0, 1, and 2 are separate DNS entries within the NTP Pool project's infrastructure.
Open a command prompt in admin and type the following command (adapt the sources to suit your needs)
w32tm /config /manualpeerlist:"0.fr.pool.ntp.org 1.europe.pool.ntp.org 2.pool.ntp.org" /syncfromflags:manual /reliable:YES /updateThen type
w32tm /resyncVerify that your 3 sources are working with this command
w32tm /query /peersYou can check which source Windows is currently using with this command
w32tm /query /statusFor example here, I know that Windows is using the first national NTP source.
Set Up the Multicam PC as an NTP Server
This step requires editing the Windows Registry to enable the NtpServer component. To do so, copy the following commands :
To activate the NTP server component
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /v "Enabled" /t REG_DWORD /d 1 /fTo configure the service announcement
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config" /v "AnnounceFlags" /t REG_DWORD /d 5 /fFor your cameras to synchronize, the server must announce itself as “Reliable.” The value 5 forces the server to announce itself as a reliable time source even if it is not a member of an Active Directory domain.
Restart the service to apply the changes
net stop w32time && net start w32timeOpen the corresponding port on the Windows firewall
netsh advfirewall firewall add rule name="NTP server" dir=in action=allow protocol=UDP localport=123
Verify that your local Ethernet where your Multicam PC and cameras are connected is declared as a private network.
With the public profile, there is a risk that the firewall ignores UDP 123 packets from the cameras, treating them as suspicious traffic on an unidentified network.
You can verify this with the powershell command
Get-NetConnectionProfileHere, my "cameras" network is in public. I will change it to private.
In this example, the InterfaceIndex of this network card is 6. To change the category, use this command (change the interface index to your configuration)
Set-NetConnectionProfile -InterfaceIndex 6 -NetworkCategory PrivateVerify that the modification is done
Get-NetConnectionProfile -InterfaceIndex 6All good !
Configure the NTP settings on the cameras
All you have to do now is connect to your cameras and declare the IP address of the Multicam PC as NTP server. Then reboot your camera to save the changes.
Adjust the buffer settings
On Multicam, adjust and test the buffer settings of your inputs with low delay enabled or disabled.
Comments
0 comments
Please sign in to leave a comment.