问题
I tried to use opencv java interface to capture the video, I find isOpened is always false.
I have tried different video format and different version (2.4.11 and 3.0.0), both met the same issues.
I have configure "-Djava.library.path=D:\Project\opencv\opencv3.0\build\x64\vc12\bin", and have copied opencv_java300.dll to this folder.
And I checked tips OpenCV 3.0 VideoCapture doesn't open video file in Java and OpenCV 2.4 VideoCapture not working on Windows, neither works for me.
Anyone knows what's the trick part to capture the video?
The sample code I have is:
VideoCapture capture=new VideoCapture();
capture.open("D:\\StopMoti2001.mpeg");
if(!capture.isOpened()){
return;
}
回答1:
I have had the same issue but thanks tou your comments I have figured it out. For anyone intrested in the solution: copy opencv_ffmpeg310_64.dll from opencv/build/java/x64 folder to your project main folder (containing folders: src, .settings, bin).
来源:https://stackoverflow.com/questions/32155817/opencv-open-a-video-files-but-capture-isopened-always-falses