我尝试从 ffmpeg 进程获取输出,但无法获取输出。在另一个进程和命令中,它工作正常,但输出在启动时立即返回!
using (var process = new Process())
{
process.StartInfo = new ProcessStartInfo()
{
FileName = LinkHelper.IPFS_PATH,
Arguments = cmd,
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardOutput = true
};
process.ErrorDataReceived += FfmpegErrorRecieved;
process.Start();
using (StreamReader reader = process.StandardOutput)
{
string output = await reader.ReadToEndAsync();
Console.WriteLine(output);
}
process.WaitForExit();
}
慕姐4208626
茅侃侃
相关分类