System.IO.IOException: "Pipe is broken." when using duration
When I try to add a duration a System.IO.IOException is thrown.
await FFMpegArguments
.FromPipeInput(new StreamPipeSource(stream))
.OutputToPipe(new StreamPipeSink(outputStream), options => options
.WithVideoCodec("vp9")
.Seek(new TimeSpan(0,0,5))
.WithDuration(TimeSpan.FromSeconds(5))
.ForceFormat("webm"))
.ProcessAsynchronously();
Without the duration it works perfectly. My input stream is a WebM audio file from the Internet. Please fix I need this function.
Same here
FFProbeHelper.VerifyFFProbeExists(new FFOptions { BinaryFolder = "./", TemporaryFilesFolder = "/tmp" }); using (var videoStream = await AzureStorageManager.DownloadAsync(model.VideoFilePath, AzureContainers.video)) { var mediaInfo = await FFProbe.AnalyseAsync(videoStream); model.AdvertLength = mediaInfo.Duration.Seconds; }
await FFProbe.AnalyseAsync(videoStream); return null because of System.Io.IoException "Pipe is broken"
@ComTols Pretty sure that this is a case of incompatible arguments (based on this).
.Seek(new TimeSpan(0,0,5))
tells ffmpeg to skip to that elapsed time in the stream (so, 5 seconds as written).
.WithDuration(TimeSpan.FromSeconds(5))
tells ffmpeg to limit the stream to the specified duration (again, 5 seconds as written). So, essentially, you're trying to read beyond the end of the stream, given your arguments.
@bidy I'm not seeing a whole lot of overlap with the original issue. Probably need to repost that as a new issue (preferably formatted as a code block? Use three ` rather than one).
Assuming tiesont's suggestion solved the issue, I will close this one