View unanswered posts | View active topics It is currently Sun Nov 23, 2014 5:28 am



Reply to topic  [ 11 posts ] 
ZoneMinder Client Desktop Application for Mac and PC 
Author Message

Joined: Mon May 10, 2010 5:11 am
Posts: 41
Post ZoneMinder Client Desktop Application for Mac and PC
As of today, I released a test version of a desktop app for streaming the video feeds similar to the montage view. The app is built on the Adobe Air runtime environment, which is similar to Java. It was a little tricky because mjpeg's are not natively supported by adobe flash. I spent about 3 months of my free time working out the bugs to keep the cpu usage low and prevent any memory leaks. Also, it requires the use of a custom skin. The app and skin are available to download for free at http://dvr-security.net/air/zmc/ .

Features:
-Uses ZoneMinder's built-in login system to authenticate user.
-Streams unlimited number of live video feeds using socket connections (only jpeg is currently supported).
-Take snapshots of what is currently visible on the monitor by pressing the snapshot button, which saves a jpeg locally to your computer.
-Video feeds can be tweaked by changing scale and bandwidth (smaller scale and lower bandwidth reduce CPU usage).
-CPU usage can be reduced by using Frame Skipping, which just tosses out 1 out of x images received.
-CPU usage can be reduced at the expense of more memory being used by un-checking bitmap smoothing and setting smoothing quality to default.
-Select from 1 of 9 montage layouts(more can be added or existing ones changed based on user feedback).
-If space is limited, you can remove the control bars that are at the top and bottom of each video feed.

Experimental Features:
- Change the background frame rate to a low value and the app will use very little resources while it is minimized or if another window gains focus. Be careful, if you set the rate too low, then you may have an increase in memory usage as the image buffers will be filling up faster than they are being read and truncated.
-Pressing the Garbage Collection button will free up any unused memory that is current assigned to the app. Open up task manager before you press the button so that you can see if any memory gets released. This may lead to me writing a timer script that will periodically run the garbage collection command if needed.

All feedback is welcome and appreciated. I would love to see some screenshots of a mac user, since I don't have one to test with. And please try to break it!

Here is a screen shot of the login form:
Image

Here is a screen shot of the montage with options panel open:
Image

Tested on PC's: windows vista home premium, windows 7 home premium, windows 7 starter
Tested on ZM server: fedora 16 with zoneminder 1.24.4


Thu May 10, 2012 11:38 pm
Profile

Joined: Wed Mar 14, 2007 7:01 pm
Posts: 46
Post Re: ZoneMinder Client Desktop Application for Mac and PC
NNNIIICCCEE!!!SUPER COOL!


Mon May 14, 2012 3:24 am
Profile

Joined: Mon May 10, 2010 5:11 am
Posts: 41
Post Re: ZoneMinder Client Desktop Application for Mac and PC
Just released version 0.1.1.
--Moved some buttons around.
--Added a system tray icon
--Left clicking system tray icon will focus/restore app.
--Right clicking system tray icon will open context menu.
--Optimization to the mjpeg parsing code.


Sun May 20, 2012 2:56 pm
Profile

Joined: Mon May 10, 2010 5:11 am
Posts: 41
Post Re: ZoneMinder Client Desktop Application for Mac and PC
Version 0.1.2 released. I noticed that on my cousin's computer some camera feeds occasionally stalled. They have a slow connection and computer which may be the problem, since I have not personally experienced this on my computers. I added a Keep-Alive value to the headers of the socket request in hope that this will prevent the camera feeds from stopping.

Changelog for version 0.1.2:
-- Option to automatically log in was added.
-- Option to set snapshot naming was added.
-- "Keep-Alive: 115" was added to socket headers. (maybe will fix camera feeds that stall)
-- "User-Agent: ZoneMinder Client v0.1.2" was added to socket headers.

Here is a screenshot of the log in form with the Automatically Log In option:
Image


Wed May 30, 2012 3:49 am
Profile

Joined: Thu Jul 06, 2006 3:27 pm
Posts: 341
Post Re: ZoneMinder Client Desktop Application for Mac and PC
Hi
Gave this a try, as although I have my own in-house ip camera montage thing (detailed in the wiki) I'm curious how others have approached this
problem :)

But v.0.1.2 no go for me. I tried with 3 zoneminder servers;

2 resulted in "Error: Invalid data format" and one with "Error: Unable to reach server".

Servers were running zm 1.23.3 or 1.24.2, all debian, all with correct url's specified.

What is common to all three is that they don't need a user/pass to log in. I tried with blank details and invented details for these fields on your client's login, with and without the save buttons clicked.

I have no login required for users, each server is on a private lan and has ip-restrictions at apache level which aren't interfering here.

Happy to give it another go sometime if you've any ideas/fixes.


Wed May 30, 2012 2:01 pm
Profile

Joined: Mon May 10, 2010 5:11 am
Posts: 41
Post Re: ZoneMinder Client Desktop Application for Mac and PC
Flasheart wrote:
Hi
Gave this a try, as although I have my own in-house ip camera montage thing (detailed in the wiki) I'm curious how others have approached this
problem :)

But v.0.1.2 no go for me. I tried with 3 zoneminder servers;

2 resulted in "Error: Invalid data format" and one with "Error: Unable to reach server".

Servers were running zm 1.23.3 or 1.24.2, all debian, all with correct url's specified.

What is common to all three is that they don't need a user/pass to log in. I tried with blank details and invented details for these fields on your client's login, with and without the save buttons clicked.

I have no login required for users, each server is on a private lan and has ip-restrictions at apache level which aren't interfering here.

Happy to give it another go sometime if you've any ideas/fixes.


Thanks for the feedback. I setup my server to be without a username/password by unchecking OPT_USE_AUTH Authenticate user logins to ZoneMinder. I presume this is the setting you are using. I left the fields blank, and also tried entering fake info and the client worked for me.

Did you install the required custom skin? If so, then can you add these parameters to your zoneminder url and see if the skin is outputting the correct data:
Code:
?skin=zmc&view=console.xml
?skin=zmc&view=montage.xml

I added extra views that output formatted xml that can be read by the client.
The console.xml should output something like this:
Code:
<console>
<running>1</running>
<status>Running</status>
<username>admin</username>
<maxBandwidth>3</maxBandwidth>
<viewStream>1</viewStream>
<viewEvents>1</viewEvents>
</console>

The montage.xml should output something like this:
Code:
<montage>
<serverName>website.com</serverName>
<serverPort>80</serverPort>
<monitors>
<monitor>
<id>1</id>
<name>Monitor-1</name>
<width>480</width>
<height>360</height>
<scale>100</scale>
<scaledWidth>480</scaledWidth>
<scaledHeight>360</scaledHeight>
<maxfps>15.00</maxfps>
<sequence>1</sequence>
<serverPath>
/cgi-bin/zm/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=5&connkey=158910&rand=1338421835
</serverPath>
</monitor>
</monitors>
</montage>

In case you don't have the custom skin installed, here is how i installed mine:
Code:
cd /usr/share/zoneminder/www/skins
wget http://dvr-security.net/air/zmc/zmc.tar.gz
tar -zxf zmc.tar.gz
rm -f zmc.tar.gz


Thu May 31, 2012 12:57 am
Profile

Joined: Tue Aug 23, 2011 5:21 am
Posts: 7
Post Re: ZoneMinder Client Desktop Application for Mac and PC
Thanks for the excellent work! Love not having to have a browser open all the time now!


Sat Oct 20, 2012 5:35 pm
Profile

Joined: Mon May 10, 2010 5:11 am
Posts: 41
Post Re: ZoneMinder Client Desktop Application for Mac and PC
pezed wrote:
Thanks for the excellent work! Love not having to have a browser open all the time now!


Thanks for the feedback, but I am actually not satisfied with it. I plan on rebuilding it from scratch after I finish the mobile versions for android and ios.


Sun Oct 21, 2012 3:59 pm
Profile

Joined: Tue Aug 23, 2011 5:21 am
Posts: 7
Post Re: ZoneMinder Client Desktop Application for Mac and PC
Try IP cam viewer for android, I use it with zoneminder and it works great.


Sun Oct 21, 2012 6:18 pm
Profile

Joined: Mon May 10, 2010 5:11 am
Posts: 41
Post Re: ZoneMinder Client Desktop Application for Mac and PC
I took a look at it and it seems nice. But I am making something that is dedicated for use with ZoneMinder (just upload the custom skin to the server, then enter username & password & url in the app). In the near future, maybe you can compare mine to the one you use. Hopefully your phone/tablet supports Adobe AIR (requires a processor like arm 7 or something like that).

The major thing that my app does is to dynamically change the scale of the requested video feed (based on available screen size), so that it only uses as much bandwidth, cpu, memory as needed to have the correct size image show up. For example, if your screen is small and you have 16 cameras, maybe each one only has 50px height and width available to show up on montage. It would be such a waste of resources to load a fully scaled 100% image feed and then downscale it for your screen. That would use alot more bandwidth than necessary.


Mon Oct 22, 2012 12:35 pm
Profile

Joined: Tue Dec 14, 2010 4:53 pm
Posts: 6
Post Re: ZoneMinder Client Desktop Application for Mac and PC
Hi,
Got as well the "invalid data format" message. I get this one each time I am adding the port number into the URL: http://domain.com:8090/zm/index.php
If I remove the port number, the client goes further to connect to the server.
My 2 cts.
Alain


Thu Jan 10, 2013 5:02 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group