asp.net 下使用ffmpeg

 try
        {
            Process proc = new Process();
            proc.StartInfo.FileName = Server.MapPath("~/Bin/") + "ffmpeg.exe";
            proc.StartInfo.Arguments = string.Format(@"-i ""{0}"" -acodec wmav1 -ac 2 -ar 44100 -ab 96000 ""{1}""", Server.MapPath("~/") + "a.flv", Server.MapPath("~/") + "a.wma");
            proc.StartInfo.UseShellExecute = false;
            proc.StartInfo.CreateNoWindow = true;
            proc.StartInfo.RedirectStandardOutput = false;
            proc.Start();
        }
        catch(Exception ex)
        {
            Response.Write("err : "+ex.Message);
        }
posted @ 2009-08-28 17:12  94cool  阅读(247)  评论(0)    收藏  举报