title: Opencv VideoCapture: Error opening file
body: <p>I am triyng to capture IP camera video stream by using OpenCV Java. But I got this warning: </p>
  
  <blockquote>
    <p>warning: Error opening file
    (../../modules/highgui/src/cap_ffmpeg_impl.hpp:537)</p>
  </blockquote>
  
  <p>I tried <a href="https://stackoverflow.com/questions/12279833/videocapture-opencv-2-4-2-error-in-windows">this solution</a>.But it did not work.</p>
  
  <p>I am using openCV 2.4.11 on Windows 10.
  My settings are:</p>
  
  <blockquote>
    <p>I loaded the library: C:\opencv2411\opencv\build\java\opencv-2411.jar</p>
    
    <p>Java library path:
    -Djava.library.path="C:\opencv2411\opencv\build\java\x64"
    C:\opencv2411\opencv\build\x64\vc12\bin and
    C:\opencv2411\opencv\sources\3rdparty\ffmpeg are added to PATH</p>
  </blockquote>
  
  <pre><code>package opencvApp;
  
  import org.opencv.core.Core;
  import org.opencv.core.Mat;
  import org.opencv.highgui.Highgui;
  import org.opencv.highgui.VideoCapture;
  
  public class OpencvApp{
  
      public static void main(String[] args) {
          System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
          VideoCapture cap=new VideoCapture();
          cap.set(Highgui.CV_CAP_PROP_FRAME_WIDTH,640);
          cap.set(Highgui.CV_CAP_PROP_FRAME_HEIGHT,360);
          cap.open("‪C:\\Users\\Berkan\\Videos\\vidm1453499924.mp4");
          //cap.open(0);
          Mat foto = new Mat();
          if (cap.isOpened())
          {
              System.out.println("Video is opened");
              cap.read(foto);
              Highgui.imwrite("C:\\Users\\Berkan\\Desktop\\ada\\foto.png", foto);
              cap.release();
          }
  
          else
          {
              System.out.println("Fail");
          }
  
      }
  
  }
  </code></pre>