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 10 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

# 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+
button11 = zoomNear or zoom-
button12 = zoomFar or zoom+
button13 = screenshot (or snapshot)
button15 = quit # quits the program

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.

And that "customtour" is experimental: the "interval" is the time it'll show each preset, and the "loops" is how many times it'll do it.

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.

 

Back to main