Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRASH | When trying to Save Video. #16

Closed
shoebhoney opened this issue Jan 12, 2017 · 6 comments
Closed

CRASH | When trying to Save Video. #16

shoebhoney opened this issue Jan 12, 2017 · 6 comments

Comments

@shoebhoney
Copy link

Hello Developer!

I appreciate your all Hard Work!!

I am trying to save the video. I have written the Code from WIKI.

I am getting below errors -

E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 Process: mappractise.tv.com.demovideofilter, PID: 21407 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:309) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:324) at org.bytedeco.javacpp.Loader.load(Loader.java:413) at org.bytedeco.javacpp.Loader.load(Loader.java:381) at org.bytedeco.javacpp.avformat$AVFormatContext.<clinit>(avformat.java:2597) at org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:386) at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:380) at mappractise.tv.com.demovideofilter.VideoProcessing.doInBackground(VideoProcessing.java:49) at android.os.AsyncTask$2.call(AsyncTask.java:295) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)  at java.lang.Thread.run(Thread.java:818) 

@muhammad-umair-khan
Copy link
Collaborator

Are you copying my code exactly? If so then send me your gradle file.

@shoebhoney
Copy link
Author

YES, I am copying the exact code.

Below is my gradle file.

`apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '23.0.1'

defaultConfig {
    applicationId "mappractise.tv.com.demovideofilter"
    minSdkVersion 16
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

packagingOptions {
    exclude 'META-INF/services/javax.annotation.processing.Processor'
    pickFirst  'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.properties'
    pickFirst  'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.xml'
    pickFirst  'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.properties'
    pickFirst  'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.xml'
}

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.sherazkhilji.videffects:videffects:1.0.1@aar'
compile 'com.android.support:recyclerview-v7:23.0.1'

compile group: 'org.bytedeco', name: 'javacv', version: '1.1'
compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.0.0-1.1', classifier: 'android-arm'
compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '2.8.1-1.1', classifier: 'android-arm'

}
`

@muhammad-umair-khan
Copy link
Collaborator

Try changing this line:
targetSdkVersion 23
to
targetSdkVersion 22.

Hope it will resolve your issue.

@shoebhoney
Copy link
Author

I already tried that, but unable to fix the issue. Please let me know what wrong i am doing. :)

@muhammad-umair-khan
Copy link
Collaborator

muhammad-umair-khan commented Jan 12, 2017

Ok try to change javacv version to 1.2.2. May be that will help. Also tell me the Android OS version you are using.

@shoebhoney
Copy link
Author

Issue resolved by changing the version of javacv

compile group: 'org.bytedeco', name: 'javacv', version: '1.3'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants