Perplexed by video streaming latency
I am developing a windows client app that accesses a CCTV video stream from a Linux based back end server app called ZoneMinder. I am using a Web browser control in my Windows client. Specifically, I'm calling the following function:
Code:
webBrowser1.Navigate(@"http://XXX.XXXXXX:PORT/index.php?action=login&view=postlogin&username=XXXXX&password=XXXXXX&view=watch&mid=7");
The above function refreshes the image about once every five seconds. But if I use the native web page front end, the image is refreshed about once every second. That is, if I use firefox or IE to access and display the video stream, the refresh rate is one second.
So, my questions; why is Navigate so sloooooow? And how can I reduce the time between image refreshes?
Net version is 4.030319 RtmRel.
Re: Perplexed by video streaming latency
My guess is that using a WebBrowser is overkill. Why not instead sending a WebRequest (MSDN link) for the image file directly?
Also, you seem to be sending a password in the clear as a GET argument. That is ... seriously broken security. ZoneMinder looks like a mature, well-designed package and probably as a Better Way of doing that. I would strongly advise you to read the documentation to find a way to transmit the password not as a URL GET parameter.
Re: Perplexed by video streaming latency
Thanx for the link. I've tried implementing it but it doesn't seem to stream the video to my Windows client. I don't believe WebRequest can handle h.264 video streaming.
I'm using clear text password because the string is actually inputting the userid and password into the initial ZoneMinder web login page. It's my understanding that the ZM login web page encrypts and transmits this data to the back end server. Once ZM verifies the authenticity of the login, it will load the camera watch web page and display the real time video of the CCTV camera.
I've also tried embedding a Windows Media Player object and feeding that complete string into the object but it just chokes on an unhandled exception of "Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown."