PTZ / Control

Details on the five major steps to configure and deploy Blue Iris.
1. Connecting IP cameras.
2. Configuring your home or office network for Remote Access via a web browser or the phone apps.
3. Setting up Storage and Recordings.
4. Creating Triggers and Alerts.
5. Creating Schedules and Profiles
Post Reply
Posts: 31
Joined: Thu Jul 11, 2019 9:52 pm

PTZ / Control

Post by varghesesa » Wed May 12, 2021 1:29 am


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. YouTube channel

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 684 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 users begin by setting up their presets via the camera's user interface. BI then pulls the presets into BI via the ONVIF inspection.

Step 2 of the IP Cameras Connections 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 735 times

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

BI Drivers
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 622 times

Camera vendor provided limited ONVIF information to connect video. No PTZ information.
If your camera connected via ONVIF (i.e. Make / Model = Generic / RTSP) BUT the PTZ commands did not come over via ONVIF, it's very possible one of the many drivers in BI may work with your camera. If your camera is not listed, often times the camera is actually manufactured from 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. You can also search the internet to determine the OEM for your particular camera.

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

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 671 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 Trouble-shooting steps

We have many tech saavy users that like to help us trouble-shoot the issue. If PTZ works with other third party software, it should definitely work with BI. If you can download / install ONVIF Device Manager and test whether PTZ works, that would be a big clue. This short seven minute YouTube video, ONVIF Device Manager - Software used to test IP cameras, explains how to use the software to connect to the cameras.

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) cameras, where you can only access the camera via their phone app is often closed.

Provide a WAN address for this camera for testing purposes with necessary ports, usually just 80 and 554 (RTSP) and 8999(ONVIF if available).  Don't forget a temp login as well. If you put the camera on the internet we can take a look.  This video explains how to do so via port forwarding. To be clear, we need direct access to the camera, not BI web interface.

A simple way to test if your camera is on the WAN is go to your cellphone -> turn off wifi -> and from the cell phone browser try to connect to the camera using the WAN IP Address and login.

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

PTZ.png (169.11 KiB) Viewed 730 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!

PTZ/Control Dialog

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 707 times

PTZ Options

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

The list box are the zoom options.
zoom settings.PNG
zoom settings.PNG (2.86 KiB) Viewed 693 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 658 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 658 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 657 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).

Use case: Auto-cycle

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 705 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 691 times
  • Preset 1: Active for both profiles.
    preset1.PNG (129.49 KiB) Viewed 634 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 634 times
  • Preset 2: Not active for either profile.
    preset2.PNG (62.1 KiB) Viewed 634 times
    To be safe, I can also deactivate all the inactive profiles with the same result.
    preset2a.PNG (6.15 KiB) Viewed 634 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 633 times
    Or set the preset active for only Profile 1.
    preset3a.PNG (6.34 KiB) Viewed 633 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 694 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 699 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

Assigning Unique Zones to Presets

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 688 times

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

Gotcha 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 655 times
However, if the logic were more complicated such as
zone logic complicated.PNG
zone logic complicated.PNG (8.26 KiB) Viewed 654 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.

Gotcha 2:
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 650 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 642 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.

Gotcha 3

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.
control event schedule.PNG
control event schedule.PNG (34.54 KiB) Viewed 641 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 679 times


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 30 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 30 times

Next steps / Submitting a ticket

If you followed all the steps mentioned above and cannot connect the PTZ of the camera, only thing left to do is put the camera on the internet so we can do some remote testing. The "No ONVIF PTZ. No BI drivers work." section above describes how to do so.

Include following information in ticket.
  • Attach the camera settings. Camera settings -> General tab -> Export
  • Summarize all the tests you conducted to get the camera connected so we do not repeat steps and also gain more insight as to the possible issue.
  • If you know PTZ used to work with an earlier version of BI, share the version information.
  • If the camera has ONVIF, provide a screenshot or copy/paste info from the Find / Inspect feedback dialog. Seeing what came in via ONVIF is helpful.

    Code: Select all

    ... (more stuff above)
    RTSP URI: /cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
    requesting URI for profile MediaProfile00001
    RTSP URI: /cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif
    requesting URI for profile MediaProfile00002
    RTSP URI: /cam/realmonitor?channel=1&subtype=2&unicast=true&proto=Onvif
    Has Event services: /onvif/event_service
    Has WSPullPointSupport
    RelayOutputs: 2
    RelayOutput: 00000/Bistable/open
    RelayOutput: 00100/Bistable/open
    InputConnectors: 7
    Has Device IO services: /onvif/deviceIO_service
    AudioOutputs: 1
    Has PTZ service: /onvif/ptz_service
    Preset: 1=Driveway
    Preset: 2=Preset2
    Preset: 4=Preset%204
  • Put the camera on the internet for remote access. We would be happy to do some remote testing.  Could you please send a WAN address for this camera for testing purposes with necessary ports, usually just 80 and 554 (RTSP) and 8999(ONVIF if available).  Don't forget a temp login as well. If you put the camera on the internet we can take a look.  This video explains how to do so. To be clear, we need direct access to the camera, not the BI web interface. 

    A simple way to test if your camera is on the WAN is go to your cellphone -> turn off wifi -> and from the cell phone browser try to connect to the camera using the WAN IP Address and login.
  • A short video showing the problem. Describing the issue can be misleading as to the root cause. Game bar (comes with Windows 10) is an easy way to record your screen. ... windows-10
Post Reply