ffmpeg ask for intsall

49 views Asked by At

I am trying to create an image/thumbnail from the video stored in local folder. Here is what I am doing is-

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

When I execute above code a popup box comes to install ffmpeg.exe If I install the software, for the next time it asks again.

Am I doing some mistake?

1

There are 1 answers

1
Sachin Verma On

info.CreateNoWindow = true;

info.WindowStyle = ProcessWindowStyle.Hidden;

Below is the code

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