Page 1 of 3

Linux GUI for ZM Currently Viewer Only Beta

Posted: Thu Jan 05, 2006 6:38 pm
by jameswilson
Hiyah all, i have finally learnt a bit how to do this on linux now. So here is an early beta of a GUI viewer for linux.

Screenshot
Image

There are 2 parts you need
the zm4linux executable
and a text file.
The text file has to be called viseonsettings.txt and must be located in the same folder as the exec.
In the textfile you need to have a url per line
eg.

Code: Select all

http://192.167.0.101/cgi-bin/nph-zms?mode=single&monitor=2&scale=100&user=admin&pass=<password>
http://192.167.0.3/cgi-bin/nph-zms?mode=single&monitor=2&scale=100&user=admin&pass=<password>
http://192.167.0.3/cgi-bin/nph-zms?mode=single&monitor=3&scale=100&user=admin&pass=<password>
http://111.222.333.444/cgi-bin/nph-zms?mode=single&monitor=3&scale=100&user=admin&pass=<password>
With no spaces etc.
line 1 referes to cam1, line 2 cam2 etc

As this is an early beta its just a 4 way viewer at the moment but as with zm4ms things will progress...lol


My aim for this one, is a mouse only driven front end for zm. so it can be used on the server itself with no keyboard etc (or a touchscreen wowee)

As its currently working with zms (as zm4ms does) it will grab images from anywhere but i have only tested with my zm server. It may also be useful as a remote monitor of a live-cd with autorun etc to display images. Anyway comments critism etc always needed accepted etc.

James

PS at the moment i dont know how to interpolate and smooth etc so the images are scaled to fit (raw digital zoom stylee) so on larger screen sizes will be blocky

http://217.154.38.122:8080/zm4linux/

ps tested on fc3 and pclinux os (mandrake 10.1) here let me know what else

Posted: Thu Jan 05, 2006 9:22 pm
by Cylindric
Worked out-of-the-tin for me, on SUSE 10 and ZoneMinder 1.21.4. Well, it did once I realised I had to change the monitor number to match one of mine :lol:

Posted: Thu Jan 05, 2006 9:26 pm
by jameswilson
thanks im glad i hoped it would work on a different distro but at least we know suse, fc and mandrake are ok. Im sure debian will fox it though lol.

James

Posted: Thu Jan 05, 2006 11:46 pm
by zoneminder
Excellent work James, very neat. You're getting to be a bit of a professional at this!

Posted: Thu Jan 05, 2006 11:49 pm
by jameswilson
doubt it mate do you know how much reading and forum joining ive been doing over the last couple of months lol.

And you spoke to soon i have a leak somewhere, this little baby takes all 2 gig (eventually) of my linux machines ram. Poxy useless software developers lol

James

Posted: Fri Jan 06, 2006 12:42 am
by Cylindric
damn them all! :lol:

Posted: Fri Jan 06, 2006 1:38 am
by jameswilson
havnt got the leak yet but i have posted the updated vrsion which is better much better but still leaking. I have added support now for upto 16 cams so if you edit the conf file accordingly you should be good to go. This leak thing might just be my machine so if you can run for a while without errors please let me know so i know to focus my attensions elsewhere.

so added
single view with next button to jump through each cam (only cams setup so if you only have 3 cams in your file that will do. (ps not sure how the split screens would cope though)
added 9 way split
added 16 way split

Ill be back

James

Posted: Fri Jan 06, 2006 1:42 am
by jameswilson
Phil i know others have mentioned it, but how hard is it to get at these images in shared mem, can a different app access them without locking issues etc. And do you know how or where i could start looking. Im assuming that in shared mem is just a number of jpeg's (maybe raw) stored depending on the buffer settings. If so it means i could really ramp the framerate up on this way past the current 2 fps max

James

Posted: Sat Jan 07, 2006 9:21 pm
by zoneminder
It's very simple to access the shared memory from the same box (provided you have priveleges to do so). It's just a block on n images at a certain offset from the start of the shared memory segment. They are all WxHxD in size (not jpeg format, but more like the raw format) and sequential so it's pretty straight forward. 1.22.0 has a perl api for accessing all this but that probably won't really help you.

Posted: Sat Jan 07, 2006 9:39 pm
by jameswilson
once i get a 1.22 setup running then il concentrate on getting raw images supported (and how the hell to work with them), then hopefully with more understanding i can have a go at this shared mem thing

cheers

James

Posted: Mon Jan 09, 2006 9:23 pm
by jameswilson
btw, the leak wasnt me, there is a bug in the compiler im using, i have reported it, once fixed ill release this. Playback might take a while though as .net i know (a bit) but all this linux stuff is different.
Performance noted so far, 4 cams 2 fps of local zm server on a 2800 athlon (socket a) 15-18% processor and about 30 meg

Happy zming

James

Posted: Wed Jan 11, 2006 12:58 am
by jameswilson
hi all, my vision for this app is to be a gui on the zm box itslef so shared mem access is obviously a goal. Im hoping to be able to pipe the vga output to the tv out of the gfx card so it can be viewed on standard cctv monitors if req (if anyone has any experience of doing this with linux id love to hear how it went).
I would also like some input on how people expect it 'should' look, is it important that the images are as big as possible or would pretty buttons and graphics around the images be better. Should it have password access to view or not. Should it be caperble of multiple monitors. Should it be able to print stuff out. etc etc

Any imput would help me greatly as to what it needs to do as the more i know at the planning stage the less i have to undo and redo later on (i ask this because of all the rework zm4ms required etc lol)

Cheers

James

Posted: Wed Jan 11, 2006 1:05 pm
by Jiberjaber
James,

I get the following error under FC4 running as root, application on the desktop and .txt fie with 4 monitors listed.

"An exception of class NilObjectException was not handled. The application must shut down."

Posted: Wed Jan 11, 2006 7:21 pm
by jameswilson
does it throw this immediately or after a period of time?

Posted: Wed Jan 11, 2006 11:32 pm
by jameswilson
ok then people i seem to have the leak fixed and if this fixed it itr wasnt me. Have got a noew compiler about 20 mins ago and have rebuilt, and now the app runs with in 10 Mb instead of 100Gb lol.
Please test away and let me know where to go with this

Currently supported
Live view of
Single cam with next cam button etc
Quad view
9 way split
16 way split

As previous posts its a raw digi zomm so id advise keeping the screen res down.
The flashing 'recoding' in the top right is just flashing text but you get the idea. I think im gonna set this to use a db for settings, either the local mysql or another smaller db. Anyhow ideas needed.

James