We improve the work of the video surveillance system and prevent failures

Obviously, it is better to prevent the disease than to treat it later.

With the construction of video systems, everything is exactly the same. Instead of looking for reasons and solving display / recording / archiving problems during the process of use, it’s better to think a little longer and think more carefully at the design stage to avoid trouble in the future.

Our technical support is active, very active. She consults, helps to configure and, of course, solves problems in video systems. Often these problems are visible in the software environment, but they are not related to Macroscop. The video system is multi-component, if something breaks in it or simply does not work properly, the user will not see that some part has deteriorated. He will see jerks in the realtime video, and “holes” in the archive. Does this mean that the problem is in the software? Often the reason is completely different.



Due to the fact that contacting Macroscop technical support (as it turns out later) in 40% of cases are not related to software performance, we decided to conduct a small educational program on planning and building video systems. And to tell why not to skimp on the time and money at these stages is important, and what will happen if you do not. We will talk including the obvious. But as experience shows, to understand and do - different things .

To begin with, what the problem might look like. Visually, a signal that something is going wrong in the system may be:

  1. No connection with the camera. You just do not see the video from the camera in real time and do not get an archive from it.
  2. Non-smooth video display (jerks / accelerations / delays).
  3. Empty places ("holes") in the archive. Record, it seems, was, but there is no piece of video in the archive.
  4. Artifacts. Something that actually did not appear on the video (provided that otherworldly forces did not contribute to this).



What can cause violations?

Network


If the video did not come from the camera to the server, the server did not go to the client or to the storage, the communication channel is most often to blame. It may not be wide enough, not stable enough, not sufficiently discriminating (it does not know how to set priorities correctly when there is a lot of diverse information on it).

Therefore, the first thing you need to pay attention to at the start is the width of the future communication channel. It is calculated simply - we take all the cameras of the future system, determine how many Mbit of information each of them will send every second (for this we need to understand what quality of recording is required - resolution, frequency, format), take into account whether the video will be displayed (from how many cameras and on how many monitors), we make a 10-15% increase in technical traffic and we understand where and what bandwidth will be needed.

It is best to draw a diagram of the future system. This can be done, including with the help of special programs (Graphical Network Simulator 3, for example), they will help with calculations and identification of “bottlenecks”, to which special attention should be paid. This is a simple and obvious tool, but in practice very few people use it. Especially among novice installers.

Separate the video surveillance network from the telephony network, the Internet and any other systems. In order for the video system, which removes the offense, not to lose in the fight for the traffic from YouTube, which at this very moment 10 employees of your company decided to watch, you need to allocate a separate channel for it.

You can separate the network physically and logically. In the first case, you install separate equipment and run individual cables, in the second case, select switches with VLAN support. In practice, from the point of view of customization, it is easier to separate physically if there is an opportunity to incur additional costs.

It is important to calculate the power when choosing network equipment . A manufacturer may claim more bandwidth to the switch ports, but this does not guarantee that the network device processor will sustain this entire amount of data.

It is necessary not only to think over the network competently, but to assemble it qualitatively . It comes to the banal: the user badly compressed patch cord, and this leads to a loss of connection or breaks in the archive. It is not possible to find such a problem so quickly, because, as a rule, it’s the last thing to check the performance of such trifles as patch cords or router slots.

Data storage systems


It is important not to forget to calculate the necessary width of the channel between the server and the network storage of data. This is often overlooked.

In order for storage systems to cope with recording the incoming volume of information from a video system, it is necessary to calculate the required memory size and also evaluate IOPS (the parameter responsible for the number of I / O operations performed by the storage system per second). This can be done with the help of special programs (Iometer, IOzone, FIO, CrystalDiskMark).

If the system is multi-server, we recommend that instead of one more capacious storage, choose a few smaller volumes to avoid excessive loading.

Antivirus and firewall


As a rule, firewall and anti-virus software have an impact on the video system, as they interfere with network traffic. It can also be Windows Defender, Windows Firewall, Hardware firewall, etc.

It is possible to disable anti-virus software, but it is often impossible to exclude a firewall without changing the overall system configuration when it is already built (especially if we are talking about a large and complex system). We have to rebuild the entire network. Therefore, it is worth to take care to disable or exclude from the video surveillance system all software and devices that may limit the receipt or transmission of data. Often, even setting “exceptions” does not allow completely restricting access of such solutions to video traffic.

Equipment


In addition to the obvious (cameras, servers, storage must be in order) there are some points in the settings of the equipment, which are also desirable to take into account. Be sure to check that your computers will not go into power saving mode . Otherwise, the system will work, but the network will be in low priority, so some of the data from the cameras may simply not come. And it will be very difficult to find the cause, because as soon as you start searching, everything will miraculously get better.

When choosing IP cameras in the project, pay attention to the data transfer protocol they use. To minimize losses, choose a TCP connection (good, it is much more common). Then, in the case of network errors, a repeated request for information from the camera will occur, and with a high probability it will catch up with a slight delay, which is not noticeable to the user.

Sometimes problems arise because the user requests several streams from the camera at a time, and the camera cannot cope with it. Manufacturers rarely give their recommendations on the number of streams, so they will have to be tested by experience.
The installed camera itself may not work correctly and send video with artifacts to the server. To check that the case is in the camera, and not in the video system software, for example, you can use the VLC player: if artifacts are observed in the player, the reason should be looked for in the camera itself. Only before you have to make sure that the video system and the video player are transmitted using the same protocol.

If it is not possible to provide a wide enough communication channel, you can reduce the bitrate on the cameras. To do this, you need to reduce the frame rate or recording quality in the settings, use cameras with modern compression formats (h.264 +, h.265 +), zipstream technology. Also overwhelmingly, it is possible to use a variable bitrate: when there is no movement in the frame, a smaller amount of information is transmitted, when movement begins, the recording quality and the amount of data will increase.

How to find the problem?


If the problem has nevertheless occurred, the following steps may be priority for diagnosing the cause:

  1. Go to the task manager and check the overall system load.
  2. Check the physical condition of the equipment (whether the power has been turned off, whether someone has cut the cable, whether cameras are working, etc.).
  3. Check if the antivirus is turned off.
  4. Take advantage of the self-test functions of Macroscop. Self-diagnosis displays error messages and provides recommendations for their self-repair.

All this can be done by the system administrator without the involvement of external specialists.

If the cause is not found and the problem cannot be solved by itself, it is necessary to contact technical support. The first thing we check for when dealing with the problem of delays, artifacts or loss of connection is the network between the camera and the server. For this we use special programs (Iperf), as well as a ping test. We only ping a large data packet, since video is 99% of the time more than the maximum allowable amount of data in a standard packet (MTU).

Example : ping -l 5000 -t (infinite ping packet of 5000 bytes).

We send the data packet, get it back and estimate the loss. And they are generally unacceptable. Even 1% of lost frames leads to various negative effects - from artifacts, losses in the archive, jerks in real time to a complete breakdown of communication with the camera.
Similarly, the problem of the communication channel between the server and client computers can be diagnosed.

Also, in Macroscop, the system operation is logged, and the logs in many ways help narrow our problem search area. Thanks to the diagnostic functions, the software identifies problems with the sequence of packets sent by the camera to the server, access to the server, the decoding subsystem, authorization, start-up services and recording.

These are just a few options for checking the status and finding the sources of the problem, but in most cases these tools are enough to diagnose the cause. Otherwise, the individual study and painstaking verification begins.

Think in advance


As in many others, in the case of a video system, a number of problems can be avoided simply by reinsuring at the design stage. Calculate the network parameters in advance, pick up the equipment a little more productive than calculations require, buy high-quality consumables and pay attention to their installation, listen to the recommendations of the equipment manufacturers and software developers you choose, contact technical support or contact sales engineers if they remain questions or doubts.

In general, the more attention you pay to the video system at the very beginning, the less it will require it for many years to use.

Source: https://habr.com/ru/post/412791/


All Articles