How can I convert m3u8 file to mp4 file in React Native Expo? I have tried to convert m3u8 file to mp4 using FFmpegKit but I have this errors:
'Cannot read property 'getLogLevel' of null' and 'Cannot read property 'ffmpegSession' of null'
Also building with this package failing (Could not determine the dependencies of task ':ffmpeg-kit-react-native:compileDebugAidl'.).
Is there a simple and easy way to convert m3u8 file in React Native Expo?
Code I have used:
import { FFmpegKit } from 'ffmpeg-kit-react-native';
export async function converterToMp4() {
try {
await FFmpegKit.executeAsync(`-i ${m3u8FileUri} ${mp4FileUri}`)
} catch(err) {
console.log(err)
}
}
I got it using this code...
Some dependencies:
And add this in your app.json plugins:
"@config-plugins/ffmpeg-kit-react-native"
If you get error probably you will need to install
expo-build-properties
and add to app.json pluginsGot it this using SDK 49 and remember to rebuild
Hope it helps