Page 3 of 4

Posted: Tue Dec 06, 2005 12:42 pm
by zoneminder
SyRenity wrote:Do you mean that you are looking for ways to basically feed video from ZM to a RTP/RTSP streaming server like Helix DNA Server or Darwin Streaming Server? This can be really good, although the CPU requirements should be considered as well.
Yes, this is what I would like to do. I get the feeling that there is some critical piece of common knowledge that is evading me as nowhere does it mention how to actually get a feed into the server, just how to get one out. :?

How much cpu etc it uses remains to be seen. Hopefully it will be less if several feeds are the same monitor going to different people as only one stream will need to be created. It may be more in simple scenarios though. Of course if I ever do get it working it will all be optional!!
SyRenity wrote:BTW, MPEG4IP that was mentioned here, supports RTP/RTSP as well (http://mpeg4ip.sourceforge.net/features/index.php).
I'll take a look at this as well, thanks.

By the way I've been running a flash feed for the last hour or so. It's about 10 minutes behind at the moment (though I don't know where all that data is actually stuck). However although my FF went well over 200Mb (which was where it started), the next time I looked it was 175Mb and it's since been 159Mb and is now back to 179Mb. So although it does go up, it's by no means a one way street and periodically large swathes of memory get freed up. I haven't tried with a fresh FF yet though so it may be a flawed test.

Phil

Posted: Tue Dec 06, 2005 1:02 pm
by SyRenity
Hi.

I actually have checked this topic some time ago (when we didn't had video at all, with the legacy FFMPEG). It seems, that most of the servers require to study their API, in order to feed the frames. I, in contrary looked for an easy way to do it via pipes or shared memory (zm style!), or in the worse case, via /dev/ virtual device method. Both Darwin and Helix didn't have a clear explanation of how to do this. The only other alternative that I found, was the Flumotion server (http://www.fluendo.com/), which btw, Theora oriented. It uses GStreamer framework heavily (http://gstreamer.freedesktop.org/), but after checking the dev docs, I decided to fall back to FFMPEG :).

Regardless, below are the Helix and Darwin resources, that I found:
Helix:
https://common.helixcommunity.org/nonav ... lixsdk.htm
https://helix-server.helixcommunity.org ... dling.html
https://helix-server.helixcommunity.org ... howto.html
Darwin:
http://developer.apple.com/documentatio ... index.html
http://developer.apple.com/documentatio ... index.html

The best approach seems, is to develop a video source input plug-in for the server, which will communicate with the ZM.


Regarding the memory usage, if this what Firefox takes, I don't want to think how much IE will take (or how many times it will crash, for the matter :)).

Posted: Tue Dec 06, 2005 1:36 pm
by jameswilson
regarding the memory issue .net has the same issue its ram usage grows to huge amounts (if caching 16 images per cam and you have 36 cams on zm4ms) it can grow to over 500Meg and it cant page it or it slows to a crawl. It peaks at this then dropbs back to 80Meg or so then grows again. I think ms stores all images in bitmap format as that is the only way i can explain it. If i could find a way to store the jpgs (nbot to disk and i dont want to get involved in ramdisks) directly memory uisage would be a lot lower. But basically im assuming that any viewer firefox, ie or zm4ms will be affected by this memory issue

James

Latency Build-up

Posted: Tue Dec 06, 2005 3:28 pm
by mrreynolds
re:
zoneminder wrote:However I am experienced extreme latency build-up, the video gets behind at a rate of 5-10 seconds per minute. I get this locally, no matter what the bitrate and maxfps, and on Mickey's server. I can't imagine it is lack of backwidth, as I have a gb link between the boxes here so I'm wondering if it might be down to something else.

I wonder if anyone else can do a check and see what they get, latency-wise. It would be great to get this going realtime.

Phil
I stumbled on a possible explanation for this... by coincidence I installed a web-cam on my Win workstation last night and when I checked the Flash stream this morning I saw the same kind of dramatic latency build-up Phil described, yet on this same workstation I earlier had no problem. I also noticed the web-cam install added a new soft network connector to my PC called "Microsoft TV/Video Connector." I disconnected the web-cam and rebooted the PC, which eliminated the soft connector and the latency build-up disappeared completely.

Mickey

Posted: Tue Dec 06, 2005 3:36 pm
by zoneminder
Interesting. All my PCs are riddled with webcam drivers (surprise surprise) so perhaps this is the cause for me. Do you know if this was installed as a device, or something else? I'd also need to figure out how to uninstall/disable it.

Phil

Posted: Tue Dec 06, 2005 3:45 pm
by mrreynolds
This was an older Logitech usb web-cam and I downloaded the latest driver. I first unplugged the cam and tried to disable the soft network connector, but was not allowed to disable it by Windows. So I rebooted and with no cam connected, the driver was not loaded. Guess I'll uninstall the driver now, though, since I can't use the cam.

Mickey

Posted: Tue Dec 06, 2005 9:23 pm
by victor_diago
Hi again.

Im sorry but i didnt understand that delay problem.

It only occur if you are watching in a windows machine AND if you have a WEBCAM driver installed ?


If yes, this should have something to do with the ability of the flash player to deal with webcams.

So, if im watching in linux with firefox i would have no problem, right ?

I will try the flash montage in a 16 cameras installation right tomorrow and will post anything interesting about ok ?

Ohh, Phil have you experienced something strange about the memory usage ?

Thanks for now.

Victor Diago

Posted: Tue Dec 06, 2005 10:14 pm
by zoneminder
I've done some tests using a Mac Mini and I still get the time lag, very badly maybe 5 seconds per minute. That box has never been near a camera so I'm not sure what could be causing it. I can't think of any reason why it should be that bad. This is on high (150Kbs) and low (75Kbs) settings.

Phil

Posted: Tue Dec 06, 2005 10:48 pm
by victor_diago
Hi Phil.

Let me understand, you are experiencing this delay over internet right ?

I know how terrible is this problem, that was the same thing that happened with ASF or WMV, but even by local streaming with firefox.


In local streaming (same network, high speed lan) you have the same issue ?


Thanks

Victor Diago

Posted: Wed Dec 07, 2005 12:37 am
by victor_diago
Philip.

Surely its a libavcodec related issue... this ALSO happens with ASF, in about ten minutes it was 4 minutes delayed and, when watching many cameras (say 8 cameras) after some time each camera was showing a different time.....

Phil, please lets see what could be this, how do zm invoke libavcodec ?

i will take a look at code but as there is historically many people in the forum that needs this, i ask your help to solve this with us.


Thanks for now

Victor Diago

Posted: Wed Dec 07, 2005 4:21 am
by mrreynolds
Sorry I had to be away a bit...

re:
I've done some tests using a Mac Mini and I still get the time lag, very badly maybe 5 seconds per minute. That box has never been near a camera so I'm not sure what could be causing it. I can't think of any reason why it should be that bad. This is on high (150Kbs) and low (75Kbs) settings.
Unfortunately, I have now also experienced a time lag independant of the web-cam issue I reported before... and here's another variable: running the same stream over my LAN in Firefox v1.5 and IE side-by-side on Win XP, after 10 min. the Firefox stream lost about 2 min. while the IE window stayed perfectly on time. Yet Firefox 1.0.7 on my Win2K laptop stayed on time as well.

It would be helpful to know if others can confirm time lags with one browser vs. others on Win or other platforms, with swf or asf streams.

Rgds,
Mickey

Posted: Wed Dec 07, 2005 1:16 pm
by zoneminder
Victor, I am running just on an in house lan on the Mac, though one leg is wireless. However I think it;s got pretty good bandwidth.

The other odd thing is that I don't get any lag problems with asf streaming. I don't think it's a libavcoded issue as zms feeds it frames when it is ready for them and doesn't queue them up. So even if it locks up for several seconds the next frame sent will be the current one.

Phil

Posted: Wed Dec 07, 2005 1:18 pm
by jameswilson
lol im glad that you have no issues on something and others do lol thought it was just me. Isnt it an utter $$stard to find when yours works fine

James

Posted: Thu Dec 08, 2005 10:28 am
by victor_diago
Damn

People, it doesnt work. It goes out of sync, just like asf and any other crappy format i have tried.

Man, what @!#$ problem is this ? is ffmpeg skipping frames or a f@!!? buffer in any side ? i have tested it with ASF (without cache in mplayer) and now with SWF, both in Linux and Windows, and it goes in any format out of sync THE SAME WAY, so i think its not a browser related or cache fill issue.


Im being worried about that, the fire#OOPS# just eats cpu and memory in the ZM's box, it also leaks so you need to restart it from two to two hours, but any other try just goes down. nothing works as it should, goes out of sync...

I really convinced that this should be a problem in the use of libavcodec, i dont know much of C but imn looking the code.

Philip and others, dont you have any idea of what could cause that ?

Thanks
Victor Diago

Posted: Thu Dec 08, 2005 11:29 am
by cordel
I am no expert on this issue and would love to see some one find what creates it.
I wondering since this goes out with the standard web stuff it's on TCP which tries to keep things (Packets) in order (I could be way off here).
Might is be better to send it UDP so if packets get messed up the view just continues on?
Would it be perceived as noise or FUBAR the whole frame?

Regards,
Corey