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);
}
{
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);
}
浙公网安备 33010602011771号