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();
|
var memoryStream = new MemoryStream();
|
||||||
await FFMpegArguments
|
await FFMpegArguments
|
||||||
.FromPipeInput(new StreamPipeSource(file), options => options.ForceFormat("s16le"))
|
.FromPipeInput(new StreamPipeSource(file), options => options.ForceFormat("s16le"))
|
||||||
.OutputToPipe(new StreamPipeSink(memoryStream), options =>
|
.OutputToPipe(new StreamPipeSink(memoryStream), options => options.ForceFormat("mp3"))
|
||||||
{
|
|
||||||
options.WithAudioSamplingRate(48000);
|
|
||||||
options.WithAudioCodec("libopus");
|
|
||||||
options.WithCustomArgument("-ac 2");
|
|
||||||
options.ForceFormat("opus");
|
|
||||||
})
|
|
||||||
.ProcessAsynchronously();
|
.ProcessAsynchronously();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue