0

i would like to use jar library from http://jcodec.org/ with Processing. I know there are many of tutorials about libraries but none of them are clear enough for me to understand. I have already dragged and dropped the jcodec-0.1.5.jar to my sketch window and it created a folder named "code" with the file jcodec-0.1.5.jar in it, but when i want to use

FrameGrab grab = new FrameGrab(new File("filename.mp4"));

Im still getting

"The Constructor FrameGrab(file) is not defined."

Do i have to import something ? if so what to i have to type after "import" ? any help is appreciated. Thanks

Zelldon
  • 5,396
  • 3
  • 34
  • 46
distiking
  • 7
  • 3
  • move the jar into the lib/ folder of the project – Zelldon Apr 28 '15 at 10:10
  • 1
    the class FrameGrab (or any other classes from jcodec) will not be available until you import the correct package. do you have a line like `import org.jcodec.api.*` in your code? – fferri Apr 28 '15 at 10:13
  • thanks for reply, i followed your instruction and it added import org.jcodec.api.*; but i still get FrameGrab not defined. – distiking Apr 28 '15 at 10:32
  • @distiking have you moved the jar to the lib/ folder? – Zelldon Apr 28 '15 at 10:35

2 Answers2

0

The class you are trying to instantiate does not have a constructor defined that matches the constructor you are calling. There is no constructor that accepts File as an argument.

Try calling the default constructor:
FrameGrab grab = new FrameGrab();

KernelKoder
  • 746
  • 5
  • 15
0

Thanks guys for your help, the library is working. When i just type FrameGrab grab; without defining it the program runs fine, so it must be the constructor which i will figure out later. Thanks

distiking
  • 7
  • 3