Search code examples
c#soapwsdlpositiononvif

ONVIF PTZ status response


I'm using the web services provided by ONVIF to communicate with surveillance camera, so far so good. My next objective is to create a FOV, and for that I need a continuous status update from camera.

The ideal situation for me is to receive the absolute PTZ position after each camera movement, but so far didn't find a way to do so. There is the option of sending GetStatus() method which gives me the info, but sending it after each call is expensive and clumsy.

Am I missing anything? WireShark tells me that the response for ContinuousMove for example is ContinuousMoveResponse. Without any status for PTZ position.

Any help or advice would be appreciated.

Thanks


Solution

  • You are correct that you can retrieve the camera's coordinates with GetStatus() and as you can see here, ContinuousMoveResponse is empty. This is because if you don't specify any timeout then the unit keeps the specified speeds for ever. If you specify a timeout, ContinuousMove() may return earlier than the device actually finishes moving.

    I don't really get why you complain that GetStatus() is expensive and clumsy. Anyway, this is the only way to know in ONVIF the orientation for every possible ONVIF-certified camera.

    Some cameras may (but they are not mandated to) send the PTZ coordinates in the RTSP stream as ONVIF metadata.