arthenica / ffmpeg-kit

FFmpeg Kit for applications. Supports Android, Flutter, iOS, Linux, macOS, React Native and tvOS. Supersedes MobileFFmpeg, flutter_ffmpeg and react-native-ffmpeg.
https://arthenica.github.io/ffmpeg-kit
GNU Lesser General Public License v3.0
4.35k stars 581 forks source link

FFmpegKit initialization throws error: FFmpegKit failed to start on brand: #996

Open HemangiVekaria opened 3 months ago

HemangiVekaria commented 3 months ago

Description I am using this library for FFMpeg related commands. In some devices it crash immediately when app open.

Current behavior This is crash i am getting in multiple devices.

image

Fatal Exception: java.lang.Error: FFmpegKit failed to start on brand: realme, model: RMX3231, device: RMX3231, api level: 30, abis: armeabi-v7a armeabi, 32bit abis: armeabi-v7a armeabi, 64bit abis: . at com.arthenica.ffmpegkit.NativeLoader.loadLibrary(NativeLoader.java:50) at com.arthenica.ffmpegkit.NativeLoader.loadFFmpegKitAbiDetect(NativeLoader.java:130) at com.arthenica.ffmpegkit.AbiDetect.(AbiDetect.java:30) at com.arthenica.ffmpegkit.AbiDetect.getNativeAbi(AbiDetect.java) at com.arthenica.ffmpegkit.NativeLoader.loadNativeAbi(NativeLoader.java:65) at com.arthenica.ffmpegkit.NativeLoader.loadFFmpegKit(NativeLoader.java:173) at com.arthenica.ffmpegkit.FFmpegKitConfig.(FFmpegKitConfig.java:145) at com.arthenica.ffmpegkit.FFmpegKitConfig.setLogLevel() at com.MyApplication.onCreate(MyApplication.kt:54) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6916) at android.app.ActivityThread.access$1300(ActivityThread.java:260) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7948) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:603) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

image

Environment

Do any one have any idea about this error?

santvan582 commented 3 months ago

On which version issue come most???

HemangiVekaria commented 3 months ago

On which version issue come most???

It's mostly on 10 & 14. Also 12 and 13 but ratio of that devices are less compare to 10 & 14. In My app's previous versions this crash was not there. In my Current version of app i added FFmpegKitConfig.setLogLevel(Level.AV_LOG_QUIET) this line in MyApplication.kt class and for that version of my app i can see this crash logs in firebase. Am i using correct mehod for disabling FFMpeg logs?

HemangiVekaria commented 3 months ago

I added this in my build.gradle.kt file

splits { abi { isEnable = true reset() include("x86", "x86_64", "armeabi-v7a", "arm64-v8a") isUniversalApk = true } }

tanersener commented 2 months ago

Reproducing the issue locally is necessary to comment on this kind of issues. If you can do that I'm sure a solution can be found.

HafizHamza19 commented 2 months ago

I am facing same issue. Can you anyone help ?

HemangiVekaria commented 3 weeks ago

In our app, we used FFmpegKitConfig.setLogLevel(Level.AV_LOG_QUIET) to disable FFmpeg logs in the live version. However, this caused crashes on some devices. Now we have removed this, and there are no more crashes.

Is there any other method for disabling logs of ffmpeg?