Menu Close

Example of ONVIF and PTZ protocol

How Can We Help?

< Back
You are here:
Print

Example of ONVIF and PTZ protocol

First determine the ONVIF port used by the IP camera by looking at the camera’s control panel (sometimes the ONVIF port is 8080 but it may be another port depending usually on the camera manufacturer)

– Open the URL through the ONVIF protocol by setting as URL onvif://IPADDRESS:ONVIFPORT, e.g:
VideoGrabber.VideoSource = vs_IPCamera
VideoGrabber.SetAuthentication (at_IPcamera, “user“, “password“);
VideoGrabber.IPCameraURL = “onvif://192.168.5.122:8080
VideoGrabber.StartPreview();

Once the camera has started, invoke the VideoGrabber.ONVIFPTZ… functions, e.g.:

VideoGrabber.ONVIFPTZStartMove (‘Tilt’, true, PTZSpeedRatio, PTZMoveDurationMs);

To quick test the PTZ functions open the MainDemo project, compile it, then play with the the ONVIF settings work in the “IP Camera” tab -> “PTZ” group.

Table of Contents