asp.net中视频的缩略图

时间:2011-08-08 17:30:04

标签: c# asp.net video thumbnails

它从cmd开始,但调试时不会进入调试,任何想法为什么请?浏览IIS中的站点返回异常: System.ComponentModel.Win32Exception:访问被拒绝。

        string video;
        string thumb;

        video = System.Web.HttpContext.Current.Server.MapPath("Video/test.avi");
        thumb = System.Web.HttpContext.Current.Server.MapPath("Video/frame.jpg");

        Process proc = new Process
        {
            StartInfo = new ProcessStartInfo
            {
                FileName = System.Web.HttpContext.Current.Server.MapPath("Video/ffmpeg.exe"),
                Arguments = " -i " + video + " -ss 00:00:03 -vframes 1 -f image2 -vcodec mjpeg " + thumb,
                UseShellExecute = false,
                RedirectStandardOutput = true,
                CreateNoWindow = true
            }
        };

        proc.Start();
        while (!proc.StandardOutput.EndOfStream)
        {
            string line = proc.StandardOutput.ReadLine();
        }

1 个答案:

答案 0 :(得分:6)

这是因为IIS进程的用户安全上下文无权运行该应用程序。