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

React-native readme update for android

Open ISnowFoxI opened this issue 11 months ago • 2 comments

Is your feature request related to a problem? Please describe. I was using ffmpeg-kit-react-native to edit video metadata on Android. I also needed a way to trim videos, so I used https://github.com/maitrungduc1410/react-native-video-trim#readme. I would get multiple Duplicate class errors when building for Android because of mismatched FFmpeg packages in the project. Using

ext {
    ffmpegKitPackage = "<package name>"
}

didn't help me.

Describe the solution you'd like I suggest a new Troubleshooting section in react-native readme where we could put additional steps for conflicting install cases. My solution was editing the android/app/build.gradle file like so:

dependencies {
    ...
     modules {
        module('com.arthenica:ffmpeg-kit-https') {
            replacedBy 'com.arthenica:ffmpeg-kit-min'
        }
    }
}

I found the above solution in this blog post: https://tomgregory.com/gradle/how-to-exclude-gradle-dependencies/#option-3-module-replacement-exclude-alternative

Describe alternatives you've considered Did not consider any alternatives.

Platform Specific for Android.

ISnowFoxI avatar Mar 06 '24 11:03 ISnowFoxI