ffmpeg-kit icon indicating copy to clipboard operation
ffmpeg-kit copied to clipboard

Clarification: Is it necessary to load the system library for FFMpeg kit?

Open jesphinpt opened this issue 1 year ago • 6 comments

I am migrating the my Native Android app from FFmpeg to FFMpeg-Kit. . I have used the ffmpeg-full:4.4 already and it got failed with the Fatal Exception: java.lang.UnsatisfiedLinkError dlopen failed: library "libavutil.so" not found](https://stackoverflow.com/questions/77938877/fatal-exception-java-lang-unsatisfiedlinkerror-dlopen-failed-library-libavuti) in Vivo as major crashes.

So I went ahead and migrated the FFMPeg to FFMPeg-Kit, still I have added the below init in my Activity.

Clarifications:

  1. Shall I need to add this below in the code as well if I use the FFmpeg-kit
  2. If I did not need to use means, does it make any issues in the app?.(i.e) if I removed
  3. Shall I need to add any additional loadlibrary in the init?
  4. Is there any simple fix for the above error for Oppo alone without migrating?
  5. Shall I need to add these architectures in ndk of my app?

arm-v7a, arm-v7a-neon, arm64-v8a, x86 and x86_64 architectures

init {
    try{
        System.loadLibrary("avutil")
        System.loadLibrary("avcodec")
        System.loadLibrary("avformat")
        System.loadLibrary("swscale")
        System.loadLibrary("avfilter")
    }
    catch (e:Exception){
        Log.i("error","${e.message}")
    }
}

From

implementation 'com.arthenica:mobile-ffmpeg-full:4.4'

To

implementation 'com.arthenica:ffmpeg-kit-full:6.0-2'

jesphinpt avatar Feb 09 '24 12:02 jesphinpt