Ask Your Question
0

Java: I don't get VideoCapture.open(String) to work

asked 2013-12-16 11:02:36 -0600

Matthias gravatar image

updated 2013-12-16 11:03:24 -0600

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!

edit retag flag offensive close merge delete

Comments

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.

Matthias gravatar imageMatthias ( 2013-12-20 11:19:30 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-12-21 02:47:35 -0600

Matthias gravatar image

updated 2013-12-21 02:55:33 -0600

Can anybody close my quesion, since it is just a duplicate of this one?

My problem has nothing to do with java at all. I asked the author of the linked question for his file julius.avi. I can read this one with java, but no other file.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-12-16 11:02:36 -0600

Seen: 371 times

Last updated: Dec 21 '13