在asp.net中的视频缩略图

本文关键字:略图 的视频 asp net | 更新日期: 2023-09-27 18:04:54

它从cmd工作,但当调试不会进入while条件,任何想法为什么请?在IIS中浏览站点返回例外: System.ComponentModel。Win32Exception: Access is denied.

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

在asp.net中的视频缩略图

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