Detection/recognizing ONVIF Server cameras

Good morning,

As part of ONVIF server development, we are encountering difficulties adding/recognizing cameras.

Context:

XProtect Management 2023 R1 Version 23.1 A, Version 56.

Our ONVIF server exposes 2 video streams behind a software proxy. The URIs of these 2 video streams therefore have the same IP address as our ONVIF server.

Only the port number and the URI ending (/stream1 and /stream2) differ.

  1. When we perform manual detection of our solution, we reach the end of the process and the 2 cameras are recognized.

Only when viewing the thumbnails do we see that only one stream is “available” (/stream1), with the stream preview remaining black.

The second thumbnail does not appear.

Invoking the Media.GetStreamUri() method with StreamType = RTPUnicast and TransportProtocol = HTTP:

  • If the provided stream is RTSP, proxy logging indicates “Invalid URL”;

  • If the provided stream is HTTP, no trace. We do not know the actions taken;

  1. When we perform an express detection of our solution, the process stops after a few exchanges.

The last invocation being Device.GetDeviceInformation().

Could you give us some ideas for resolving this problem.

THANKS

Hello Jerome,

Could you collect Wireshark traces from the communication between XProtect and your servers for the problems you describe? That’s the only way we can check what could be the problem.

Also this ONVIF specification may help you improve your server:

https://www.onvif.org/specs/srv/media/ONVIF-Media-Service-Spec.pdf?441d4a&441d4a

Hi Kalin,

Here are the Wireshark traces as well as our SOAP logging file for “Express” mode detection and “Manual” mode detection of our ONVIF server in 192.168.0.2:80.

Milestone’s IP address is 192.168.0.111.

In “Express” mode, a few exchanges take place then nothing more. Milestone directly detects our 2 cameras but not our ONVIF server.

In “Manual” mode, we complete the detection process and add the 2 cameras detected through our ONVIF server.

However, the thumbnails remain black and our proxy indicates (invalid url /stream1 and invalid url /stream2).

We specify that we deliver a URI with RTSP format when requesting Media.GetStreamUri() in this example.

When we deliver a URI with HTTP format, no trace in our proxy and the thumbnails also remain black.

Thank you for your reply

Hello Jerome,

What I see is that we try to start stream on http and that’s the reason the stream is not starting. Probably the streaming method selected in Managment client is HTTP. Please change it to RTP/RTSP/TCP and try again. I also see that the port for RTSP is 5554. Did you intentionally set to that value, or you wanted to use the default port 554. Please check the if structure of GetProfilesResponse and GetVideoSourcesResponse fully comply to ONVIF standard. You can use the tools for compliance available in the members area on onvif.org site.

Hello Kalin,

Thank you for your reply. Everything works correctly after applying the indicated settings.

Do you know if it is possible for this setting to be applied by default for any new ONVIF device search?

In fact, our device can only be discovered in “Manual” mode and not in “Express” mode. Perhaps with a default setting of RTSP, our device could be discovered in Express mode…

Concerning the compatibility tool, our device passes the various tests of the implemented functionalities.

Hello Jerome,

For the device detection/search we don’t use RTSP. We use ARP, UpNP, DNS, Http/https, ONVIF for the detecting and for the search which device with which driver matches. But we can consider choosing RTSP as default streaming method for video, audio and metadata.

Hello Kalin,

In “Express” mode, we have no problem with detection. This is done via WS-Discovery. The following exchanges are made using the ONVIF protocol but, after a few exchanges, the operation is interrupted. However, the contents of the ONVIF exchanges are exactly the same as for detection in “Manual” mode. It’s strange.

Perhaps the answer actually lies in the choice of the default streaming method which must be set to RTSP for all searches. Can you tell me where I can make this choice?

Thanks

Is there a way to do this by now?

having the default streaming method set to RTP/RTSP/TCP instead of RTP/RTSP/HTTP/TCP