Raw stream viewer

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

jameswilson wrote:I must admit mae that im a bit green to this ./configure stuff and have yet to build zm this way as i always use rpm's. I have also only recently been looking at c# so i assume c++ cant be that much different. I will install an older one 0.4 by the looks and see how it goes. I never view cameras on the machines themselves but thought i ought to check out your app, with all the work your putting into it!!
You need to change shm structures in xlib_shm.c to the same as in zm_monitor.h. There is only need to recompile xlib_shm not zm.

Thanks for looking at my work:)
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

ok now i feel stupid?!?
DO i need to make this app or jst run from the command line in the dir where the app is?

I have this error
[root@localhost xlib_shm]# ./xlib_shm -m6 -c1
xlib_shm viewer for zm 1.22.1 version 0.6
imgx=0 imgy=0
delay=10000
shmkey=7a6d2000
monitors:6
Found 1 Xv adaptors
WARNING: Couldn't find free Xv adaptor with RGB XvImage support
Falling back to ximage - slow and ugly rescalling
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 72 (X_PutImage)
Serial number of failed request: 17
Current serial number in output stream: 27
[root@localhost xlib_shm]#
I have u/g to zm 1.22.1 and am using an ati 9200 card

Sorry im sure its me im on pclos .92 kernel 2.6.14

James
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

try on display depth 24 or 32
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Awesome Mate
I suppose the reason im using a bit of proc (20% on fx60) is because my ati 9200 hasnt got the drivers installed for it?

Also suggestion can it be made to run unwindowed ie completly full screen, i added this to zm4ms and its a great view.

I know your working on mouse support, the way i implemeted mouse full screen on zm4ms was with a right click and a new menu ie view change, place cams etc

Can it also be set to be always on top (ie hide the desktop from the user to stop any playing)

I assume it can be run from a sript on login to autostart

ANd i notice there is a monitor limit of 32 can it split screen all 32?

Love it mate very nice work already.
How far do you plan on taking it?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

jameswilson wrote:Awesome Mate
I suppose the reason im using a bit of proc (20% on fx60) is because my ati 9200 hasnt got the drivers installed for it?

Also suggestion can it be made to run unwindowed ie completly full screen, i added this to zm4ms and its a great view.

I know your working on mouse support, the way i implemeted mouse full screen on zm4ms was with a right click and a new menu ie view change, place cams etc

Can it also be set to be always on top (ie hide the desktop from the user to stop any playing)

I assume it can be run from a sript on login to autostart

ANd i notice there is a monitor limit of 32 can it split screen all 32?

Love it mate very nice work already.
How far do you plan on taking it?
There can be simply more monitor added if there is a need. But I think that it is impossible to run more than 32 monitors on one machine. Am I wrong, were I?

I stayed at 16 cams split because - i had keys 5 t g b:) so that's the only reason. That can be changed too if you want. So even 25 cameras(5 in row) should be ok.

You can run it from .xsession script without window manager. When you do this it will be no taskbar, and any other components. Only the screen with cameras(user not able to close xlib_shm or run any other program)

I think of some another mouse support.
You click on "box" - this place where the image appears. And then you click on nbumbers on the top - monitor_ids, and now you get which camera you want.

Maybe on the bottom or top right you have buttons to switch modes.

That would be much simpler than making some lists appear after right click, because I didn't see in xlib such menus.

This 20% cpu is probably because of ati and software rescalling - it's really shitty. I will think of some more compatible display driver than xv rgb. I see that many cards doesn't have such capabilities. I will think of opengl, or something like that. I will ask on the newsgroup maybe today what's the best driver.

Now I have 4 months of vacation. So I think the progress in development should be fast.
But please tell me ideas what to change/add...
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

There can be simply more monitor added if there is a need. But I think that it is impossible to run more than 32 monitors on one machine. Am I wrong, were I?
No i doubt it i think a limit of 32 is fine (until we get 4 core processors anyway)
I stayed at 16 cams split because - i had keys 5 t g b so that's the only reason. That can be changed too if you want. So even 25 cameras(5 in row) should be ok.
well either 16 max or 36 i suppose


You can run it from .xsession script without window manager. When you do this it will be no taskbar, and any other components. Only the screen with cameras(user not able to close xlib_shm or run any other program)
I like the sound of this can you explain further please?

You click on "box" - this place where the image appears. And then you click on nbumbers on the top - monitor_ids, and now you get which camera you want.
Ideally id like to have the i/f without a keyboard so if the way you suggest is easy and usable, id go with that!


This 20% cpu is probably because of ati and software rescalling - it's really shitty. I will think of some more compatible display driver than xv rgb. I see that many cards doesn't have such capabilities. I will think of opengl, or something like that. I will ask on the newsgroup maybe today what's the best driver
I think that nvidia open gl is better than ati's but i may be wrong. Even if there is hardware req just say you need an ati x300 or better for scaling to be good!


Now I have 4 months of vacation. So I think the progress in development should be fast.
But please tell me ideas what to change/add...
Good news

Ideas then
Mouse i/f as discussed

picture in picture view

means to control it remotly (ie my zm box is in my loft headless and id love to connect it to my tv's but id need a means to change the views, ideally over tcp/ip with my pda, laptop etc

nvidia/ati tvout support

simple playback maybe?

freeze frame

watchdog (if it stops/bombs will be killed and respawned)

Alert if motion detected

cant think of anymore but i reakon theres 12 months work there lol

I think all it needs to be is a simplish fast front end. Its a very nice piece of work i was impressed when i ran it!
I think the bigger stuff should be handled by the remote clients to keep it simple and stable on the server itslef


Warm regards
James
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

jameswilson wrote: I like the sound of this can you explain further please?
Just make .xsession file in home directory of user and make it executable

Code: Select all

touch ~/.xsession
chmod +x ~/.xsession
echo "some_path/xlib_shm -m1 -m2 -m3 -m4" > ~/.xsession
That's all.

Ideally id like to have the i/f without a keyboard so if the way you suggest is easy and usable, id go with that!
OK. Maybe tommorow if I won't have anything better to do.

I think that nvidia open gl is better than ati's but i may be wrong. Even if there is hardware req just say you need an ati x300 or better for scaling to be good!
Stupid to say but my nvidia riva tnt 1 works perfectly!
I didn't looked at newer nvidia cards because I don't have such one.
Maybe someone who has card which works in xv can recommend something.
I will try to include other driver that would be as fast as xv or even faster and doesn't use main CPU.
picture in picture view
That would be hard thing to do for now. And IMHO not so important.
means to control it remotly (ie my zm box is in my loft headless and id love to connect it to my tv's but id need a means to change the views, ideally over tcp/ip with my pda, laptop etc
I'll think of that.
Maybe control by telnet, and some script?
That should be very easy to fit local requirments.
nvidia/ati tvout support
Already is:) Just in xserver. If you want some info how to configure ask me. Works perfectly for few months on my 0.3 in some school on big lcd tv.
simple playback maybe?
When zms will stream events it will be possible.
If not I think I wouldn't like to play with it.
I prefer mozilla for browsing events.
I believe that it is good to stay with software lightweight and include only needed features - don't double what is already done.
Maybe running mozilla with good url when clicking somewhere would be better than including this inside the app.
freeze frame
Not a big problem
watchdog (if it stops/bombs will be killed and respawned)
It should work with some other script/program. Maybe xlib should reset some counter in file that is being written by bash script. I'll think of that more.
It shouldn't stop unless you restart zm.
Alert if motion detected
Alert if camera changes state - that one I can achieve in few seconds because I have direct access to shm, and there is a variable which shows camera state.
If you say alert you think of sound or message?
cant think of anymore but i reakon theres 12 months work there lol
I think that some of the things I can done in few days...
I think all it needs to be is a simplish fast front end. Its a very nice piece of work i was impressed when i ran it!
I think the bigger stuff should be handled by the remote clients to keep it simple and stable on the server itslef
I think the same - fast and stable, never overloaded like kde or openoffice!
That's one of my goals, and that's the reason I never used kde and other software with too much options.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Alert if camera changes state - that one I can achieve in few seconds because I have direct access to shm, and there is a variable which shows camera state.
If you say alert you think of sound or message?
Maybe sound but i was thinking of something like a red square top right corner or something. If you make sound how would you play. Soundcard or mobo speaker? Plus would need to be option of on/off from frontend

Quote:

picture in picture view


That would be hard thing to do for now. And IMHO not so important.
fair enough. What would you do if you only had two cameras then repeat them in the lower quads?

Maybe control by telnet, and some script?
That should be very easy to fit local requirments.
Yeah if its open like that then i could add it to zm4ms and make a pocket pc even a smartphone app, but i suppose we wouldnt want to open a telnet server to the web so it would be local lan only?


Already is:) Just in xserver. If you want some info how to configure ask me. Works perfectly for few months on my 0.3 in some school on big lcd tv.
yeah please maybe a howto in the wiki
When zms will stream events it will be possible.
If not I think I wouldn't like to play with it.
I prefer mozilla for browsing events.
I believe that it is good to stay with software lightweight and include only needed features - don't double what is already done.
Maybe running mozilla with good url when clicking somewhere would be better than including this inside the app
Ok i suppose if you could send the relevant url to mozilla and open the playback list for the relevant image so that user could just click on camera or whatever and playback rather than have access to the full web front end?
I think the same - fast and stable, never overloaded like kde or openoffice!
That's one of my goals, and that's the reason I never used kde and other software with too much options.
I agree nothing to fancy then stay away from playback and make it purly a live viewer (thats how zm4ms started anyway lol)

Regards
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Just make .xsession file in home directory of user and make it executable
Code:

touch ~/.xsession
chmod +x ~/.xsession
echo "some_path/xlib_shm -m1 -m2 -m3 -m4" > ~/.xsession


That's all.
Mate im missing something here too!
I have created a file in a users home dir and added the above file and changed the path and monitor numbers
but whenever i try to login it starts to load kde then drops me back to login.

Im missing something but as i dont really understand whats it does i cant fault find on it?

James
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Quote:

watchdog (if it stops/bombs will be killed and respawned)


It should work with some other script/program. Maybe xlib should reset some counter in file that is being written by bash script. I'll think of that more.
It shouldn't stop unless you restart zm.
Was just wondering on this as the one on my box keeps seg faulting
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

jameswilson wrote: Mate im missing something here too!
I have created a file in a users home dir and added the above file and changed the path and monitor numbers
but whenever i try to login it starts to load kde then drops me back to login.

Im missing something but as i dont really understand whats it does i cant fault find on it?
James
Try using gdm.
And try to run from xsession for example xclock. That will make you sure that it is not a bug in my soft.

And about the watchdog.
If you are experiencing segfaults that's not good. Maybe your memory is broken or something like that?

ps. I'm on the way to implement opengl stuff. That the most important goal for now.
The weirdest thing is that when I installed nvidia's drivers xv lose the capability to display RGB32 image. On nv xorg driver it was OK.

Results are perfect! It is much better than xv. And it will be compatible with every card available on the market.

xlibshm - around 3% cpu, and xorg 3% cpu at 25fps one camera.
In comparision zma eats about 25% in this conditions.(PIII 777mhz)
That's really great. But I have some problems with positioning the image in window. I had to read some manual. Maybe on monday I will put the opengl version for public.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Sounds Great
Re the seg fault i think it was because i was remotly restarting zm! But i will monitor
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

jameswilson wrote:Sounds Great
Re the seg fault i think it was because i was remotly restarting zm! But i will monitor

I'm sure that restarting zm makes xlib_shm
halts or segfault. I'll think of monitoring restarts.
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

I looked harder on opengl stuff, and.
I can put image in its own size and it works perfectly.
When I want to scale it or put it on texture it is to slow.
So there won't be opengl version for now. I have to take a harder look at it.
Or think of something else instead of gl.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

ok matey
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Post Reply