【问题标题】:ffmpeg ask for intsallffmpeg 要求安装
【发布时间】:2015-08-28 09:02:02
【问题描述】:

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

     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 如果我安装该软件,下次它会再次询问。

我是不是做错了什么?

【问题讨论】:

  • 你能给我们看看弹出窗口吗

标签: c# asp.net ffmpeg thumbnails


【解决方案1】:

info.CreateNoWindow = true;

info.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); }

【讨论】:

  • 仍然要求安装 ffmpeg.exe。我们还有另一种创建视频缩略图的方法吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-04-28
相关资源
最近更新 更多