# PTZ

For PTZ-enabled cameras, pan, tilt and zoom controls are available both for live mode. Note that available controls may depend on selected model and actual camera capabilities.

PTZ control is available in two flavors: HUD and classic PTZ sphere, with HUD enabled by default. Classic virtual PTZ sphere controls can be turned ON via application settings as described below.

{% hint style="info" %}
When two or more simultaneous PTZ command requests (either from an action or from direct user input) are sent at the same time, **PTZ priority** parameter is used to decide who gains access first. When this happens, request with a higher priority is fulfilled while request with a lower priority is delayed for ten seconds. If after ten seconds the higher-priority action is still going on, the lower-priority action is denied PTZ access for ten more seconds and so on.

If two users or actions with the same PTZ priority level have an access conflict, they will be both granted PTZ access simultaneously and the order of executed PTZ commands is defined by which of the commands reaches the device first.

Default PTZ priority for all users, including those built-in and imported, and also for all actions is equal to five (medium priority). You can assign any user/action a higher PTZ priority (six to ten) or a lower one (four to zero) by editing individual user/action properties in Macula Console. The only exception is the PTZ tours, which by default have the lowest priority (equal to zero), which means that any user or action can intercept PTZ control; the tour will go on after the PTZ control from a higher-priority user/action is released.
{% endhint %}

PTZ control is carried out using the HUD overlay controls or point-to-PTZ style controlling without overlay elements; it is automatically enabled if the camera has PTZ facilities.

* If HUD or classic sphere is enabled, use the overlay PTZ sphere to control camera movement: click and hold to move the camera up/down, left/right or diagonally; additional controls allow to adjust the camera's iris and focus, as well as to zoom IN/OUT;
* If visual PTZ controls are not enabled, click anywhere on the picture to re-position the camera using indicated point as a new picture centre (point-to-click style).

{% hint style="info" %}
When re-positioning a PTZ camera, note that some cameras may have response delay due to heavy device load, physical distance, network latency etc. Bear this delay in mind when using PTZ and, if necessary, release the virtual PTZ sphere controls earlier.
{% endhint %}

#### Switching Between PTZ Control Styles

By default, HUD style viewport overlay controls are used for PTZ. You can change this by going to the main menu *Edit -> Settings* and choosing the *Viewport overlays* tab -> *PTZ* Controls section.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FZNcL11kCsDlKx2sU63v8%2Fimage.png?alt=media&#x26;token=b131ae62-9305-465f-a9ea-46c9dac19911" alt=""><figcaption></figcaption></figure>

You can toggle between three modes:

* **PTZ Heads Up Display (HUD)**: on-screen controls overlaying video stream
* **Classic PTZ Overlay**: virtual PTZ sphere with traditional design
* **Point-to-click**: Control camera with the mouse

One of the two modes can be selected at a time and the selected mode will be activated when you enable PTZ for the channel of your choice. Either visual control set can be hidden by clicking the HUD button in the bottom right corner of the viewport; in this case, PTZ can still be controlled by clicking the live video stream.

#### Heads Up Display (HUD) Mode

The following controls are available in HUD mode:

* Pan and tilt arrows
* Zoom slider\*
* Iris slider\*
* Focus slider\*
* Automatic focus/iris\* ( ![](https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FVwVvlnYcRdGgfCkYmRM4%2Fimage.png?alt=media\&token=51877699-be6e-4f07-982e-ddf47c0ad694) button on the lower slider end)
* Presets and tours
* HUD (Heads Up Display) ON/OFF

\*Note that some of the additional controls may be unavailable depending on the device integration and capabilities.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FL3E3BSHJcnjhjySnjVkS%2Fimage.png?alt=media&#x26;token=6dab1840-c2f5-4bc0-9568-f0149e40ef00" alt=""><figcaption></figcaption></figure>

Use the bottom overlay menu for presets, tours and HUD ON/OFF switching.

#### Classic Virtual PTZ Mode

For users who prefer classic appearance of PTZ controls, an alternatively looking panel is offered. It also overlays the live view, is docked to the top left corner of the stream and has the same capabilities as the HUD sphere. Apart from pan and tilt buttons on the sphere, zoom, focus, and iris sliders will appear, if the related functionality is available on the device.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FdIZnK6SaFwHFe8lKINkB%2Fimage.png?alt=media&#x26;token=e689db8b-47d0-4f5f-8457-6aab8264117a" alt=""><figcaption></figcaption></figure>

#### Point-to-click PTZ mode

You also can control compatible cameras PTZ with mouse by selecting Point-to click PTZ controls inside viewport.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FW4DywZjbRqvIGzZR4XWP%2Fimage.png?alt=media&#x26;token=c569bf8f-e333-4ff7-8c1c-5050561d315c" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Point-to-click PTZ controls currently available only with compatible devices connected to the VMS using ONVIF Compatible driver.
{% endhint %}

#### Presets

Click *Presets* below the picture to view the list of available presets; select any to let camera go to the selected pre-defined position. To save a preset, adjust the camera position using PTZ controls, then click *Presets* and choose *Save* *preset*. Enter user-friendly name for your preset and pick a preset to be re-defined from existing preset list, then click *Save*.

Note that PTZ presets cannot be explicitly deleted: to remove an old entry, simply replace it with a new one.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2F4pyECwubd58GEmSCjae0%2Fimage.png?alt=media&#x26;token=f25e0d5e-ef80-402a-b59b-e0c868009005" alt="" width="454"><figcaption></figcaption></figure>

#### Tours

Multiple PTZ presets can be combined to create a preset tour - a series of positions for a PTZ camera to go to through repeatedly. Each preset in a tour can be assigned a duration period of its own.

Click *Tours* below the picture and select *Create tour* to make a new sequence. Before building a tour, make sure you have created all presets that will be used in the target tour.

{% hint style="info" %}
Tours are stored on the server and thus are synchronised between different Macula Monitor workstations connected to the same server.
{% endhint %}

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FcglFb3V371ybJho4FefK%2Fimage.png?alt=media&#x26;token=3252c16f-176f-4925-94a4-7dab6a2a823c" alt=""><figcaption></figcaption></figure>

Add and remove presets by double-clicking them; newly added presets will appear at the end of the tour preset list.  You can also use *Search* field to quickly find your desired preset, and the recycle bin icon in the upper-right-hand corner allows you to remove a selected preset from the target tour.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FM8bgWX7dSt37zOMKgj4N%2Fimage.png?alt=media&#x26;token=69411c78-58de-4a5b-9530-39c7075a746e" alt=""><figcaption></figcaption></figure>

Click a tour preset to change its delay time. By default, each preset has a pause of five seconds, and you can change that to whatever time period you wish for the camera to continue overlooking that specific position. Next, define a title for the target tour and enable automatic start, if desired; if you select autostart, the sequence will be launched immediately after server start.

When you have finished, click *Save* to add your newly created tour to the list of available tours.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2F1EyCpF94f42nfyoipUHX%2Fimage.png?alt=media&#x26;token=e9b441b0-590f-410d-9f6e-a74d96a8c503" alt=""><figcaption></figcaption></figure>

To start a tour, click *Tours* and simply select the one you want from the list; to stop it, click *Deactivate* tour. Each tour options - *Edit* and *Delete* - can be accessed via the ... button next to the tour name.
