react-native-ffmpeg Unrecognized option 'preset'

Viewed 422

Below is my ffmpeg command:

-y -i vidInput.mp4 -vcodec mpeg4 -b:v 1000k -b:a 48000 -preset ultrafast vidOutput.mp4

And the result is:

[Mon Jul 06 2020 20:42:08.171]  LOG      Unrecognized option 'preset'.
[Mon Jul 06 2020 20:42:08.172]  LOG      Error splitting the argument list:
[Mon Jul 06 2020 20:42:08.174]  LOG      Option not found

Need advice...

1 Answers

you should install all dependencies of ffmpeg, for this you can do like below in android/build.gradle:

buildscript {
ext {
    buildToolsVersion = "29.0.2"
    minSdkVersion = 24
    compileSdkVersion = 29
    targetSdkVersion = 29
  ++  reactNativeFFmpegPackage = "full-gpl"  //add this line
}
...


}

and you also should do this in android/app/build.gradle under android object:

android{
    packagingOptions {
    pickFirst 'lib/x86/libc++_shared.so'
    pickFirst 'lib/x86_64/libc++_shared.so'
    pickFirst 'lib/armeabi-v7a/libc++_shared.so'
    pickFirst 'lib/arm64-v8a/libc++_shared.so'       
    }
  }
Related