title: Opencv java IP camera mjpg stream
body: <p>I am trying to grab images from a IP cam for image processing using opencv java. The stream is in mjpg format and I am using opencv's VideoCapture to try to retrieve a image. I can grab a image from my webcam using videocapture but when I try to open a IP cam it will never open. I can also view test stream <a href="http://construction.sfhs.com" rel="nofollow">here</a>. I tried searching around for an answer but none pf them seem to work. I am on windows 7 with opencv 2.4.9. This is the code I am trying to get to work.</p>
  
  <pre><code>System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
  VideoCapture vc = new VideoCapture();
  vc.open("http://construction.sfhs.com/mjpg/video.mjpg");
  Thread.sleep(100);
  while(true) {
      System.out.println(vc.isOpened());
      Thread.sleep(100);
  }
  </code></pre>
  
  <p>It just outputs false</p>