shahen94 / react-native-video-processing

Native Video editing/trimming/compressing :movie_camera: library for React-Native
https://shahen94.github.io/react-native-video-processing/
MIT License
1.24k stars 321 forks source link

Could not invoke RNTrimmerManager.getVideoInfo #376

Open theartificialguy opened 1 year ago

theartificialguy commented 1 year ago

Current Behavior

The app crashes when getVideoInfo(...) method is called, below is a code snippet which replicates the crash:-

import { ProcessingManager } from 'react-native-video-processing';
...
console.log('VideoPath', VideoPath);
const videoInfo = await ProcessingManager.getVideoInfo(VideoPath); // crashes here
const { size } = videoInfo;
setMediaSize(size);

output:-

VideoPath file:///data/user/0/com.myapp/cache/Camera/0006ee95-7c14-405c-9c4a62gs64abe861a.mp4

Could not invoke
RNTrimmerManager.getVideoInfo

null

dlopen failed: cannot locate symbol "avcodec_get_name" referenced by "/data/app/~~ocyNzyffPC35EoZaSrnAg==/com.myapp-B2SJN625VTvs71w==/lib/arm64/libffmpeg_mediametadataretriever_jni.so"...

Expected Behavior

I followed all the steps mentioned in docs and the app did build successfully but can't get past this operation.

Your Environment

software version
react-native-video-processing 1.7.2
react-native 0.64.3
node v16.15.1
salihgun commented 1 year ago

Hi, try this https://github.com/salihgun/react-native-video-processor