Why do we need to identify a Camera/Video Resource?
It is very important to Nx Witness to recognize each video resource uniquely and individually.
For a professional VMS, you have to provide a solid function to video playback, video recording, and endpoint management. So, if you don't have a good way to identify a specific video resource, you can't meet those basic requirements for general or professional usage.
Besides, in Nx Witness, we provide lots of functions and API which can be reused by 3rd party developers. It is very important to help those good developers grab the specific information they needed.
That is why we have to identify every camera/video resource.
How does Nx identify Camera/Video Resource?
In our database, every video resource will have a unique identifier, called Physical ID.
That is not only used by Nx Witness internally but also used for external communication.
How is the Physical ID generated?
The server begins by requesting the MAC address from end-devices via an ONVIF standard discovery request. If the Server obtains a MAC address in the reply, it will be saved as the Physical ID.
Sometimes the camera has an empty MAC address field in the discover reply. In this case, the server takes a unique ONVIF GUID field value that is never empty and assigns this GUID as an internal Physical ID.
If the video source is an RTSP stream, Nx Witness will use the URL as an argument for the md5-hash function. After calculating the hash, we use it as the Physical ID for the stream.
In most cases, this is enough to move forward since the GUID usually doesn't change. There might be issues with devices of low quality, in worst cases, some of them might constantly change their GUID which results in the server continuously re-adding it every discovery cycle. There are also some cases where a camera's GUID changes upon a firmware upgrade.