Config file notes:
For now all configurations are done in the file EasyPTZConfigs.txt that lives in the same directory as the main executable. Can click File -> Settings to open it. Edit it to define up to 30 cameras with the syntax:
[camera1] camera_address = 192.168.0.50 camera_username = whatever camera_password = whatever camera_port_http = 80 camera_port_rtsp = 554 camera_substream = 0 # optional camera auth mode (options are "digest" or "basic"). # If unspecified, will use digest. #camera_auth_mode = basic # optional value, if present will show the camera name in the Presets menu # and when changing to that camera camera_name = Whatever # optionally override some preset names. preset3_name = Something Else! # remap some buttons? button5 = preset1 button6 = tour1
Note the line "button5 = preset1", which makes it so pressing the 5 button on the GUI opens the camera's preset 1. Or it could be "button5 = tour1", which would start the camera's tour 1. If not redefined like that it would just open the camera's preset 5. See below for a full list of configurable actions for any button.
If you have a second camera you'd add the section:
[camera2] camera_address = 192.168.0.51 camera_username = whatever camera_password = whatever camera_port_http = 80 camera_port_rtsp = 554 camera_substream = 0
Also note that at the top of the config file are some variables that let you hide the PTZ buttons and some other things. You can also hide PTZ buttons for any camera by putting those values in that camera's section. For example put "show_ptz_buttons=no" under camera2 to hide the PTZ buttons for that camera.
Here's the full list of commands for each button, showing how to to go to specific presets, tours, scans, patterns, other cameras, etc. If you need something added, let me know:
# remap some preset buttons? button2 = preset1 button3 = random button4 = tour1 button5 = camera1 button6 = pattern1 button7 = scan1 button8 = customtour:interval=4, loops=1, preset1, preset2, preset3, preset4 button9 = focusNear or focus- button10 = focusFar or focus+ button10 = irisSmall or iris- button10 = irisLarge or iris+ button11 = zoomNear or zoom- button12 = zoomFar or zoom+ button13 = screenshot (or snapshot) # volume control button14 = volup button14 = voldown button 14 = mute button15 = quit # quits the program # by default the above remaps joystick buttons too. But can remap just a joystick # button like this: joystick_button1 = random
You define your presets, tours, patterns and scans in the Dahua camera interface. If left undefined then button 5 opens preset 5, etc.
You can also open other cameras, videos or even photos by defining a camera like this:
[camera3] camera_force_url = http://gizmoware.net/tides/chart/graphics/boathouse-slideshow.png
That opens a tide chart for the place in the screenshot above, but it could be the URL of any type of camera.
And note that if you're using a joystick, the joystick buttons do whatever that GUI button does. So joystick button 5 does whatever GUI button 5 does, etc.
And you can define buttons for each camera, or put the definition at top in the "[general]" section and it applies for all cameras. Useful for setting a button to switch between cameras.
There's also an experimental mode called a "customtour", which is a tour handled by EasyPTZ instead of the camera. This lets you easily define tours outside the camera. The syntax is like this:
button15 = customtour:interval=8, loops=300, preset1, preset2, preset3
The "interval" is the amount of seconds spent at each preset, and the "loops" is the number of times to cycle through the tour.
This is a nice way to make it choose a random preset over and over:
button15 = customtour:interval=8, loops=300, random
And all these button actions can be global (apply to all cameras) if you put them in the [general] section, or apply to just that camera if in that camera's section.
And there's *some* support for non Dahua cameras by using the "camera_force_url" value in the config file. Put that param in the config file under a camera with the full URL of the camera stream and it'll play that camera with no PTZ controls. Can also use it to display an image. Experimental.
And there's a couple of commandline arguments: -monitor=2 will launch on monitor 2, and -startup_state=fullscreen will launch fullscreen (other options are normal, maximized, fullscreen and fullscreen2). You can also set those in the config file, but that lets you override those values. And you can also set the initial camera: "-camera=2". To edit a Windows shortcut, right-click it and choose properties, then edit the "target" line. For example to make it launch camera2, the line would read:
"C:\Program Files (x86)\EasyPTZ\EasyPTZ.exe" -camera=2
To make it launch camera 2 fullscreen on monitor 2, the line would be:
"C:\Program Files (x86)\EasyPTZ\EasyPTZ.exe" -monitor=2 -startup_state=fullscreen -camera=2