Java: I don't get VideoCapture.open(String) to work
Hi all,
I try to get the following java code to work:
public static void main(final String[] args) throws IOException {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
final String filename = "E:/tmp/m.avi";
final VideoCapture vc = new VideoCapture();
final boolean result = vc.open(filename);
System.out.println(result);
}
Unfortuantely, it prints "false", thus it will not open the file.
The system is a Windows 7. I have no additional codecs installed. The file is definitely at this place. I can watch it with Windows Media Player.
You can find the file attached to this bug report as m.avi.
Thanks for your help!
Ok, after some work I got a C++ program to compile (not so easy, if you never build C++ programs :-). I wrote basically the same program in C++. It also prints false. So, it can probably be ruled out that it is a bug in the java wrapper. Still, I have no idea what exactly the problem is. So, I am grateful for every hint.