videoInput.isOpened() is always false when loading video files. 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");}
}