crear miniatura del video en asp.net
Quiero crear una miniatura de un archivo de video cargado en mi aplicación para esto, he usadoffmpeg
. El código es el siguiente
string thumbpath, thumbname;
string thumbargs;
string thumbre;
thumbpath = Server.MapPath("~/thumbnails/");
thumbname = thumbpath + "Test" + ".png";
string f = Server.MapPath("~/testvideo.wmv");
thumbargs = "-i " + f + " -vcodec png -vframes 1 -ss 00:00:07 -s 150x150 " + thumbname;
Process thumbproc = new Process();
thumbproc = new Process();
thumbproc.StartInfo.FileName = Server.MapPath("~\\ffmpeg\\ffmpeg.exe");
thumbproc.StartInfo.Arguments = thumbargs;
thumbproc.StartInfo.UseShellExecute = false;
thumbproc.StartInfo.CreateNoWindow = false;
thumbproc.StartInfo.RedirectStandardOutput = false;
try
{
thumbproc.Start();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
thumbproc.WaitForExit();
thumbproc.Close();
pero está lanzando una excepción:
MainModule = 'thumbproc.MainModule'
threw an exception of type 'System.ComponentModel.Win32Exception'
Si alguien tiene una idea, por favor hágala saber.