mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
parent
ec943f5ba4
commit
5311f99419
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