I need to merge (concatenate) two audio files in a Flutter app.
I am trying to use Flutter_ffmpeg package .
https://pub.dev/packages/flutter_ffmpeg
Ffmpeg is powerful tool for audio and video.
flutter_cache_manager package to store the files that came from https
https://pub.dev/packages/flutter_cache_manager
And path provided to deal with the paths
https://pub.dev/packages/path_provider
For the part of caching I already made some successful tests,
But, I need your help to understand how can I use ffmpeg package.
According to the readme I need to do something like
import 'package:flutter_ffmpeg/flutter_ffmpeg.dart';
final FlutterFFmpeg _flutterFFmpeg = new FlutterFFmpeg();
var fileCached1 = await DefaultCacheManager().getSingleFile(url1);
var fileCached2 = await DefaultCacheManager().getSingleFile(url2);
var arguments = ["-i", "concat:fileCached1.wav|fileCached2.wav", "-c copy", "output.way"];
_flutterFFmpeg.executeWithArguments(arguments ).then((rc) => print("FFmpeg process exited with rc $rc"));
How can I have access to the output.wav to play? How can I use the path_provider?
I really need you help. :) There is little information about flutter_ffmpeg. This question might be useful for someone else to.
Thanks in advance, Ricardo