Process myProcess = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo("ffprobe.exe");
string parms = File.ReadAllText("ffprobe.txt");
parms = parms.Replace("{mp4}", mp4);
startInfo.Arguments = parms; //运行参数 string 类型
//不显示窗体
startInfo.CreateNoWindow = true;
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
myProcess.StartInfo = startInfo;
myProcess.Start();
string times = myProcess.StandardOutput.ReadToEnd();
myProcess.WaitForExit();