PTZ / Control

Post Reply
Posts: 90
Joined: Thu Jul 11, 2019 9:52 pm

PTZ / Control

Post by varghesesa »


This article walks through the PTZ/Control dialog in Camera settings. This article is an extension of the PTZ/Control section in the Help files. This article focuses on use cases and how to accomplish common/popular tasks or make users aware of capabilities in BI. If you want to understand how an individual feature works, refer to the Help documentation.

If you prefer to listen instead of read, see the PTZ and Camera Control webinar.

If you were directed here from a ticket, try to self-correct using information below. The Next steps / Submitting a ticket section (bottom of article) explains what is needed to move forward.


You may be wondering why this dialog is called PTZ/Control. The PTZ part is obvious. The Control part has to do with features and functionality that exist on the camera that go beyond Pan-Tilt-Zoom. Over the years, BI has provided access to these features via their custom drivers. If you choose a BI driver (discussed in detail below), then additional features on the camera may be available.

To know what additional camera features are available, simply Right click on any camera -> PTZ/Control. The illustration below shows all the possible functionality available from a camera. Selecting the feature will confirm whether the functionality is available with your driver.
controls.png (79.65 KiB) Viewed 20238 times

Connecting PTZ functionality to Blue Iris.

Connecting the PTZ functionality of a camera to Blue Iris usually starts behind the scenes via ONVIF. Most camera vendors share PTZ functionality via ONVIF. Most users begin by setting up their presets via the camera's user interface. BI then pulls the PTZ controls and presets into BI via the ONVIF inspection.

Step 2 of the Camera Connector article goes into detail on how to connect via ONVIF. If the camera supports PTZ control via ONVIF, BI will let you know during Inspection. Below is one example of the feedback provided from the camera as to whether ONVIF PTZ controls are provided.

iCamera_ONVIF3.PNG (12.41 KiB) Viewed 20289 times

The PTZ/Control dialog will also confirm an ONVIF configuration. See below.
ptz onvif.PNG
ptz onvif.PNG (29.93 KiB) Viewed 20226 times

ONVIF Gotcha
If your camera connected via ONVIF (i.e. Make / Model = Generic / RTSP) BUT the PTZ commands did not come over via ONVIF, you may have encountered an ONVIF Gotcha.

BI drivers
However, if the camera only has limited ONVIF support, it's very possible one of the many drivers in BI may work with your camera. When you choose the Make / Model in the IP Config dialog, then the corresponding driver will be selected in the PTZ/Control dialog. You are actually selecting drivers that were used in the past by other customers to connect to those same cameras. Below is an example of a PTZ/Control dialog after a user selected Hikvision / DS-2CD6362... for Make/Model in the IP Config dialog.

hikvision ptz.png
hikvision ptz.png (99.53 KiB) Viewed 20176 times

If your camera is not listed, often times the camera is actually manufactured by an OEM that may be listed. One obvious example would be Annke vs Hikvision. It is pretty obvious when you login to an Annke camera that the settings, look and feel of the user interface is similar or identical to the Hikvision user interface. See below. It's therefore a good bet the Hikvision drivers will work for Annke cameras.

annke-hikvision.png (48.79 KiB) Viewed 20288 times

If the camera has some ONVIF support, the Find/Inspect dialog may tell you the OEM.

iCamera_ONVIF1.PNG (73.54 KiB) Viewed 18220 times

You can also search the internet to determine the OEM for your particular camera.

Below is an example of multiple vendors (IPG, Escam, Yucheng) using the same PTZ implementation. When customers put their cameras on the WAN for remote testing, we often discover PTZ implementations are duplicated amongst vendors. We therefore group vendors where possible.

multiple vendors ptz.png
multiple vendors ptz.png (82.29 KiB) Viewed 20225 times

This is why the list of Makes/Models in the PTZ list are only a subset of the Make/Model list provided in the IP Config dialog. Many vendors copy PTZ implementations from other vendors.

If you are facing challenges getting PTZ to work, I know of customers that went through the entire PTZ list to see if any matched their camera. If you come across a PTZ driver that happens to work with your camera, please let us know so we can update the user interface for the next user.

Final steps


I encountered a ticket where PTZ worked great via ONVIF. The user liked the camera so much, he bought three more.
No PTZ information came over via ONVIF for the newer cameras. User feedback below.
I went through article yesterday with a fine tooth comb and found that the latest version of BI is only loading "default" video stream profiles for at least any of my cameras (I even deleted a different model camera then added it again - only the default profile was provided).
I guess the PTZ information was no longer part of the ONVIF Default Profile.

Fix: Export settings from older camera that is working. Import the settings and change the Connector settings (IP Config Dialog) to point to the new camera!

ONVIF Device Manager
If PTZ works with other third party software, it should definitely work with BI. ONVIF Device Manager is a popular third party tool to test camera functionality supported via ONVIF. See ONVIF device manager helper guide.

Also, if you know PTZ used to work with an earlier version of BI, the version information would also be very insightful.

No ONVIF PTZ available. No BI drivers work.

We would be happy to do some remote testing.  But first make sure the camera is accessible to third parties. A simple test is to open a browser.  Type in the IP Address of the camera and see if the camera login page pops up.  If so, can you login? If yes, does the web interface provide PTZ controls? If yes, then there is a possibility for BI to reverse engineer the appropriate http commands for the PTZ controls. If not, it usually means the camera is closed to third party vendors. Arlo, Amazon (Ring, Blink) are vendors where you can only access the camera via their phone app and closed to third party access.

This may be a good time to approach the camera vendor whether it provides ONVIF PTZ support. If not, do they provide a library or dll that can be used by third party vendors. One user asked how to connect their camera to VLC. After much prying, the vendor finally gave up the information. Camera vendors would prefer you use their software and lock you in to their ecosystem

:!: Checkpoint: BI has PTZ controls for the camera working.

PTZ.png (169.11 KiB) Viewed 20284 times
This is great! Now you can set your presets if they were not pulled over already via ONVIF.
  • Use the BI arrows to position the camera.
  • Push and hold a preset number (e.g. 1, 2 etc) and the current camera location will be stored with the corresponding preset number!


This section explains many of the knobs and buttons that exist in the dialog. We also highlight some of the popular solutions and explain all the settings required to implement the solution.

Custom PTZ Driver

Users have the ability to create their own drivers for their cameras. The first selection in the list box is * CUSTOM HTTP *. If you do so, please share with Support so we can add your driver to the list.

custom ptz.PNG
custom ptz.PNG (24.22 KiB) Viewed 20261 times

PTZ Options
Help file explains different options. See Options section under PTZ/Control.
ptz options.PNG
ptz options.PNG (8.08 KiB) Viewed 20247 times

The list box are the zoom options.
zoom settings.PNG
zoom settings.PNG (2.86 KiB) Viewed 20247 times

No PTZ cursor

User interface only allowed to zoom in/out. No arrows (PTZ controls) to move the camera.
no-ptz-cursor_optimized.png (108.17 KiB) Viewed 20212 times

PTZ + digital zoom

User interface always has arrows available (PTZ controls). Can move the camera whether zoomed out or zoomed in.
ptz-digital-zoom_optimized.png (77.8 KiB) Viewed 20212 times

PTZ unless zoomed

You have access to arrows when zoomed out (PTZ controls). Once you start zooming in, PTZ is off and you only have access to digital zoom.
ptz-unless-zoomed_optimized.png (66.8 KiB) Viewed 20211 times

Suspend motion detection
Default is on. Not sure why anyone would turn it off. By default, motion detection is suspending during PTZ operation (i.e. moving the camera) and for 1.5 seconds afterward (move button is released).


Many customers with PTZ controls would like the camera to move between presets, often referred to as PTZ Patrol. Blue Iris provides this ability. In addition, the user can associate different cycles to different profiles as well. For example, you can have one patrol sequence for the day profile and a different sequence for the night profile.

Work Hours Schedule
Many customers create a business hours / off-hours schedule with two profiles, (1) Away and (2) Work hours.

Work hours has a unique auto-cycle patrol: 1 - 3 - 7 - 9
Away has another unique auto-cycle patrol: 1 - 5 - 9 - 14

business hours schedule.PNG
business hours schedule.PNG (14.25 KiB) Viewed 20259 times

To create the auto-cycle presets for the Profiles follow the steps below:
In Camera settings -> PTZ / Control tab -> Edit Presets dialog.
presets.PNG (129.79 KiB) Viewed 20245 times

Preset 1: Active for both profiles.
preset1.PNG (129.49 KiB) Viewed 20188 times

While the above will work, keep in mind a shortcut is to just to leave everything on. Why will this still work?
Because the schedule only has Profiles 1 and 2. Profiles 3, 4, etc. are never called since they are not in the schedule.
preset1a.PNG (6.94 KiB) Viewed 20188 times

Preset 2: Not active for either profile.
preset2.PNG (62.1 KiB) Viewed 20188 times
To be safe, I can also deactivate all the inactive profiles with the same result.
preset2a.PNG (6.15 KiB) Viewed 20188 times

Profile 3: Only active for Profile 1.
Again you can set the preset inactive for Profile 2 as seen below.
preset3.PNG (58.16 KiB) Viewed 20187 times
Or set the preset active for only Profile 1.
preset3a.PNG (6.34 KiB) Viewed 20187 times

Auto-cycle Settings / User Interface

Camera settings -> PTZ/Control tab. Pay attention to other customizations available with auto-cycle. Help (Preset positions section) explains each feature. Just as easy to turn on and experiment.
auto-cycle preset options.PNG
auto-cycle preset options.PNG (5.01 KiB) Viewed 20248 times

Auto-cycle on/off
Auto-cycle patrol checkbox allows user to turn auto-cycle on/off. A button on the UI as seen below also controls on/off.
autocycle icon.png
autocycle icon.png (28.77 KiB) Viewed 20253 times
:!: Checkpoint: Auto-cycle created.
We created two profiles: Work hours & Away.
Work hours has a unique auto-cycle patrol: 1 - 3 - 7 - 9
Away has another unique auto-cycle patrol: 1 - 5 - 9 - 14

Autocycle Zones

Just like you can define trigger alerts for non-PTZ cameras by setting the BI motion sensors in the trigger tab, you can do the same with your presets. Let BI do the monitoring and allow you to manage the alerts!

preset motion overrides.PNG
preset motion overrides.PNG (4.5 KiB) Viewed 20242 times

preset-motion-settings-night_optimized.png (84.44 KiB) Viewed 20209 times

Pro Tip 1: Keep in mind, the object crosses zones logic is SHARED across all presets. You can redefine the zones per preset, i.e. a different Zone A etc.
However, the object crossing logic is shared. So something like below will work. The logic is saying if BI detects any motion in regions A, B or C, trigger an alert. If the other presets only define A and/or B and/or C, the object crosses zones logic will still trigger.
zone logic.PNG
zone logic.PNG (8.2 KiB) Viewed 20209 times
However, if the logic were more complicated such as
zone logic complicated.PNG
zone logic complicated.PNG (8.26 KiB) Viewed 20208 times
Every preset with a zone override would have to implement an A, B and C zone. Furthermore, the same object crossings would need to be fulfilled in order for a trigger alert to generate for the other presets. Having A,B and C zones may not apply for all presets. And most certainly the logic probably would not apply across all presets.

Rule of thumb: Minimize zones and object crossing logic, so trigger alerts logic can apply across all presets.

Pro Tip 2: Trigger tab
The trigger tab can also define zones and zone crossing logic. The trigger tab settings are known as the "default" zone settings.
The zones associated with presets are known as preset zones.
It can get very confusing when an auto-cycle is active and a user goes to a camera and starts using the PTZ controls, disrupting the cycle. After the user is done actively controlling the camera, the software eventually resumes the auto-cycle.

The default resume cycle setting is to go back to the cycle / schedule after 30 s.
resume cycle.PNG
resume cycle.PNG (8.19 KiB) Viewed 20204 times

If the default zone settings from the trigger dialog and the preset zone settings are both active, it becomes very challenging to know what the software is doing. It is therefore a best practice to disable the default zone settings (Camera settings -> Trigger tab -> Motion Sensor dialog) when using a camera with PTZ and preset zone settings.
default trigger zone.png
default trigger zone.png (152.47 KiB) Viewed 20196 times

Timed PTZ events (Events schedule)

A similar yet different topic to auto-cycle that is also popular among users is scheduled events for a camera. Some examples below:
  • Users want to turn the IR lights for a camera on at sunset and off at sunrise.
  • During the work hours profile, users may want the PTZ camera to face the door (preset 1) and auto-cycle during the off-hours profile.
This capability is part of the Camera control event schedule dialog. Camera settings -> Schedule -> Events schedule. While related to presets and PTZ functionality, it is actually part of the Profiles and Schedules sub-system. See corresponding Help from the dialog for details.

Pro Tip 3: Event schedule
The reason I am bringing up Events Schedule is because the final gotcha leverages it for the fix. The issue is once BI shifts back into auto-cycle mode after a user override (a user used the PTZ controls to move the camera, e.g. to investigate a situation), how does BI know which preset to start. You simply add a Camera Control Event for the "home" preset.

Also select Search-back at startup/reset. This setting tells BI, regardless of time, find current settings for things like Preset, Brightness etc. In this particular case, even though the event states 7:54 pm, the event will be executed regardless of time when auto-cycle is reset.

control event schedule.PNG
control event schedule.PNG (27.8 KiB) Viewed 18168 times

With at least one PTZ preset in the Event schedule, BI always knows which preset to start. If there are other preset events entered, not a problem. Based on the time of day, the correct preset will always be chosen.

Automation Use Cases

Coming soon! How customers are creating triggers to home automation systems and other devices based on Presets.
preset action map.png
preset action map.png (60.06 KiB) Viewed 20233 times

Pro Tips

Pro Tip 1
Pro Tip 1 is about awareness. Some settings in the Trigger tab are universal, i.e. they apply across ALL zones whether they are defined in the Trigger tab OR for a preset. See Pro Tip 1 above for details.

Pro Tip 2
Also regarding the Trigger tab and defining Zones in Presets, you have to be careful if you define zones in Presets AND in the Trigger tab.
See Pro Tip 2 above for details.

Pro Tip 3
Users often wonder if a security guard takes control of a camera for investigation, how to then set the starting preset after autocycle resumes.
See Pro Tip 3 above for details.

Pro Tip 4
Use case: You have a camera facing the street. However, you only really care about people entering your property. Therefore you create Preset 1 facing the street. When there is activity, camera moves to preset 2. In preset 2 you apply more advanced analytics such as DeepStack to generate smarter alerts.

Step 1: When camera triggers, tell BI to move to a specific preset.
From Camera settings -> Trigger tab.
ptz_pro tip 4-image 1.png
ptz_pro tip 4-image 1.png (2.72 KiB) Viewed 18194 times

Step 2: Set how long camera should remain in Preset position.
Camera settings -> PTZ tab.
ptz_pro tip 4-image 2.png
ptz_pro tip 4-image 2.png (17.53 KiB) Viewed 18194 times

Pro Tip 3 above explains how to tell camera to move back to original position.


This section documents learnings from past tickets.

Gotcha 5: ONVIF PTZ presets disappear

Issue: You connected your camera via ONVIF. PTZ is working. However, BI consistently loses PTZ presets, PTZ controls still work.

Turns out cameras may have restart timers. If enabled, the restart may erase your presets.

ptz_restart.png (72.56 KiB) Viewed 17996 times

Gotcha 4: No PTZ Functionality
See Connecting PTZ functionality to Blue Iris section above.

Gotcha 3: PTZ stopped working

ptz_gotcha3.png (9.79 KiB) Viewed 18642 times

The 12029 error is a network timeout. The camera is not responding (fast enough) to the ONVIF requests.

Double check all security software exemptions to make sure the BlueIris.exe is having no block/trouble accessing the network.
See Windows Tuning article.

If PTZ controls came over via ONVIF, BI may need to do some remote testing to attempt to discover the actual HTTP PTZ commands and bypass ONVIF.

Gotcha 2: PTZ appears not to work. However, there is just a long delay

Sometimes you test PTZ and it appears not to be working. It may be the the response from the camera is very slow.
Test: Lower the resolution on the camera and see if PTZ becomes more responsive.

Gotcha 1: Cannot set a preset

The "set" function for presets is dependent upon the PTZ setting. Camera settings -> PTZ/Control tab.
ptz make.png
ptz make.png (12.88 KiB) Viewed 19584 times

The "set" function does not work with the ONVIF PTZ preset setting. An appropriate vendor selection needs to be chosen if one exists.
ptz onvif.PNG
ptz onvif.PNG (15.91 KiB) Viewed 19584 times

Alternatively, many users create presets in the camera interface and import the presets via ONVIF using the Find/Inspect button in the IP Config Dialog.

Next steps / Submitting a ticket

If still an issue:

Describe the issue.
Share your camera settings. Camera settings -> General tab -> Export.
Put the camera on the WAN for remote testing.

Post Reply