Absolute, relative and continuous Pan / Tilt / Zoom are supported, as well as Presets.

Note that some camera support only partial PTZ features (e.g. the continuous move but not the absolute move, etc...)

All the values of the PTZ functions are expressed as "Double" values.

Most of the positionning functions below include a SpeedRatio parameter, the SpeedRatio value is usually in the 0 .. 1.0 range.

Before invoking any of the functions below, first start the preview of the IP camera by using an onvif:// URL.

Min and max values

To retrieve the min and max values of each PTZ axis, invoke ONVIFPTZGetLimits

The PTZ current positions are also returned as text by invoking ONVIFDeviceInfo (onv_PTZInfo)

Retrieving the current position

Invoke VideoGrabber.ONVIFPTZGetPosition to get the current pan, tilt, and zoom positions as double values

Continuous move

- to start a continuous invoke ONVIFPTZStartMove, e.g.:

VideoGrabber.ONVIFPTZStartMove ("Pan", true, 0.5, 100)

. the 1st parameter can be "Pan", "Tilt" or "Zoom",
. the 2nd parameter specifies the direction or its opposite,
. the 3rd parameter specifies the speed,
. the 4th parameter specifies the duration of the continuous move. Note that some cameras do not implement it and go on moving until ONVIFPTZStopMove is invoked.

- to stop it, invoke ONVIFPTZStopMove, e.g.:

VideoGrabber.ONVIFPTZStopMove ("Pan")

Absolute move

Invoke VideoGrabber.ONVIFPTZSetPosition (pan position, tilt position, zoom position, speed, true)

Relative move

Invoke VideoGrabber.ONVIFPTZSetPosition (relative pan position, relative tilt position, relative zoom position, speed, false)

Managing presets

The list of the existing presets is returned as a string by invoking ONVIFDeviceInfo (onv_PTZPresets)

To manage a preset, invoke VideoGrabber.ONVIFPTZPreset (PresetAction, PresetName)

- PresetAction can be "CREATE", "REMOVE" or "GOTO"

- PresetName can be any name (hovewer some camera support only their own predefined preset names)

Note: to create a preset, first position the PTZ at the desired location with the positioning functions above, then invoke ONVIFPTZPreset ("CREATE", presetname) to create it.

Then, when needed, invoke ONVIFPTZPreset ("GOTO", presetname) to move the camera to the desired location.

Specific manufacturer commands

To send a such command, invoke VideoGrabber.ONVIFPTZSendAuxiliaryCommand (Command)

The supported commands are described in the manufacturer's user guide of the IP camera