just extract audio from video
@override
void initState() {
// TODO: implement initState
super.initState();
getAudio();
}
getAudio() async {
await FFmpegKit.execute(
"ffmpeg -i D:/Dart and Flutter/Projects/Jmm/firebase_task/assets/videos/flutter.mp4 -q:a 0 -map a D:/Dart and Flutter/Projects/Jmm/firebase_task/assets/videos/flutter_audio.mp3")
.then((value) async {
var returnCode = await value.getReturnCode();
if (ReturnCode.isSuccess(returnCode)) {
print('succsses');
} else {
print('fail');
}
});
}
I have no idea the how to extract an audio from video in flutter
2
Answers
I solve my problem with the above code snippet
As per the documentation of the mentioned plugin, you can extract audio by the following way.
or even you can do it with more simple command (in execute) like:
or whatever FFmpeg command you want to execute.