EasyPTZ: a new simple camera viewer for Windows

Discussion in 'Dahua' started by wrybread, Oct 9, 2018.

Share This Page

  1. wrybread

    wrybread Getting the hang of it

    Joined:
    Sep 12, 2018
    Messages:
    117
    Likes Received:
    49
    Location:
    San Francisco
    I couldn't find a simple PTZ camera viewer for Dahua cameras on Windows so I whipped something up:

    EasyPTZ - Dahua Camera Controller for Windows

    I thought I'd post it in case it's useful to anyone else since I've gotten so much from this forum. If it wasn't for the people here I'd be using the Sunoba camera I originally ordered and would probably be cursing at it right about now.

    It's just a simple camera viewer, not a DVR/NVR, just views the camera(s) and controls PTZ and presets. I haven't given it much GUI love yet, just the basics for now.

    I made it because I couldn't find anything for Windows that wasn't super bloated to simply watch a camera. And I needed something easy to deploy to tech tards, preconfigured for them to download, without a ton of features to confuse them and get in the way of simply watching the camera. For my purposes a full blown security camera software package just gets in the way.

    For now all configs are made in a text file that lives in the same directory (see the link above for deets), but after the features settle I'll add a GUI for that.

    Note that it currently only controls Dahua cameras (though it can view any type of camera or video stream). I only have a SD49225T-HN so that's all I've tested it with so far.

    It's all cross-platform under the hood though, I'll compile for Mac and Linux once it's finished.

    Super beta and still swatting bugs. If you try it, let me know if you have any problems/questions/suggestions.
     
    Last edited: Feb 22, 2019
    puppyfrog, Mike, 42er and 1 other person like this.
  2. wrybread

    wrybread Getting the hang of it

    Joined:
    Sep 12, 2018
    Messages:
    117
    Likes Received:
    49
    Location:
    San Francisco
    Just a quick note, added joystick support! Downright handy, works with any cheapie gaming joystick, including wireless joysticks. I've got two of these cameras, one mounted over a sand dune on a beach and one at the top of my building in downtown San Francisco, and using the joystick with that 25x zoom is like flying.

    Here's how the interface looks currently:

    [​IMG]

    I still plan to give the GUI some love, but hey it works. The numbered buttons open presets (button 5 opens preset 5 etc) but each can be remapped in the config file to open different presets, tours, patterns, scans or other cameras. And if you're using a joystick, the joystick buttons do whatever that GUI button does (in other words joystick button 5 does what GUI button 5 does).

    Still have to make all configs in a text file (click File -> Configure), but I plan to add a GUI for that once the structure of the program is settled.
     
    Last edited: Oct 13, 2018
    bob2701 likes this.
  3. ptforums

    ptforums n3wb

    Joined:
    Mar 31, 2017
    Messages:
    3
    Likes Received:
    4
    Nice, thanks for sharing the app. Also that is an awesome view. :)
     
    wrybread likes this.
  4. wrybread

    wrybread Getting the hang of it

    Joined:
    Sep 12, 2018
    Messages:
    117
    Likes Received:
    49
    Location:
    San Francisco
    Sure is. I'm addicted to flying around the area using the joystick. It's going to be really interesting in winter when the waves get huge.

    And if anyone has a Hikvision camera they wouldn't mind giving me temporary access to, I'd love to add support for those too.
     
    Last edited: Oct 29, 2018
  5. 0blar

    0blar Getting the hang of it

    Joined:
    May 17, 2017
    Messages:
    271
    Likes Received:
    30
    Hi
    @wrybread
    i have vlc already installed in my pc (C:\Program Files\VideoLAN\VLC\vlc.exe)
    i try to install your software but it didn't find the vlc path
    any idea how to tell your soft where vlc is installed ?

    Regards
     
  6. wrybread

    wrybread Getting the hang of it

    Joined:
    Sep 12, 2018
    Messages:
    117
    Likes Received:
    49
    Location:
    San Francisco
    Try this new version: http://gizmoware.net/easyptz/EasyPTZ_Installer.exe

    That should find it. Let me know if not.

    And you shouldn't need to, but in this version (.53) I made it so you can add this line to the config file to specify the VLC location:

    vlc_plugin_path = C:\Program Files\VideoLAN\VLC

    So click File -> Configuration and add that anywhere under where it says "[general]" and above "[camera1]".
     
    Last edited: Oct 12, 2018
  7. 0blar

    0blar Getting the hang of it

    Joined:
    May 17, 2017
    Messages:
    271
    Likes Received:
    30
    Here error i have (I'm using win10 pro x64)

    9:50:21pm: Couldn't find VLC! Is it installed? Debug: [Error 193] %1 n’est pas une application Win32 valide
    Conf file:
    # Specify location of VLC plugin?
    #vlc_plugin_path = vlc_compact
    vlc_plugin_path = C:\Program Files\VideoLAN\VLC

    easyptz error.png
     
    Last edited: Oct 12, 2018
  8. wrybread

    wrybread Getting the hang of it

    Joined:
    Sep 12, 2018
    Messages:
    117
    Likes Received:
    49
    Location:
    San Francisco
    I think I know what it is: I'm compiling as 32-bit for now, and I bet your version of VLC is 64-bit, which wouldn't be compatible. You could try temporarily installing VLC 32-bit, or just use this new version that I posted:

    gizmoware.net/easyptz/EasyPTZ_Installer_Full.exe

    When installing, make sure the "reset all configurations" checkbox is checked, so it'll add this line to the config file:

    vlc_plugin_path = vlc_compact

    Let me know how it goes.
     
    Last edited: Oct 12, 2018
  9. 0blar

    0blar Getting the hang of it

    Joined:
    May 17, 2017
    Messages:
    271
    Likes Received:
    30
    Hi
    I'm using vlc 64-bit version

    I just download the 0.61 version and now no missing message
    Issue now is the video quality, very bad
     

    Attached Files:

    Last edited: Oct 13, 2018
  10. wrybread

    wrybread Getting the hang of it

    Joined:
    Sep 12, 2018
    Messages:
    117
    Likes Received:
    49
    Location:
    San Francisco
    I added the "reset config" option in the new version, not the version you already downloaded.

    You can simply download and run this:

    gizmoware.net/easyptz/EasyPTZ_Installer_Full.exe
     
  11. 0blar

    0blar Getting the hang of it

    Joined:
    May 17, 2017
    Messages:
    271
    Likes Received:
    30
    i just did it now
    check the picture quality

    Edit: i just fix it by modifying camera_substream to 1
     
    Last edited: Oct 13, 2018
  12. wrybread

    wrybread Getting the hang of it

    Joined:
    Sep 12, 2018
    Messages:
    117
    Likes Received:
    49
    Location:
    San Francisco
    Hmm, certainly not for me, and I'm watching multiple cameras over the internet, not local network. What camera are you using? And is the camera on your network or over the internet? And hardwired or wifi? And most importantly is it clear in other programs (the dahua web interface for example)?

    And might be better to do troubleshooting if you email me. Wrybread@gmail.com

    But if you prefer to troubleshoot here, I sometimes get an incomplete image like that when it first starts but then the buffer catches up. If yours isn't, try increasing the buffer size. For now you do that by clicking file > configuration and increase the prebuffer time. By default it's only 500 milliseconds since I'm trying to keep the lag to a minimum, but that might be optimistic. You can try increasing it. I'd start with 1500
     
  13. 0blar

    0blar Getting the hang of it

    Joined:
    May 17, 2017
    Messages:
    271
    Likes Received:
    30
    Hi
    4431C-A
    Local network
    Hardwired
    No problem, it is clear

    I just modified the conf file with:
    Code:
    camera_substream = 1
    and it is ok

    Any linux version ?

    Good work !
     
  14. wrybread

    wrybread Getting the hang of it

    Joined:
    Sep 12, 2018
    Messages:
    117
    Likes Received:
    49
    Location:
    San Francisco
    Hmm, on my camera (SD49225T-HN) substream 1 is really small and a strange aspect ratio. If that's the case with yours you'dbe better off increasing the buffer. The 500ms default buffer is really tiny. It works beautifully for my cameras even over the internet, which is why I set it like that, but its probably too small for some setups. I should probably make it a couple of seconds by default and let people shrink it.
     
  15. 0blar

    0blar Getting the hang of it

    Joined:
    May 17, 2017
    Messages:
    271
    Likes Received:
    30
    main stream is h265, substream is h264

    When i modify the main stream encoding video is ok

    I tested with vlc (rtsp://user:password@192.168.0.100:554/cam/realmonitor?channel=1&subtype=0) and it is ok

    I modified the buffer (1500) same issue
     
    Last edited: Oct 13, 2018
  16. wrybread

    wrybread Getting the hang of it

    Joined:
    Sep 12, 2018
    Messages:
    117
    Likes Received:
    49
    Location:
    San Francisco
    Interesting and thanks for the clue, I'll do some testing with h265 encoding. My cameras are all set to h264 so it's possible I need to make some adjustments for that.


    If you want to test, one easy thing that I bet will fix it: comment out the vlc_path line in the config file file and install the latest *32-bit* version of VLC. You can always reinstall the 64 bit version later. But the version I packed with it is v2.2.1 I think, which is older than the newer 3.x. I did that because the new version has issues with XP, which I probably shouldn't worry about.

    And by the way it's running well on my Lubuntu box! I'll pack up the Linux version next week.
     
    Last edited: Oct 13, 2018
  17. 0blar

    0blar Getting the hang of it

    Joined:
    May 17, 2017
    Messages:
    271
    Likes Received:
    30
    I uninstall vlc3.0.4 (64bit) then install 3.0.4 32 bit version
    i re install EasyPTZ 0.61 and uncomment the vlc_path line in the config file
    Result:
    same issue with h265: not working
    h264 is ok
     
  18. 42er

    42er Young grasshopper

    Joined:
    Oct 2, 2018
    Messages:
    58
    Likes Received:
    9
    Location:
    Germany
    Hello wrybread,

    thank you for your very nice little program.

    Is it possible, to add a funktion like "add camera with your own vlc link/address"?

    Reason, I have some other older cameras, where I know the vlc link, but can not add them in EasyPTZ.

    That would be wonderfull.

    Thank you

    42er
     
  19. wrybread

    wrybread Getting the hang of it

    Joined:
    Sep 12, 2018
    Messages:
    117
    Likes Received:
    49
    Location:
    San Francisco
    Yup, already possible. I'm planning to change the basic structure of the GUI so I haven't built a GUI for making configurations yet, but see the
    camera_force_url parameter here:

    EasyPTZ - Dahua Camera Controller for Windows

    For example, if you wanted to add a camera (or any media source) with some specific URL, you'd add this to the config file (this assumes you want it as camera 3):

    Code:
    [camera3]
    
    camera_force_url = http://gizmoware.net/tides/chart/graphics/boathouse-slideshow.png
    
    Again that'll all get a whole lot simpler once I finish the GUI, but that's how to do it for now.

    (And on a sidenote, as far as @Oblar's message above about it not working with H265 streams, strange it works well for me. Hmm.)
     
    Last edited: Oct 29, 2018
    looney2ns and 42er like this.
  20. BillG

    BillG Getting the hang of it

    Joined:
    Nov 6, 2015
    Messages:
    166
    Likes Received:
    73
    I've tried it on a couple h265 cams and it works for me as well.