为什么我那个ffmpeg转换视频的时候明明用了wiatforexit,怎么每次截图不是在进程退出后???        //取得ffmpeg.exe的路径,路径配置在Web.Config中,如:<add   key="ffmpeg"   value="E:\51aspx\ffmpeg.exe"   />   
        string ffmpeg = Server.MapPath(PublicMethod.ffmpegtool);
        if ((!System.IO.File.Exists(ffmpeg)) || (!System.IO.File.Exists(fileName)))
        {
            return "";
        }        //获得图片和(.flv)文件相对路径/最后存储到数据库的路径,如:/Web/User1/00001.jpg   
        string flv_img = System.IO.Path.ChangeExtension(Server.MapPath(imgFile), ".jpg");
        string flv_file = System.IO.Path.ChangeExtension(Server.MapPath(playFile), ".flv");
        //截图的尺寸大小,配置在Web.Config中,如:<add   key="CatchFlvImgSize"   value="240x180"   />   
        string FlvImgSize = PublicMethod.sizeOfImg;        //Process p = new Process();
        //p.StartInfo.FileName = ffmpeg;
        //p.StartInfo.Arguments = " -i " + fileName + " -ab 56 -ar 22050 -b 500 -r 15 -s " + widthOfFile + "x" + heightOfFile + " " + flv_file;
        //p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
        System.Diagnostics.ProcessStartInfo FilestartInfo = new System.Diagnostics.ProcessStartInfo(ffmpeg);
        System.Diagnostics.ProcessStartInfo ImgstartInfo = new System.Diagnostics.ProcessStartInfo(ffmpeg);
        FilestartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
        ImgstartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
        //此处组合成ffmpeg.exe文件需要的参数即可,此处命令在ffmpeg   0.4.9调试通过 
        FilestartInfo.Arguments = " -i " + fileName + " -ab 56 -ar 22050 -b 500 -r 15 -s " + widthOfFile + "x" + heightOfFile + " " + flv_file;
        ImgstartInfo.Arguments = " -i " + fileName + " -y -f image2 -t 0.005 -s " + FlvImgSize + " " + flv_img;
        try
        {
            //p.Start();
            //p.WaitForExit();
            Process p = System.Diagnostics.Process.Start(FilestartInfo);
            p.WaitForExit();
            //CatchImg(fileName, playFile);
            System.Diagnostics.Process.Start(ImgstartInfo);
        }