title: IP Webcam on OpenCV for Java
body: <p>I am using IP Webcam APP for android and it is streaming MJPEG video through the local url :</p>
  
  <pre><code>http://192.168.0.2:8080/video
  </code></pre>
  
  <p>I was able to show the video using VLC player and this piece of code in C++.
  On the OpenCV 2.2 I opened the url using:</p>
  
  <pre><code>VideoCapture cap;
  
  cap.open("http://192.168.0.2:8080/video?dummy=param.mjpg");
  </code></pre>
  
  <p>It worked in C++, but I want it to work in Java. I was able to run OpenCV2.4.9 using Java when taking pictures from my built in webcam. This is my code for taking the images from a url in Java.</p>
  
  <pre><code>System.loadLibrary("opencv_java249");
  
  VideoCapture capture = new VideoCapture();
  
  capture.open("http://192.168.0.2:8080/video?dummy=param.mjpg");
  </code></pre>
  
  <p>But the capture.open does not open the streaming and I could not debug it properly. I know that it might be a issue with the ffmpeg, since it works on OpenCV2.2. I also know that my OpenCV2.2 is specific for MS 2010 and might be more complete.</p>
  
  <p>Would it help if I compile the OpenCV2.4.9 from sources? Is there a file that I could add to solve that problem? Is there another way of receiving the video from the IP camera and using on OpenCV?</p>