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=100, preset1, preset2, preset3, preset4 button8 = customtour:interval=4, loops=300, preset1-camera1, preset1-camera2, preset2-camera1, preset2-camera2 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.
[camera4] camera_name = Pier Cam! prebuffer_ms = 15000 camera_volume = 1 camera_force_url = https://stream-uc2-charlie.dropcam.com:443/nexus_aac/d62aa97fdae445af8ebea9328d5fcb06/chunklist_w425682755.m3u8?public=StKL8UTWsa
The above will stream a Nest Cam! To get the URL of your Nest Cam, follow the instructions here. Note that I'm setting the buffer pretty high (15,000 milliseconds, or 15 seconds), since Nest Cams seem to require it. Let me know if you find some other settings that work better. Also note that I'm muting the camera with the cmaera_volume=1 line (full volume would be 100, or just remove the parameter).
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.
Or if you'd like to specify which camera the preset opens on, like this:
button15 = customtour:interval=8, loops=300, preset1-camera1, preset1-camera2, preset10, preset2-camera1, preset2-camera2
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.
If you're specifying the camera in your customtour, you'll want that button assignment to apply to all cameras, so put it in the [general] section of the config file.
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