I’m trying to convert a video to mp3 using ffmpeg library but ffmpeg command is not working, it is returning the code 1
try {
final session = await FFmpegKit.execute('-i $videoFilePath -vn -ar 44100 -ac 2 -b:a 192k -f mp3 $audioFilePath');
final returnCode = await session.getReturnCode();
if (ReturnCode.isSuccess(returnCode)) {
print('Video conversion to MP3 successful!');
} else {
print('Video conversion to MP3 failed with return code: $returnCode');
}
} catch (e) {
print('Error occurred during video conversion: $e');
}