ffmpeg ask for intsall

本文关键字:intsall for ask ffmpeg | 更新日期: 2023-09-27 17:55:48

我正在尝试从存储在本地文件夹中的视频创建图像/缩略图。这就是我正在做的是——

     Process p;
     ProcessStartInfo info = new ProcessStartInfo();
     info.FileName = Server.MapPath("~/FFMPEG/ffmpeg.exe");
     info.RedirectStandardOutput = false;
     info.CreateNoWindow = false;
     info.Arguments = " -i " + videopath  + " -vframes 1 " + imagepath + "%d.jpg";
     info.UseShellExecute = false; 
     p = Process.Start(info);
    while (!p.HasExited) { Thread.Sleep(10); }

当我执行上面的代码时,会出现一个弹出框来安装 ffmpeg.exe如果我安装了该软件,下次它会再次询问。

我做错了吗?

ffmpeg ask for intsall

信息

。CreateNoWindow = true;

信息。WindowStyle = ProcessWindowStyle.Hidden;

下面是代码

Process p;
         ProcessStartInfo info = new ProcessStartInfo();
         info.FileName = Server.MapPath("~/FFMPEG/ffmpeg.exe");
         info.RedirectStandardOutput = false;
       // below lines will not open the command window
         info.CreateNoWindow = true;
         info.WindowStyle = ProcessWindowStyle.Hidden;
         info.Arguments = " -i " + videopath  + " -vframes 1 " + imagepath + "%d.jpg";
         info.UseShellExecute = false; 
         p = Process.Start(info);
        while (!p.HasExited) { Thread.Sleep(10); }