Can't open video files - Java + OpenCV
videoInput.isOpened() is always false when loading video files. I'm on Windows 7 64 bit and using eclipse, things I've tried to fix it:
- Adding "opencv_ffmpeg310_64.dll" pretty much everywhere
- Added the PATH variable
Tried different versions of OpenCV (using 3.1)
public static void main(String[] args) { System.loadLibrary(Core.NATIVE_LIBRARY_NAME); //Load image from video String videoURL = "C:/Users/Adam/Desktop/fulltest.mp4"; VideoCapture videoInput = new VideoCapture("C:/Users/Adam/Desktop/fulltest.mp4"); if(videoInput.isOpened()) { Mat frame = new Mat(); videoInput.read(frame); BufferedImage frameImage = Mat2BufferedImage(frame); DemoUI test = new DemoUI(frameImage); } else {System.out.println("Broken");} }