EasyPTZ v0.896 (February 16, 2019)
I needed a simple controller for Dahua cameras on Windows and couldn't find anyting that wasn't over-built for my purposes or just plain slow so I built this. Posting in case it's useful to anyone else. It's designed to be an easy to use camera viewer as opposed to a full featured DVR or NVR. So far I've only tested with the Dahua SD49225T-HN but it *should* work with any Dahua camera.
- Super simple interface, just PTZ (pan, tilt and zoom) and presets.
- The numbered buttons open presets by default but can be configured to open tours, patterns, scans or other cameras.
- Full joystick support! Use any cheap gaming joystick to pan (left stick) and zoom (right stick up/down) and focus (right stick left/right). And the buttons do the same thing as the GUI buttons do (joystick button2 is the same as GUI button 2 etc). With the 25x zoom from my camera it makes me feel like I'm using a flight simulator game and flying around.
- Click or touch the screen to pan the video
- Low latency, the camera delay should only be about half a second even when viewing over the internet, and very low CPU load.
- Supports unlimited cameras, press shift and the number keys to switch between them (or use the Cameras menu up top).
- Customizable interface: can launch in any state (regular, maximized or fullscreen) or any monitor.
- Currently only supports PTZ on Dahua cameras, but would be easy enough to expand it so it controls other camera brands too. If anyone has a Hikvision camera I can test with (remotely works), let me know.
- Arrow keys move the camera around
- - and + keys zoom the camera (no need to press shift for the + key, the = key works too)
- [ and ] keys focus the camera
- The spacebar returns you to where you were before clicking a preset button.
- Number keys trigger the preset buttons, shift number keys switch between cameras. For example press shift 2 to open camera 2 as defined in the config file. Control plus number fires buttons 11-20 (for example control-5 fires button 15), alt plus number fires buttons 21-30, control-alt-number fires buttonns 31-40.
- F or F11 or ENTER toggles fullscreen. Note that there's two fullscreen modes, one with onscreen buttons and one that's just video, keep pressing the key to cycle through them.
- G takes a screenshot, H takes a screenshot and opens it.
- R goes to a random preset.
- Control plus left/right arrows goes through the preset history. In other words press control-left arrow to return to a preset you were looking at earlier. Handy for returning to a previous preset, especially when doing a tour of random presets.
- Click or touch the screen to pan, distance from center controls the speed.
- Click or touch the top left and right corners to zoom, bottom left and right corners to focus.
- Mouse wheel zooms.
- The left joystick controls pan, the right joystick controls zoom (up/down) and focus (left/right).
- The joystick buttons do whatever the GUI buttons do. For example joystick button 1 does whatever GUI button 1 does. By default that goes to camera preset 1 but you can make it launch any preset, tour, pattern, scan or open another camera.
- Note that you can look at the bottom of the log window (File -> Show Log Window) to see what joystick button you're pressing. Handy for configuring that button.
Config File Notes
Here's the docs for editing the config file. For now you make all the configurations there. Just click File -> Settings and edit the values that are already present. Once the features settle down I'll build a GUI for this.
Known Issues and Troubleshooting
- If the camera opens but stays frozen try increasing the prebuffer_ms in the config file. Start with 500. A higher value will have more latency but will be more stable.
- Sometimes things get messy when trying to close the program when in full fullscreen mode. Workaround for now is to exit fullscreen mode before closing.
- Please let me know any others.
- Make a GUI for the configs.
- Add PTZ support for other cameras, maybe via ONVIF?
- v0.896 (February 15, 2019): Will print an error message to the log widnow (File -> Show Log Window) when loading a preset if there's an error. More debugging to come.
- v0.894 (February 15, 2019): Preset names are now retrieved from the camera! Can override the names in config file. Can now start in any state on any monitor. Added commandline args to control laucnh state. Fixed customtours. Control-left/right arrows navigates preset history. Fixed unicode support.
- v0.893 (February 14, 2019): Fixed the buttons, added the Presets menu, Camera menu now shows camera name if set in config file, added random preset button (R), added ability to specify the snapshots folder.
- v0.891 (February 13, 2019): Faster startup time, additional fullscreen modes, added the ability to have up to 30 cameras, and a bunch of under the hood improvements
- v0.872 (October 30, 2018): Made some improvements to focusing (pressing [ or ] keys or joytsick). Before it would run autofocus sometimes afterwards, losing any focus changes. Also some more mouse controls (corners control zoom and focus). And added the ability to have custom image overlays on each camera, will document shortly, let me know if you need deets sooner.
- v0.87 (October 29, 2018): Fixed issue with video window not detecting mouse clicks in some versions of Windows, and fixed issue where arrow keys sometimes stop responding. Yee haw.
- v0.83 (October 24, 2018): Added gesture support! Click or touch the video to pan.
- v0.8 (October 22, 2018): Added screenshot ability, lots of fixes.
- v0.7 (October 17, 2018): Repacked with current version of VLC included.
- v0.6 (October 12, 2018): Some love given to the GUI, and packing the VLC library with the installer. Experimental.
- v0.5 (October 11, 2018): joystick support! And it sucks considerably less. Still swatting bugs but getting there.
- v0.2 (October 9, 2018): much less latency, an installer, and lots o fixes.
- v0.1 (October 8, 2018): first version released