Flutter Sound Helpers API
convertFile()
convertFile()
convertFile()Dart API: convertFile()
This verb is useful to convert a sound file to a new format.
infileis the file path of the file you want to convertcodecinis the actual file formatoutfileis the path of the file you want to createcodecoutis the new file format
Be careful : outfile and codecout must be compatible. The output file extension must be a correct file extension for the new format.
Note : this verb uses FFmpeg and is not available int the LITE flavor of Flutter Sound.
Example:
String inputFile = '$myInputPath/bar.wav';
var tempDir = await getTemporaryDirectory();
String outpufFile = '${tempDir.path}/$foo.mp3';
await flutterSoundHelper.convertFile(inputFile, codec.pcm16WAV, outputFile, Codec.mp3)
Lorem ipsum ...</div>
Last updated
Was this helpful?