Description
I'm using React Native and Expo and trying to convert video from mp4 to vp9 encoded format using ffmpeg-kit-react-native package.
I followed installation steps from documentation https://github.com/tanersener/ffmpeg-kit/tree/main/react-native .
- yarn add ffmpeg-kit-react-native
- In android/build.gradle
ext {
ffmpegKitPackage = "video"
}
- In node_modules/ffmpeg-kit-react-native/android/build.gradle
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'
}
rootProject.ext.ffmpegKitPackage = "video"
Expected behavior
Convert mp4 to vp9 encoded format
Current behavior
Throwing error when calling FFmpegKit.execute(-i ${sourceVideoURI} -c:v libvpx-vp9 ${resultVideoURI}
)
- sourceVideoURI is video URI from expo-image-picker
- resultVideoURI is
${FileSystem.documentDirectory}video/
Environment
- Expo: 45.0.0
- ffmpeg-kit-react-native: 4.5.2
- Platform: Android