wseemann / FFmpegMediaMetadataRetriever

FFmpegMediaMetadataRetriever provides a unified interface for retrieving frame and meta data from an input media file.
1.72k stars 387 forks source link

UnsatisfiedLinkError #258

Closed 8kdesign closed 2 years ago

8kdesign commented 2 years ago

Hi! I am using the latest version of FFmpegMediaMetadataRetriever and it crashes for some users with the following error:

java.lang.UnsatisfiedLinkError: at java.lang.Runtime.loadLibrary0 (Runtime.java:1071) at java.lang.Runtime.loadLibrary0 (Runtime.java:1007) at java.lang.System.loadLibrary (System.java:1667) at wseemann.media.FFmpegMediaMetadataRetriever. (FFmpegMediaMetadataRetriever.java:24) at com.logicui.screenshotframer.video_mode.VideoFragment.resultLauncher$lambda-13$lambda-12 (VideoFragment.java) at com.logicui.screenshotframer.video_mode.VideoFragment$$InternalSyntheticLambda$2$4972e85bf4a8fdbec2c46d9fca8a7fe2c6a6ed28ee37b066215dc4b68a8b665e$1.run (VideoFragment.java) at java.lang.Thread.run (Thread.java:919)

wseemann commented 2 years ago

Hello, can you post your gradle file? Is it possible you didn't include the correct native libraries for the device you are trying to run the library on? Check the device architecture and make sure it's supported please.

dependencies {
    implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-core:1.0.16'
    implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-armeabi-v7a:1.0.16'
    implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-x86:1.0.16'
    implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-x86_64:1.0.16'
    implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-arm64-v8a:1.0.16'
}
8kdesign commented 2 years ago

Hi! Thanks for the reply. I have resolved the issue. Had to put "-keep class wseemann.media.* {;}" in proguard-rules.pro for the signed bundle to build properly.