|
|
@ -461,14 +461,16 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
|
|
|
|
|
|
|
|
using (var processWrapper = new ProcessWrapper(process, this))
|
|
|
|
using (var processWrapper = new ProcessWrapper(process, this))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
await using var memoryStream = new MemoryStream();
|
|
|
|
_logger.LogDebug("Starting ffprobe with args {Args}", args);
|
|
|
|
_logger.LogDebug("Starting ffprobe with args {Args}", args);
|
|
|
|
StartProcess(processWrapper);
|
|
|
|
StartProcess(processWrapper);
|
|
|
|
|
|
|
|
await process.StandardOutput.BaseStream.CopyToAsync(memoryStream, cancellationToken: cancellationToken);
|
|
|
|
|
|
|
|
memoryStream.Seek(0, SeekOrigin.Begin);
|
|
|
|
InternalMediaInfoResult result;
|
|
|
|
InternalMediaInfoResult result;
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
result = await JsonSerializer.DeserializeAsync<InternalMediaInfoResult>(
|
|
|
|
result = await JsonSerializer.DeserializeAsync<InternalMediaInfoResult>(
|
|
|
|
process.StandardOutput.BaseStream,
|
|
|
|
memoryStream,
|
|
|
|
_jsonSerializerOptions,
|
|
|
|
_jsonSerializerOptions,
|
|
|
|
cancellationToken: cancellationToken).ConfigureAwait(false);
|
|
|
|
cancellationToken: cancellationToken).ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|