Git Product home page Git Product logo

sample-projects's People

Contributors

cavarzan avatar d-a-gerashenko avatar dependabot[bot] avatar djalmaafilho avatar fejd avatar gzaccaroni avatar hguillemet avatar hnvn avatar ka-ba avatar kigkrazy avatar lancewoo avatar leaf918 avatar michaeltandy avatar pchundi avatar phajduk avatar saudet avatar treo avatar undin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sample-projects's Issues

Is it possible to generate binding for already compiled shared library for Android?

Hello,
I couldn't find example how to generate binding for already compiled library. I tried using gradle-javacpp-android as example but I couldn't figure out how can I link my shared library.
I have 4 libraries for 4 architectures:

lib
|-arm64-v8a
    |-libtest_library.so
|-armeabi-v7a
    |-libtest_library.so
|-x86
    |-libtest_library.so
|-x86_64
    |-libtest_library.so

test.h

#ifndef UNTITLED1_TEST_H
#define UNTITLED1_TEST_H

class Test {
    int m_val;
public:
    Test();

    int get_val();
};

#endif //UNTITLED1_TEST_H

UnsatisfiedLinkError on Android 5.1

Hello

I try to run your example on Android 5.1.1 and when i click on Start button i get this error

04-07 15:29:36.962 26836-26836/org.bytedeco.javacv_android_example W/linker: libjniavutil.so: unused DT entry: type 0x6ffffffe arg 0x221dc
04-07 15:29:36.962 26836-26836/org.bytedeco.javacv_android_example W/linker: libjniavutil.so: unused DT entry: type 0x6fffffff arg 0x1
04-07 15:29:36.963 26836-26836/org.bytedeco.javacv_android_example E/art: dlopen("/data/app/org.bytedeco.javacv_android_example-1/lib/arm/libjniavutil.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "av_version_info" referenced by "libjniavutil.so"...
04-07 15:29:36.982 26836-26836/org.bytedeco.javacv_android_example I/art: Rejecting re-init on previously-failed class java.lang.Class<org.bytedeco.javacpp.avutil>
04-07 15:29:36.982 26836-26836/org.bytedeco.javacv_android_example D/AndroidRuntime: Shutting down VM
04-07 15:29:36.988 26836-26836/org.bytedeco.javacv_android_example E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                     Process: org.bytedeco.javacv_android_example, PID: 26836
                                                                                     java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil
                                                                                         at java.lang.Class.classForName(Native Method)
                                                                                         at java.lang.Class.forName(Class.java:309)
                                                                                         at org.bytedeco.javacpp.Loader.load(Loader.java:585)
                                                                                         at org.bytedeco.javacpp.Loader.load(Loader.java:530)
                                                                                         at org.bytedeco.javacpp.avcodec$AVPacket.<clinit>(avcodec.java:1694)
                                                                                         at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:152)
                                                                                         at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:132)
                                                                                         at org.bytedeco.javacv_android_example.record.RecordActivity.initRecorder(RecordActivity.java:216)
                                                                                         at org.bytedeco.javacv_android_example.record.RecordActivity.startRecording(RecordActivity.java:230)
                                                                                         at org.bytedeco.javacv_android_example.record.RecordActivity.onClick(RecordActivity.java:312)
                                                                                         at android.view.View.performClick(View.java:4789)
                                                                                         at android.view.View$PerformClick.run(View.java:19881)
                                                                                         at android.os.Handler.handleCallback(Handler.java:739)
                                                                                         at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                         at android.os.Looper.loop(Looper.java:135)
                                                                                         at android.app.ActivityThread.main(ActivityThread.java:5294)
                                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                                         at java.lang.reflect.Method.invoke(Method.java:372)
                                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
                                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
04-07 15:29:36.991 2228-4100/system_process W/ActivityManager:   Force finishing activity 1 org.bytedeco.javacv_android_example/.record.RecordActivity```

how to gracefully close video stream chunker operation in middle of execution (referring to streaming-chunker sample example)

@d-a-gerashenko
I am running streaming video in one thread and recording in another. when i close the streaming event. i would like to close the recording event as well. how to do i gracefully close video stream chunker operation in middle of execution (referring to streaming-chunker sample example). I am unable to call "fFmpegChunker.stop();" in time so video file not getting closed properly. Could you please guide me?

P.S.: this logic is working fine for live streaming

FFmpegFrameRecorder doesn't generate video file in android versions 10 or higher

Hello,
I have been trying the example the example JavaCV-android-example but found that it doesn't work for Android version 10 or higher, the video file (.mp4) is not created when the recording is complete.

I'm kind of new to android development but I think the problem is occurring because FFmpegFrameRecorder needs to be passed an instance of FILE that is the .mp4 video file, however, in new versions of Android (10 or higher) the creation of files no longer works that way and the MediaStore API should be used.

private void initRecorder() {
        ffmpeg_link = new File(getBaseContext().getExternalFilesDir(null), "stream.mp4");
        Log.w(LOG_TAG, "init recorder");

        if(RECORD_LENGTH > 0) {
            imagesIndex = 0;
            images = new Frame[RECORD_LENGTH * frameRate];
            timestamps = new long[images.length];
            for(int i = 0; i < images.length; i++) {
                images[i] = new Frame(imageWidth, imageHeight, Frame.DEPTH_UBYTE, 2);
                timestamps[i] = -1;
            }
        } else if(yuvImage == null) {
            yuvImage = new Frame(imageWidth, imageHeight, Frame.DEPTH_UBYTE, 2);
            Log.i(LOG_TAG, "create yuvImage");
        }

        Log.i(LOG_TAG, "ffmpeg_url: " + ffmpeg_link.getAbsolutePath());
        recorder = new FFmpegFrameRecorder(ffmpeg_link, imageWidth, imageHeight, 1);
        recorder.setFormat("mp4");
        recorder.setSampleRate(sampleAudioRateInHz);
        // Set in the surface changed method
        recorder.setFrameRate(frameRate);

        Log.i(LOG_TAG, "recorder initialize success");

        audioRecordRunnable = new AudioRecordRunnable();
        audioThread = new Thread(audioRecordRunnable);
        runAudioThread = true;
        Log.i(LOG_TAG, "recorder initialize success");
    }

So far I haven't been able to figure out how to fix this problem. Does someone know how to solve this problem?

Support GraalVM 22.0

Hi,

I wan't able to compile opencv-stiching-native with latest GraalVM 22.0. Is there a plan to support that?

Following is part of the errors I got. Do you have any idea what these errors are? Can they be fixed by configuring GraalVM?

48 fatal errors detected:
Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS_Unsafe_compareAndSwapLong_d44cf3dbd79fe11bdbf37794e85c4e49eea12682(com.oracle.svm.jni.nativeapi.JNIEnvironment, com.oracle.svm.jni.nativeapi.JNIObjectHandle, com.oracle.svm.jni.nativeapi.JNIMethodId, com.oracle.svm.jni.nativeapi.JNIObjectHandle, long, long, long) 
Parsing context: <no parsing context available> 

	at com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:141)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:315)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureTypeFlowCreated(MethodTypeFlow.java:286)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:107)
	at com.oracle.graal.pointsto.PointsToAnalysis$1.run(PointsToAnalysis.java:461)
	at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:195)
	at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:179)
	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: org.graalvm.compiler.debug.GraalError: unimplemented
	at jdk.internal.vm.compiler/org.graalvm.compiler.debug.GraalError.unimplemented(GraalError.java:39)
	at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext.pop(GraphBuilderContext.java:106)
	at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.StandardGraphBuilderPlugins$UnsafeAccessPlugin.createUnsafeAccess(StandardGraphBuilderPlugins.java:1226)
	at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.StandardGraphBuilderPlugins$UnsafeCompareAndSwapPlugin.apply(StandardGraphBuilderPlugins.java:1362)
	at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.execute(InvocationPlugin.java:176)
	at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.tryInvocationPlugin(PEGraphDecoder.java:1075)
	at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.trySimplifyInvoke(PEGraphDecoder.java:985)
	at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.handleInvoke(PEGraphDecoder.java:946)
	at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.processNextNode(GraphDecoder.java:788)
	at com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.processNextNode(InlineBeforeAnalysis.java:242)
	at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.decode(GraphDecoder.java:529)
	at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.decode(PEGraphDecoder.java:822)
	at com.oracle.graal.pointsto.phases.InlineBeforeAnalysis.decodeGraph(InlineBeforeAnalysis.java:99)
	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:175)
	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:358)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:297)
	... 11 more

Make a mean.binaryproto from java (Question)

Hello, i'm trying to implement in java deepdream notebook from python
https://github.com/google/deepdream/blob/master/dream.ipynb

in python there are code that generating mean.binaryproto from values.

mean = np.float32([104.0, 116.0, 122.0]), # ImageNet mean, training set

I have add a library java variant of Nyphy called Nd4j.

Tryed to generate the mean file with code bellow.

  `     
    String meanFile = caffeConfigRoot + "mean.binaryproto";
    
    double[] meanTrainingSet = {104.0, 116.0, 122.0};

    INDArray indArray = Nd4j.create(meanTrainingSet);

    try (DataOutputStream dos = new DataOutputStream(new FileOutputStream(new File(meanFile)))){

        Nd4j.write(indArray, dos);

    }`

And i'm getting the error.

[blob.cpp:496] Check failed: count_ == proto.data_size() (1 vs. 0)

in this piece of code

`

BlobProto blobProto = new BlobProto();

ReadProtoFromBinaryFileOrDie(meanFile, blobProto);

FloatBlob meanBlob = new FloatBlob();

meanBlob.FromProto(blobProto);

`

Maybe is there some code how to generate this mean file from java or the problem not in mean file and it correct.

Anyway I'm trying to find a solution but there are a few information about this. Any help would be appreciated. Thank you;

Unable to interact with shared objects (.so files)

Hi, I am trying to load a pre-compiled dynamic library ( libabc.so ) which contains extern functions declared in header and cpp files. But I am getting error during compilation.

The header and CPP file are as below :
[ export.h ]
extern "C" {
void multiply(int a, float b);
}

[ export.cpp ]
#include "export.h"
#include < iostream >
using namespace std;
extern "C" {
void multiply (int a, float b) {
cout << "Hello-World\n";
}
}

I compiled them into a shared object : libabc.so and copied it inside the src/main/java/somepackage/* . ( I am using the sample demo given here : https://github.com/bytedeco/sample-projects/blob/master/javacpp-mvn-simple-demo/ )

I am trying to load the library from Java and call the methods as shown below :

package somepackage;

import org.bytedeco.javacpp.;
import org.bytedeco.javacpp.annotation.
;

@platform(library="abc")
public class MultiplyDemo {

static {
    Loader.load();
}

public native void multiply(int a, float b);

public static void main(String[] args) {

MultiplyDemo mul = new MultiplyDemo();
    mul.multiply(123, 100f);
}    

}


I am getting the error :
[INFO] --- javacpp:1.0:build (process-classes) @ javacpp-mvn-simple-demo ---
[INFO] Executing JavaCPP Builder
[INFO] Generating /home/necuser/nitin/bridge/javacpp-mvn-simple-demo/target/classes/somepackage/jniMultiplyDemo.cpp
[WARNING] The class somepackage.MultiplyDemo does not map to any C++ type. Compilation will most likely fail.
[WARNING] The class somepackage.MultiplyDemo does not map to any C++ type. Compilation will most likely fail.
[WARNING] The class somepackage.MultiplyDemo does not map to any C++ type. Compilation will most likely fail.
[WARNING] The class somepackage.MultiplyDemo does not map to any C++ type. Compilation will most likely fail.
[INFO] Compiling /home/necuser/nitin/bridge/javacpp-mvn-simple-demo/target/classes/somepackage/linux-x86_64/libjniMultiplyDemo.so
[INFO] g++ -I/home/necuser/nitin/bridge/javacpp-mvn-simple-demo/src/main/java -I/usr/lib/jvm/java-8-openjdk-amd64/include -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux /home/necuser/nitin/bridge/javacpp-mvn-simple-demo/target/classes/somepackage/jniMultiplyDemo.cpp -Wl,-rpath,$ORIGIN/ -march=x86-64 -m64 -Wall -O3 -fPIC -shared -s -o /home/necuser/nitin/bridge/javacpp-mvn-simple-demo/target/classes/somepackage/linux-x86_64/libjniMultiplyDemo.so
/home/necuser/nitin/bridge/javacpp-mvn-simple-demo/target/classes/somepackage/jniMultiplyDemo.cpp: In function ‘void Java_somepackage_MultiplyDemo_add_1Conv(JNIEnv*, jobject, jint, jfloat)’:
/home/necuser/nitin/bridge/javacpp-mvn-simple-demo/target/classes/somepackage/jniMultiplyDemo.cpp:1054:6: error: ‘ptr’ was not declared in this scope
ptr = ()jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID));
^~~
/home/necuser/nitin/bridge/javacpp-mvn-simple-demo/target/classes/somepackage/jniMultiplyDemo.cpp:1054:13: error: expected primary-expression before ‘)’ token
ptr = ()jlong_to_ptr(env->GetLongField(obj, JavaCPP_addressFID));

I am new to JavaCPP. Please help.

Compress/Scale YUV byte array

Hi,
in onPreviewFrame call back the byte array I am receiving is huge because camera params is set to 1280 x 720. I cannot not change the camera parameters because my app is supposed to record a high def video in the background. Now the issue I am facing is I have to compress or scale byte array from onPreviewframe call back so that I can save it in byte buffer without any memory exceptions.

((ByteBuffer) yuvImage.image[0].position(0)).put(bytes)

If there is any possible to achieve it please advice.

Thanks.

org.bytedeco.javacv.FrameRecorder$Exception: avio_open2 error() error -113: Could not open 'null'

Sir I used the rtmp url like rtmp://10.136.45.22:1935/livestream/myStream.mp4. When recorded the streaming video. I got the issue. How to recover Please solve this issue. I am checking in MarshMallow mobile.

04-25 18:13:37.303 10168-10168/org.bytedeco.javacv_android_example W/linker: /data/app/org.bytedeco.javacv_android_example-2/lib/arm/libjniavutil.so: unused DT entry: type 0xf arg 0x18b9d
04-25 18:13:37.377 10168-10168/org.bytedeco.javacv_android_example W/linker: /data/app/org.bytedeco.javacv_android_example-2/lib/arm/libjniswresample.so: unused DT entry: type 0xf arg 0x2f4c
04-25 18:13:37.464 10168-10168/org.bytedeco.javacv_android_example W/linker: /data/app/org.bytedeco.javacv_android_example-2/lib/arm/libjniavcodec.so: unused DT entry: type 0xf arg 0x1c7f7
04-25 18:13:37.613 10168-10168/org.bytedeco.javacv_android_example W/linker: /data/app/org.bytedeco.javacv_android_example-2/lib/arm/libjniavformat.so: unused DT entry: type 0xf arg 0x183ce
04-25 18:13:37.744 10168-10168/org.bytedeco.javacv_android_example W/linker: /data/app/org.bytedeco.javacv_android_example-2/lib/arm/libjniswscale.so: unused DT entry: type 0xf arg 0x3f5c
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err: org.bytedeco.javacv.FrameRecorder$Exception: avio_open2 error() error -113: Could not open 'null'
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at org.bytedeco.javacv.FFmpegFrameRecorder.startUnsafe(FFmpegFrameRecorder.java:800)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at org.bytedeco.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:351)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at org.bytedeco.javacv_android_example.record.RecordActivity.startRecording(RecordActivity.java:236)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at org.bytedeco.javacv_android_example.record.RecordActivity.onClick(RecordActivity.java:315)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.view.View.performClick(View.java:5204)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.view.View$PerformClick.run(View.java:21158)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.os.Handler.handleCallback(Handler.java:739)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.os.Looper.loop(Looper.java:148)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5461)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
04-25 18:13:42.348 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
04-25 18:14:16.402 10168-10168/org.bytedeco.javacv_android_example W/System.err: org.bytedeco.javacv.FrameRecorder$Exception: avio_open2 error() error -113: Could not open 'null'
04-25 18:14:16.402 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at org.bytedeco.javacv.FFmpegFrameRecorder.startUnsafe(FFmpegFrameRecorder.java:800)
04-25 18:14:16.402 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at org.bytedeco.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:351)
04-25 18:14:16.402 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at org.bytedeco.javacv_android_example.record.RecordActivity.startRecording(RecordActivity.java:236)
04-25 18:14:16.402 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at org.bytedeco.javacv_android_example.record.RecordActivity.onClick(RecordActivity.java:315)
04-25 18:14:16.402 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.view.View.performClick(View.java:5204)
04-25 18:14:16.402 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.view.View$PerformClick.run(View.java:21158)
04-25 18:14:16.402 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.os.Handler.handleCallback(Handler.java:739)
04-25 18:14:16.402 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)
04-25 18:14:16.402 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.os.Looper.loop(Looper.java:148)
04-25 18:14:16.403 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5461)
04-25 18:14:16.403 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
04-25 18:14:16.403 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
04-25 18:14:16.403 10168-10168/org.bytedeco.javacv_android_example W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Issue during building javacpp-mvn-simple-demo

Hello Dear Community!

I like your project very much, and I'd like to use it in my personal projects. I met your library accidentally. You should be known much more than you already are.

I cloned this project to my local computer. When I run command mvn clean install I got the following error:

Failed to execute goal org.bytedeco:javacpp:1.5.3:build (process-classes) on project javacpp-mvn-simple-demo: Failed to execute JavaCPP Builder

I updated version of org.bytedeco:javacpp:1.5.3 as you can see.

I created very simple project using your library. I managed to build it using command mvn clean install. However, I cannot run this simple app. When I use command mvn "-Dexec.args=-classpath %classpath pl.backlog.green.VideoMaker" -Dexec.executable=java exec:exec I get an error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: 'long org.opencv.imgcodecs.Imgcodecs.imread_0(java.lang.String, int)'

Of course it is very similirally when I use IntelliJ execution mechanism.

Any help will be appreciated.

Best regards
Doktor Ziel
(you can understand it like Doctor Gree)

JavaCV-android-example, failed to record, unable to open prcui-config.jar

One I push the "start" recording button, I got these errors on my logcat :
I didn't change anything on the code, error happens on RecordActivity l216 :

recorder = new FFmpegFrameRecorder(ffmpeg_link, imageWidth, imageHeight, 1);

logcat :

Unable to open '/system/framework/prcui-config.jar': No such file or directory
W/art: Failed to open zip archive '/system/framework/prcui-config.jar': I/O Error
W/System.err: org.bytedeco.javacv.FrameRecorder$Exception: avio_open2 error() error -13: Could not open 'null'
W/System.err: at org.bytedeco.javacv.FFmpegFrameRecorder.startUnsafe(FFmpegFrameRecorder.java:784)
W/System.err: at org.bytedeco.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:351)
W/System.err: at org.bytedeco.javacv_android_example.record.RecordActivity.startRecording(RecordActivity.java:236)
W/System.err: at org.bytedeco.javacv_android_example.record.RecordActivity.onClick(RecordActivity.java:316)
W/System.err: at android.view.View.performClick(View.java:5207)
W/System.err: at android.view.View$PerformClick.run(View.java:21168)
W/System.err: at android.os.Handler.handleCallback(Handler.java:746)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
W/System.err: at android.os.Looper.loop(Looper.java:148)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5459)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
W/RecordActivity: Start Button Pushed
I/Choreographer: Skipped 59 frames! The application may be doing too much work on its main thread.

java.lang.UnsatisfiedLinkError: No implementation found for long org.opencv.imgcodecs.Imgcodecs.imread_1(java.lang.String)

i run the demo,find it can not call opencv function.

2021-10-15 17:17:44.092 32281-32281/org.bytedeco.javacv_android_example E/AndroidRuntime: FATAL EXCEPTION: main Process: org.bytedeco.javacv_android_example, PID: 32281 java.lang.UnsatisfiedLinkError: No implementation found for long org.opencv.imgcodecs.Imgcodecs.imread_1(java.lang.String) (tried Java_org_opencv_imgcodecs_Imgcodecs_imread_11 and Java_org_opencv_imgcodecs_Imgcodecs_imread_11__Ljava_lang_String_2) at org.opencv.imgcodecs.Imgcodecs.imread_1(Native Method) at org.opencv.imgcodecs.Imgcodecs.imread(Imgcodecs.java:287) at org.bytedeco.javacv_android_example.record.RecordActivity.onCreate(RecordActivity.java:94) at android.app.Activity.performCreate(Activity.java:7893) at android.app.Activity.performCreate(Activity.java:7880) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3283) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3457) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7562) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

import issue in javacv-android-recognizer

Hello.
I currently downloaded the source code and tried to modify it.
In class CvCameraPreview in javacv-android-recognition

"import static org.bytedeco.javacpp.avutil.AV_PIX_FMT_NV21;"

This line said cannot resolve symbol avutil.
How do I resolve this issue?

cannot locate symbol "av_version_info" referenced by "libjniavutil.so in sample project javacv-android-recognize

Error Log is:

04/25 18:34:19: Launching app
$ adb install-multiple -r -t C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\split-apk\debug\dep\dependencies.apk C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\split-apk\debug\slices\slice_0.apk C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\split-apk\debug\slices\slice_1.apk C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\split-apk\debug\slices\slice_2.apk C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\split-apk\debug\slices\slice_3.apk C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\split-apk\debug\slices\slice_4.apk C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\split-apk\debug\slices\slice_5.apk C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\split-apk\debug\slices\slice_6.apk C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\split-apk\debug\slices\slice_7.apk C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\split-apk\debug\slices\slice_8.apk C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\split-apk\debug\slices\slice_9.apk C:\Users\Shereif\Downloads\Compressed\javacv-android-recognize-bytedeco\app\build\intermediates\instant-run-apk\debug\app-x86-debug.apk
Split APKs installed
$ adb shell am start -n "org.bytedeco.javacv.android.recognize.example/org.bytedeco.javacv.android.recognize.example.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 1921 on device unknown-custom_phone___5_1_0___api_22___768x1280-192.168.160.101:5555
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
D/Atlas: Validating map...
D/libEGL: loaded /system/lib/egl/libEGL_emulation.so
D/libEGL: loaded /system/lib/egl/libGLESv1_CM_emulation.so
D/libEGL: loaded /system/lib/egl/libGLESv2_emulation.so
D/: HostConnection::get() New Host Connection established 0xe3456100, tid 1939
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Enabling debug mode 0
W/EGL_emulation: eglSurfaceAttrib not implemented
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xe3599440, error=EGL_SUCCESS
W/art: Before Android 4.1, method int android.support.v7.widget.DropDownListView.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
I/Choreographer: Skipped 604 frames! The application may be doing too much work on its main thread.
I/Choreographer: Skipped 36 frames! The application may be doing too much work on its main thread.
W/linker: libjniopencv_core.so: unused DT entry: type 0xf arg 0x6a44d
W/linker: libjniopencv_imgproc.so: unused DT entry: type 0xf arg 0x32f6d
W/linker: libjniopencv_imgcodecs.so: unused DT entry: type 0xf arg 0x4813
W/linker: libjniopencv_videoio.so: unused DT entry: type 0xf arg 0x2f5f
W/linker: libjniopencv_highgui.so: unused DT entry: type 0xf arg 0x893a
W/linker: libjniopencv_ml.so: unused DT entry: type 0xf arg 0x9382
W/linker: libjniopencv_objdetect.so: unused DT entry: type 0xf arg 0xd640
W/linker: libjniopencv_face.so: unused DT entry: type 0xf arg 0x3a3d
I/Choreographer: Skipped 109 frames! The application may be doing too much work on its main thread.
I/CvCameraPreview: onMeasure(): set surface dimension to 779x1038
W/EGL_emulation: eglSurfaceAttrib not implemented
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xe3559a40, error=EGL_SUCCESS
I/CvCameraPreview: onMeasure(): set surface dimension to 851x1134
I/TrainHelper: Loaded cascade classifier from /data/data/org.bytedeco.javacv.android.recognize.example/app_xml/temp.xml
D/CvCameraPreview: call checkCurrentState
call processExitState: 0
call processEnterState: 1
call onEnterStartedState
Connecting to camera
I/CvCameraPreview: initializeCamera(): successfully set camera #1
I/CvCameraPreview: determineBestSize(): bestSize is 640x480
D/CvCameraPreview: setupCamera(): settings applied:
preview size: 640x480
picture size: 640x480
D/CvCameraPreview: setCameraCallback()
I/CvCameraPreview: init filter with width = 640 and height = 480 and degree = 270 and isFrontFaceCamera = true
W/linker: libjniavutil.so: unused DT entry: type 0xf arg 0x18890
libjniavutil.so: unused DT entry: type 0x6ffffffe arg 0x21ac0
libjniavutil.so: unused DT entry: type 0x6fffffff arg 0x1
E/art: dlopen("/data/app/org.bytedeco.javacv.android.recognize.example-2/lib/x86/libjniavutil.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "av_version_info" referenced by "libjniavutil.so"...
I/CvCameraPreview: filter initialize success
D/CvCameraPreview: Starting processing thread
I/Choreographer: Skipped 199 frames! The application may be doing too much work on its main thread.
D/: HostConnection::get() New Host Connection established 0xe34cec90, tid 1935
D/: HostConnection::get() New Host Connection established 0xe34ced60, tid 1934
I/CvCameraPreview: onMeasure(): set surface dimension to 851x1134
I/art: Rejecting re-init on previously-failed class java.lang.Class<org.bytedeco.javacpp.avutil>

   --------- beginning of crash

E/AndroidRuntime: FATAL EXCEPTION: Thread-168
Process: org.bytedeco.javacv.android.recognize.example, PID: 1921
java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil
at org.bytedeco.javacpp.avutil.av_frame_alloc(Native Method)
at org.bytedeco.javacv.FFmpegFrameFilter.startUnsafe(FFmpegFrameFilter.java:159)
at org.bytedeco.javacv.FFmpegFrameFilter.start(FFmpegFrameFilter.java:155)
at org.bytedeco.javacv.android.recognize.example.CvCameraPreview$CameraWorker.run(CvCameraPreview.java:784)
at java.lang.Thread.run(Thread.java:818)
D/CvCameraPreview: surfaceDestroyed
call checkCurrentState
call processExitState: 1
Disconnecting from camera
Notify thread
Wating for thread
I/Process: Sending signal. PID: 1921 SIG: 9
Application terminated.

Gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "org.bytedeco.javacv.android.recognize.example"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    splits {
        abi {
            enable true
            reset()
            include 'x86', 'armeabi'
            universalApk false
        }
    }
}


dependencies {

    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    testImplementation 'junit:junit:4.12'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation group: 'org.bytedeco', name: 'javacv', version: '1.3.3'
    implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.2.0-1.3.3', classifier: 'android-arm'
    implementation group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.2.0-1.3.3', classifier: 'android-x86'
    implementation group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '3.2.1-1.3.3', classifier: 'android-arm'
    implementation group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '3.2.1-1.3.3', classifier: 'android-x86'
}

how to add quarkus to this project?

hi,
I can compile this project on ubuntu, and the native run ok.

but When i add dependency to quarkus project, and it can't be compiled.

will you show me an example?

result isn't correct..

Hi! this project is really helpful, thanks for the efforts. But somehow the result isn't accurate, it is also authenticating otherwise persons. Would you pl like to guide me how to make it more reliable and secure.
Bundle of thanks in advance.

java.lang.UnsatisfiedLinkError: no jnicaffe in java.library.path

Hi, I download a sample project and have this exception, how to solve this problem or what is a possible reason that cause this problem? I did not found any working solution. My OS is Windows 10. Thanks.

`Exception in thread "main" java.lang.UnsatisfiedLinkError: no jnicaffe in java.library.path
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2541)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:873)
at java.base/java.lang.System.loadLibrary(System.java:1857)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:976)
at org.bytedeco.javacpp.Loader.load(Loader.java:777)
at org.bytedeco.javacpp.Loader.load(Loader.java:684)
at org.bytedeco.javacpp.caffe.(caffe.java:17)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at org.bytedeco.javacpp.Loader.load(Loader.java:739)
at org.bytedeco.javacpp.Loader.load(Loader.java:684)
at org.bytedeco.javacpp.caffe$Caffe.(caffe.java:3926)
at org.bytedeco.javacpp.caffe_example.Main.main(Main.java:44)
Caused by: java.lang.UnsatisfiedLinkError: no openblas in java.library.path
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2541)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:873)
at java.base/java.lang.System.loadLibrary(System.java:1857)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:976)
at org.bytedeco.javacpp.Loader.load(Loader.java:765)
... 8 more

Process finished with exit code 1`

Recognition not working in light

Hi.
This demo is working fine. and it's really helpful for me.
But I m facing one problem while trying to recognize the face but if there is light in the background so it ll not recognize a face.

From where recorder is getting the images or Frames to be recorded i found no link with preview to the recorder.

Its working nice if added with permission nice means 100% correct. but i cant find out that from where recorder is getting the Frames from preview and where is connection between them. thanx in anticipation.

initRecorder()

    images[i] = new Frame(imageWidth, imageHeight, Frame.DEPTH_UBYTE, 2); ? or somewhere else

recorder = new FFmpegFrameRecorder(ffmpeg_link, imageWidth, imageHeight, 1);

    recorder.setFormat("mp4");
    recorder.setSampleRate(sampleAudioRateInHz);
    // Set in the surface changed method
    recorder.setFrameRate(frameRate);
    audioRecordRunnable = new AudioRecordRunnable();
    audioThread = new Thread(audioRecordRunnable);
    runAudioThread = true;

OutOfMemoryError

java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes = 384M > maxPhysicalBytes = 384M

The video is not playing in vidoe stabilization

Hi,
Iam getting this errror .Please let me know that how can i overcome this

W/System.err: org.bytedeco.javacv.FrameGrabber$Exception: avformat_open_input() error -2: Could not open input "/storage/emulated/0/media/v4.avi". (Has setFormat() been called?)

The application could not be installed: INSTALL_FAILED_INVALID_APK

i test the android demo find a funny problem.

defaultConfig {
applicationId "com.lc.testjavacv"
minSdk 23
targetSdk 30
versionCode 1
versionName "1.0"
}

when the minSdk is 23,it always report INSTALL_FAILED_INVALID_APK error;
I change the minSdk to 21 ,it ok.
who could explain it?

java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path

Getting following error when running mvn command given in Readme file :

Caused by: java.lang.UnsatisfiedLinkError: /tmp/javacpp165453197293165/libjniopencv_core.so: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /tmp/javacpp165453197293165/libopencv_core.so.2.4)

P.S. :: This issue is with Ubuntu 14.04.

Solution:
Need to install GCC5. Follow below link for the same:
https://askubuntu.com/questions/618474/how-to-install-the-latest-gcurrently-5-1-in-ubuntucurrently-14-04

I found this solution in below link:
bytedeco/javacv#436

How to generate java class with function adapters by maven?

Hello. I looked into javacpp-mvn-simple-demo, and it already contains native function in java for cpp function. But javacpp also provides ability to generate class with such function for class which implemets InfoMapper.
I have to run such commands manually now:

mvn clean compile && cd target/classes \
&& java -jar ../../javacpp.jar test.GreeterConfig \
&& cp test/Greeter.java ../../src/main/java/test;

And only after it I can package project with javacpp plugin. Is there a way to not run such commands manually and do it by maven?

java.lang.UnsatisfiedLinkError

Hello I am trying to run https://github.com/bytedeco/sample-projects/tree/master/caffe-sample-classifier on my pc(windows 10 x64) and i take this errors:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jnicaffe in java.library.path
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:804)
        at org.bytedeco.javacpp.Loader.load(Loader.java:613)
        at org.bytedeco.javacpp.Loader.load(Loader.java:530)
        at org.bytedeco.javacpp.caffe.<clinit>(caffe.java:17)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bytedeco.javacpp.Loader.load(Loader.java:585)
        at org.bytedeco.javacpp.Loader.load(Loader.java:530)
        at org.bytedeco.javacpp.caffe$Caffe.<clinit>(caffe.java:3926)
        at org.bytedeco.javacpp.caffe_example.Main.main(Main.java:23)
Caused by: java.lang.UnsatisfiedLinkError: no openblas in java.library.path
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:804)
        at org.bytedeco.javacpp.Loader.load(Loader.java:604)
        ... 8 more

My run string: java -jar caffe-sample-classifier-all.jar deploy.prototxt bvlc_reference_caffenet.caffemodel imagenet_mean.binaryproto synset_words.txt cat.jpg

I am look at the caffe-sample-classifier-all.jar and it does not contain jnicaffe.so and openblas.so only libopencv.so libs

And one more problem maybe not on the topic. When I start gradle.bat for the second time in another directory, it can not create a caffe-sample-classifier-all.jar but creates caffe-sample-classifier.jar without libraries. gradlew build cant help too.

Could you help with these errors?

Error

When I try to use opencv_face.FaceRecognizer faceRecognizer = createLBPHFaceRecognizer(); it give me error. Please tell me how i can use different method of face recognizer in this.

JavaCV-android-example doesn't record anything on some devices

I have downloaded the last version of JavaCV-android-example, built it in Android Studio 1.5.1 and started on Samsung Galaxy S6 Edge with Android 5.1.1. I clicked "Start" button, then after ~30 seconds "Stop" button. After all output file size was 44 bytes. I suppose that it is some kind of metadata. I added more logs to RecordActivity: on recorder.record() and recorder.recordSample() calls. These methods were called many times as expected. But why no data were written to output file "stream.mp4"?

including flandmark

Hello, Thank you for the sample projects.

I am trying to include facial landmark detection (https://github.com/bytedeco/javacv-examples/tree/master/flandmark-demo) in the javacv-android-recognize example. Initially I thought it cannot file the landmark model file: flandmark.dat. So I copied it to the android device. However I still have an error with flandmark_init, below please see my function that loads the landmark model:

public static FLANDMARK_Model loadFLandmarkModel(Context context) throws IOException {

    String landmarkFile = Environment.getExternalStorageDirectory().getAbsolutePath() + "/flandmark_model.dat";
    Log.i(TAG, "Loaded cascade classifier from " + landmarkFile);

    FLANDMARK_Model model = flandmark_init(landmarkFile);

    if (model == null) {
        Log.i(TAG, "Failed to load landmark model");
        model = null;
    } else {
        Log.i(TAG, "Loaded cascade classifier from " + landmarkFile);
    }
    // delete the temporary directory

    return model;
}

I am wondering what could be the reason. Any help would be appreciated. Thank you very much in advance.

FFmpegFrameRecorder not working with Wowza.GoCoder

I am working with code from https://github.com/bytedeco/sample-projects/blob/master/JavaCV-android-example/app/src/main/java/org/bytedeco/javacv_android_example/record/RecordActivity.java. Demo working fine

I want to use wowza.gocoder with FFmpeg so by only add wowza dependancy in app.gradle then demo application crash at run time as screenshot
eXhrW

here is my app.gradle file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.1"
    defaultConfig {
        applicationId "com.cygnus.ffmpegframerecorderexample"
        minSdkVersion 21
        targetSdkVersion 29
        multiDexEnabled true
        versionCode 1
        versionName "1.0"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        release {
            lintOptions {
                disable 'MissingTranslation'
                checkReleaseBuilds false
                abortOnError false
            }
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'AndroidManifest.xml'
        exclude 'LICENSE.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
    sourceSets {
        androidTest {
            assets.srcDirs = ['src/androidTest/assets']
        }
    }
    applicationVariants.all { variant ->
        variant.outputs.all {
            outputFileName = "${variant.name}-${variant.versionName}.apk"
        }
    }
    productFlavors {
    }
}

repositories {
    jcenter()
    flatDir {
        dirs 'libs'
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.fragment:fragment:1.0.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'


    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'

    implementation 'com.jakewharton:butterknife:10.1.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'

    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.firebase:firebase-auth:18.1.0'
    implementation 'com.googlecode.libphonenumber:libphonenumber:8.9.8'
    implementation 'org.greenrobot:eventbus:3.1.1'
    implementation 'com.squareup.okhttp3:okhttp:3.12.1'
    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
    implementation 'com.squareup.picasso:picasso:2.71828'

    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    implementation 'org.apache.commons:commons-lang3:3.3.2'
    implementation 'se.emilsjolander:stickylistheaders:2.5.1'
    implementation 'joda-time:joda-time:2.5'
    implementation 'com.stripe:stripe-android:1.0.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.42.0'
    implementation 'com.google.code.findbugs:jsr305:3.0.2'
    implementation 'com.pusher:pusher-java-client:1.6.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    androidTestImplementation 'com.android.support.test:testing-support-lib:0.1'
    androidTestImplementation 'info.cukes:cucumber-android:1.2.0@jar'
    androidTestImplementation 'info.cukes:cucumber-picocontainer:1.2.0'


    implementation(group: 'org.bytedeco', name: 'javacv-platform', version: '1.3') {
        exclude group: 'org.bytedeco.javacpp-presets'
    }

    implementation group: 'org.bytedeco', name: 'javacv', version: '1.3.1'
    implementation group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg-platform', version: '3.2.1-1.3'


    //implementation 'com.wowza.gocoder.sdk.android:com.wowza.gocoder.sdk:2.0.0@aar'//sdf

    //implementation 'com.vxg.mediasdk:playersdk:2.0.140'//sdf
    implementation 'com.iceteck.silicompressorr:silicompressor:2.2.2'
}

above app Gradle working file except comment com.wowza.gocoder.
if I uncomment file and as use recording I got error run time as define above even if I done write any code related to wowza.gocoder.

Fatal Exception: java.lang.IllegalStateException: copyPixelsFromBuffer called on recycled bitmap

#0. Crashed: Thread-12
at android.graphics.Bitmap.checkRecycled(Bitmap.java:383)
at android.graphics.Bitmap.copyPixelsFromBuffer(Bitmap.java:598)
at org.bytedeco.javacv.AndroidFrameConverter.convert(AndroidFrameConverter.java:203)
at org.bytedeco.javacv.android.recognize.example.CvCameraPreview.deliverAndDrawFrame(CvCameraPreview.java:816)
at org.bytedeco.javacv.android.recognize.example.CvCameraPreview$CameraWorker.run(CvCameraPreview.java:785)
at java.lang.Thread.run(Thread.java:764)

--

Fatal Exception: java.lang.IllegalStateException: copyPixelsFromBuffer called on recycled bitmap
at android.graphics.Bitmap.checkRecycled(Bitmap.java:383)
at android.graphics.Bitmap.copyPixelsFromBuffer(Bitmap.java:598)
at org.bytedeco.javacv.AndroidFrameConverter.convert(AndroidFrameConverter.java:203)
at org.bytedeco.javacv.android.recognize.example.CvCameraPreview.deliverAndDrawFrame(CvCameraPreview.java:816)
at org.bytedeco.javacv.android.recognize.example.CvCameraPreview$CameraWorker.run(CvCameraPreview.java:785)
at java.lang.Thread.run(Thread.java:764)

#0. Crashed: Thread-12
at android.graphics.Bitmap.checkRecycled(Bitmap.java:383)
at android.graphics.Bitmap.copyPixelsFromBuffer(Bitmap.java:598)
at org.bytedeco.javacv.AndroidFrameConverter.convert(AndroidFrameConverter.java:203)
at org.bytedeco.javacv.android.recognize.example.CvCameraPreview.deliverAndDrawFrame(CvCameraPreview.java:816)
at org.bytedeco.javacv.android.recognize.example.CvCameraPreview$CameraWorker.run(CvCameraPreview.java:785)
at java.lang.Thread.run(Thread.java:764)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.