Convert to mp3 instead of opus

This commit is contained in:
Malte Rosenbjerg 2020-12-07 17:52:47 +01:00
parent a38b985b65
commit f9090ba9fe

View file

@ -42,13 +42,7 @@ public async Task Audio_FromRaw()
var memoryStream = new MemoryStream();
await FFMpegArguments
.FromPipeInput(new StreamPipeSource(file), options => options.ForceFormat("s16le"))
.OutputToPipe(new StreamPipeSink(memoryStream), options =>
{
options.WithAudioSamplingRate(48000);
options.WithAudioCodec("libopus");
options.WithCustomArgument("-ac 2");
options.ForceFormat("opus");
})
.OutputToPipe(new StreamPipeSink(memoryStream), options => options.ForceFormat("mp3"))
.ProcessAsynchronously();
}