Could someone tell me where I\'m doing wrong? These are the steps that I have followed:
Downloaded the adt-bundle-windows from android developer website
Gradle:
compile 'org.bytedeco:javacv:1.0'
compile 'org.bytedeco.javacpp-presets:opencv:2.4.11-0.11:android-x86'
compile 'org.bytedeco.javacpp-presets:ffmpeg:2.6.1-0.11:android-x86'
compile 'org.bytedeco.javacpp-presets:opencv:2.4.11-0.11:android-arm'
compile 'org.bytedeco.javacpp-presets:ffmpeg:2.6.1-0.11:android-arm'
this will integrate javacv to android
Use this example:
http://javacv4android.blogspot.com.br/2014/02/how-to-import-javacv-libraries-to.html
later in OnCreate:
try {
FrameGrabber grabber2 = new FFmpegFrameGrabber(Environment
.getExternalStorageDirectory().getAbsolutePath()
+ "/TESTE/spell.mp3");
String t = "!";
grabber2 = null;
} catch (Exception e) {
e.printStackTrace();
}
if don't exist error, it's ok =)
Sorry for my english
So a jar file is basically a zip file, if you change the extension to ".zip" you can extract the files it contains like you did with OpenCV and FFMPEG.
So, rename "javacv-android-arm.jar" to " javacv-android-arm.zip," extract the .so files out of it and copy them to libs/armeabi.
Good luck!
For latest version.
In build.gradle
:
repositories {
...
mavenCentral()
}
dependencies {
...
compile group: 'org.bytedeco', name: 'javacv', version: '1.2'
compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.1.0-1.2', classifier: 'android-arm'
compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '3.1.2-1.2', classifier: 'android-arm'
}
configurations {
all*.exclude group: 'org.bytedeco', module: 'javacpp-presets'
}