I want to use FFMpegCore to convert some audio files to raw pcm. I noticed that this always cuts off ~1.5 seconds of my audio from the start. I check my input stream, saved it to HD all good. If use it from cli with the same arguments everything seem fine. I treid -ss 0, no luck.
public async Task<MemoryStream> ConvertToPcmStreamAsync(Stream inputStream)
{
var outputStream = new MemoryStream();
var audioInput = new StreamPipeSource(inputStream);
var audioOutput = new StreamPipeSink(outputStream);
await FFMpegArguments
.FromPipeInput(audioInput)
.OutputToPipe(audioOutput, options => options
.WithCustomArgument("-ss 0 -f s16le -acodec pcm_s16le -ac 1"))
.ProcessAsynchronously();
// Reset the position of the memory stream to the beginning
outputStream.Position = 0;
return outputStream;
}