过程中,我有这样的代码:如何启动与隐藏窗口
string d = "-f image2 -framerate 9 -i E:\\REC\\Temp\\%06d.jpeg -r 30 E:\\REC\\Video\\" + label1.Text + ".avi";
//string d = "-f dshow -i video=\"screen-capture-recorder\" E:\\REC\\" + label1.Text + ".flv";
Process proc = new Process();
proc.StartInfo.FileName = "E:\\ffmpeg\\bin\\ffmpeg.exe";
proc.StartInfo.Arguments = d;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
if (!proc.Start())
{
Console.WriteLine("Error starting");
return;
}
proc.WaitForExit();
当它运行的ffmpeg.exe
有这样的:
我的问题是如何隐藏这个窗口?
'CreateNoWindow'应该是true。 – Luaan
确实它是假的 –
另外请注意,如果你重定向标准输出,你*有*读取它(通常是异步的,但在你的情况下不是必需的)。 – Luaan