Search code examples
androidjcodec

Missing getFrame method in Jcodec 0.1.9 in Android


I'm using Jcodec for my application..

I've added this in my gradle:

compile 'org.jcodec:jcodec:0.1.9'

However when I tried to follow the example on that page, Android Studio cannot resolve getFrame() method. When I tried to look at code, there's no such method at all. Instead there's getNativeFrame.

int frameNumber = 150;
BufferedImage frame = FrameGrab.getFrame(new File("filename.mp4"), frameNumber);
ImageIO.write(frame, "png", new File("frame_150.png"));

But from what I've seen in most sample here in stackoverflow, they are using getFrame.

What could possibly went wrong? Am I missing some component here? Is the gradle dependency incorrect? How do you setup Jcodec for Android?


Solution

  • It looks like you're using the plain old JCodec. There's is an Android specific version at the bottom of this page. At the time of writing this answer, the version number is 0.1.7 and there is no Maven repo that I can find.