ffmpeg-kit
ffmpeg-kit copied to clipboard
ERROR TypeError: Cannot read properties of undefined (reading 'getLogLevel')
I am trying to compress video in react native.
but i am getting an error:
Code:
FFmpegKit.execute(`-i ${this.state.videoUri} -c:v mpeg4 resultmimage.\mp4`).then(
async (session) => {
const returnCode = await session.getReturnCode();
if (ReturnCode.isSuccess(returnCode)) {
console.log('FFMPEG SUCCESS');
// SUCCESS
} else if (ReturnCode.isCancel(returnCode)) {
console.log('FFMPEG CANCEL');
// CANCEL
} else {
console.log('FFMPEG ERROR');
// ERROR
}
},
).catch((error)=> {
console.log('ERROR', error)
})
ffmpegKitPackage = "full-gpl-lts"
react native: "0.63.2"
android version: 10
after retry/refreshing the app, it gives new error on running the above code:
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
@saurabhkanswal How did you solve this issue?
@Liqiankun the issue didn't solved, I ended up using silli compressor for video compression in react native using native modules.
@saurabhkanswal OK Thanks.
@tanersener any idea, what's wrong here ?
getLogLevel
method is invoked internally when the first ffmpeg-kit
API call is made by the application. If it fails, I suspect ffmpeg-kit
is not installed properly. But hard to say why without reproducing the issue locally.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.