CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    102

    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.
    Last edited by BobS0327; November 30th, 2012 at 07:20 PM. Reason: Added Net Version to post

  2. #2
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,016

    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.
    Last edited by BioPhysEngr; December 1st, 2012 at 04:43 PM. Reason: rephased a little
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  3. #3
    Join Date
    Apr 2004
    Posts
    102

    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."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured