lincollincol / Amplituda

Audio processing library, which provides waveform data
Apache License 2.0
221 stars 31 forks source link

Using Amplituda with mobile-ffmpeg-audio in one app #25

Closed lietto closed 3 years ago

lietto commented 3 years ago

Hello! I tried to use your lib. And I already have com.arthenica:mobile-ffmpeg-audio:4.4

When I use methods from mobile-ffmpeg-audio I receive this error. Is there any solution to fix this?

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "avpriv_init_elbg" referenced by "/data/app/~~mK1tfWTxMEGBmWk7nu8qVQ==/com.example-WGGQ2aG-lMJ1UI7bi6lsqA==/base.apk!/lib/arm64-v8a/libavfilter.so"...
        at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
        at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
        at java.lang.System.loadLibrary(System.java:1664)
        at com.arthenica.mobileffmpeg.Config.<clinit>(Config.java:133)
        at com.arthenica.mobileffmpeg.Config.ffmpegExecute(Config.java:623)
        at com.arthenica.mobileffmpeg.FFmpeg.execute(FFmpeg.java:68)

Thanks in advance

lincollincol commented 3 years ago

@lietto Hi, please add packagingOptions to your gradle(:app) and let me know if that solves the problem

android {
    defaultConfig {
         // . . . 
    }
    packagingOptions {
        pickFirst 'lib/*/libavcodec.so'
        pickFirst 'lib/*/libavformat.so'
        pickFirst 'lib/*/libavutil.so'
        pickFirst 'lib/*/libswresample.so'
    }
    // . . . 
}
lietto commented 3 years ago

Sorry but this is not solved my problem.

lincollincol commented 3 years ago

@lietto Hi! Can you provide more information about the error (logcat)?