Tutorial 7 – PTZ Preset

Tutorial 6 – Zoom Box PTZing

In the previous tutorial, we learned how to Zoom Box PTZ.

In this tutorial, we’ll learn how to PTZ to a preset. A PTZ preset is a predefined pan/tilt/zoom position and can be set up at the NVR.

Like every PTZ action, a connection to the camera is required:

OCAdapter.OCCamera’s method GetDynamicLiveURL forces a connection to the NVR. A connection to the NVR is required prior to issuing PTZ commands.

Now, let’s cycle through all of the available PTZ presets that the NVR has stored for a camera:

Ocularis.ICamera’s method PTZPresets returns a set of Ocularis.IPTZPreset that are available for this camera. Ocularis.IPTZPreset’s method GetDisplayName, as you can imagine, returns a string whose value is the name of the preset. Ocularis.IPTZPreset’s method Select invokes the preset and the camera will PTZ to that position.

Movie of the final program:

That’s it, you can now PTZ a camera using a PTZ preset.