mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Convert to mp3 instead of opus
This commit is contained in:
parent
a38b985b65
commit
f9090ba9fe
1 changed files with 1 additions and 7 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue