EasyPTZ v0.873 (October 30, 2018)
I needed a simple controller for Dahua cameras on Windows and coulnd'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 up to 10 cameras, press shift and the number keys to switch between them (or use the Cameras menu up top).
- Can optionally close the camera after a period of inactivity, which is handy if you have a bunch of people watching the same camera as I do.
- Customizable interface: can hide the PTZ buttons for slow connections, so the user can just use the presets. Or hide the preset buttons too.
- 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 (Can also use the regular parenthesis keys)
- 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.
- F or F11 or ENTER toggles fullscreen.
- G takes a screenshot, H takes a screenshot and opens it.
- 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.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