View unanswered posts | View active topics It is currently Sat May 25, 2013 8:14 am



Reply to topic  [ 199 posts ]  Go to page 1, 2, 3, 4, 5 ... 14  Next
Raw stream viewer 
Author Message

Joined: Wed Feb 23, 2005 10:21 pm
Posts: 150
Location: Czestochowa, POLAND
Post Raw stream viewer
I wrote simple application that can show the new raw format. It reads the stream from standard input. It is fully functional and can display one camera at time. If you run few instances of it you can get more cameras.

To run it you need to set QUERY_STRING variable.
To do this: write export QUERY_STRING="mode=raw&monitor=1&scale=100" in your terminal.

Then run the application zms with passing its output to xlib_raw.
To do this write:/usr/cgi-bin/zms | xlib_raw -x 100 -y 100 -w 352 -h 288 -s 100 -c 6 -l 305

Now explanation of command line options
-x window x postion
-y window y postion
-w width of monitor
-h height of monitor
-s scale - at start use 100
-c number of bytes used to display frame lenght - you can count it by multiplying monitorwidth*monitorheight*3. THe number of digits is your -c
-l lenght of zms header on start

That's all I think. Please test it and post your comments. Probably it has some bugs:)

Here you can download it and see a screenshot:
http://dig.hopto.org/xlib_raw/

It works only on display with 24bit color depth, and maybe on 32bit, but I'm not sure.

@James you can use my part of code in your viewer.


Fri Jan 27, 2006 5:16 pm
Profile
User avatar

Joined: Wed Jan 21, 2004 3:44 pm
Posts: 245
Location: Brazil, sao paulo
Post 
Man,

Really thanks, that is just fantastic.

Thanks for that.


Just a question, have you experienced any delay or lag in a long run, for example 1 hour or some like that ?

The other viewers that used the ffmpeg always had a increase lag.

Victor Diago


Mon Feb 06, 2006 9:17 pm
Profile ICQ YIM
Site Admin
User avatar

Joined: Wed Jul 09, 2003 3:07 pm
Posts: 5221
Location: Bristol, UK
Post 
Thanks for coming up with the viewer, it sounds like it will be very useful.

Victor, the raw format does not use ffmpeg, in the same way that streaming jpegs don't so it should not suffer from lags in the same way that mp-jpegs don't.

_________________
Phil


Tue Feb 07, 2006 12:58 am
Profile ICQ YIM WWW
User avatar

Joined: Wed Jan 21, 2004 3:44 pm
Posts: 245
Location: Brazil, sao paulo
Post 
Just in time to reply :


that works perfectly. i could transform a system from a P4 3.2 Ghz 1G memory showing 16 cameras at 3 fps each on the screen to a Sempron 2.4 512 Mb memory showing the same 16 monitors in a live montage with raw streaming and it is much faster than a p4 3.2 with firefox.

At this time 95 % processor idle.


Thanks

Victor Diago


Wed Feb 15, 2006 12:57 am
Profile ICQ YIM

Joined: Wed Feb 23, 2005 10:21 pm
Posts: 150
Location: Czestochowa, POLAND
Post 
Thanks for testing. I didn't test it in big system. Good to see that it works with 16 cameras at time.
I also make a viewer that reads directly from shm. It is somehow better than the current one, because it doesn't use zms to read images.

But I have one problem maybe someone can help.
The problem is that zm sets permissions to shm to user what is running apache. I would like to run viewer as normal user(not root, not www-data).
Can this be simply achieved without changing the creation permissions of shm data? Maybe someone knows?

The problem also occurs when using current viewer(with zms) - it must be run from root or www-data.


Wed Feb 15, 2006 3:52 pm
Profile

Joined: Wed Feb 23, 2005 10:21 pm
Posts: 150
Location: Czestochowa, POLAND
Post 
Here is viewer that reads directly from shm.
http://dig.hopto.org/xlib_shm/

@Victor please test it if you can.
ps. It can't have any lags


Wed Feb 15, 2006 8:52 pm
Profile
User avatar

Joined: Wed Jan 21, 2004 3:44 pm
Posts: 245
Location: Brazil, sao paulo
Post 
I will try it just today.


only a question, does it work with all versions of ZM since it reads directly from Shm ?


Thanks for now

Victor Diago


Thu Feb 16, 2006 2:35 pm
Profile ICQ YIM

Joined: Wed Feb 23, 2005 10:21 pm
Posts: 150
Location: Czestochowa, POLAND
Post 
I've tested only with 1.22.0. If the shm structure is the same it will work. Give it a try. You can simply change the shm structure - copy it from zm_monitor.h to my source and recompile.

ps.
This viewer cannot rescale images - the previous one could by using zms scale option.


Thu Feb 16, 2006 4:35 pm
Profile
User avatar

Joined: Fri Mar 05, 2004 5:47 pm
Posts: 5218
Location: /USA/Washington/Seattle
Post 
Thank you for your time into this, as it has been on every ones wish list for a while. Have you chosen a license to put it under yet, and if so which one?

Regards,
Corey

_________________
Image
[url=http://tinyurl.com/cae63]Image
3939663646337[/url]
It's better to keep your mouth shut and appear stupid than open it and remove all doubt.
-Mark Twain


Last edited by cordel on Mon Nov 06, 2006 10:45 am, edited 1 time in total.



Thu Feb 16, 2006 8:57 pm
Profile WWW

Joined: Wed Feb 23, 2005 10:21 pm
Posts: 150
Location: Czestochowa, POLAND
Post 
cordel wrote:
Thank you for your time into this, as it has been on every ones wish list for a while. Have you chosen a license to put it under yet, and if so which one?

I'm not a familiar with all the license stuff.
You can do what you want with the code and use it commercial. I will be glad if you make a patch or something and make it public as I done.
If you want I can include some license info, but please tell me what exactly.
Do you have any wish list for this prg?


Thu Feb 16, 2006 9:40 pm
Profile
User avatar

Joined: Fri Mar 05, 2004 5:47 pm
Posts: 5218
Location: /USA/Washington/Seattle
Post 
I'll have to take a look at how to implement it. If you would like it open source like ZM Phil uses the GNU GPL.
If you would like I can also take care of it for you, Just email the source over and I can add the license into it and get it posted :wink:
Just make sure I have your Full name in the email so I can make the proper Copyright.

Again, Thank you for the time you put into this.
Corey


Fri Feb 17, 2006 12:41 am
Profile WWW

Joined: Wed Feb 23, 2005 10:21 pm
Posts: 150
Location: Czestochowa, POLAND
Post 
cordel wrote:
I'll have to take a look at how to implement it. If you would like it open source like ZM Phil uses the GNU GPL.
If you would like I can also take care of it for you, Just email the source over and I can add the license into it and get it posted :wink:
Just make sure I have your Full name in the email so I can make the proper Copyright.

Again, Thank you for the time you put into this.
Corey

OK the source code is in the url of program. Please add the license info if you can. In two words GNU GPL means that you can do anything with the code but if you used it you have to make your program GNU GPL?

Probably today I'll make some improvments.
I think of config file, cycle view, multiple monitors in one program. If someone have some fast and simple rescalling algorythm I will be thankful.


Fri Feb 17, 2006 2:37 pm
Profile
User avatar

Joined: Fri Mar 05, 2004 5:47 pm
Posts: 5218
Location: /USA/Washington/Seattle
Post 
Done. See PM

Regards,
Corey


Fri Feb 17, 2006 10:59 pm
Profile WWW

Joined: Wed Feb 23, 2005 10:21 pm
Posts: 150
Location: Czestochowa, POLAND
Post 
cordel wrote:
Done. See PM

Thanks I added license info and fixed some problems with xlib_shm. Xlib_raw still the same.

@Victor
Have you tested the xlib_shm? Is it working for you? If not please tell me what is happening.

@everyone
Can you post some ideas for program? What options would you like to have in it?


Mon Feb 20, 2006 10:03 pm
Profile

Joined: Wed Jun 08, 2005 9:07 pm
Posts: 5078
Location: Midlands UK
Post 
Maciekc, i havnt tried your viewer, but if development with you is progressing i could drop working on the linux one i have as you seem to know more about what your doing than me.
If your making an app for linux, obviously viewing is important, you need various split screen types ie quad, 9 way 16 way etc. Also playback.

A problem that i have had for a while now is multicam playback (i was thinking of limiting it to 4 way playback max.

I also think the interface should be mouse only (or keyboard not needed but usefull) as a keyboard gets in the way, plus if you felt flash a touchscreen would be great.

I dont think it needs to be to amazing as its the software on the machine and the more it does is less power is available to zm. (Plus its a damn site harder to work on, on the development side lol ;-))

Just my 2 pence mate.

PS whats it written in?

_________________
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


Tue Feb 21, 2006 10:38 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 199 posts ]  Go to page 1, 2, 3, 4, 5 ... 14  Next

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