3
将MPG文件转换为AVI文件时出现问题。当我转换一个文件时,例如520KB MPG文件,我的程序就会生成一个大约112MB的AVI文件,并且该视频无法正常工作。什么会造成这种情况?使用C#中的ffmpeg.exe将MPG转换为AVI
string path = "C:\\convert\\input.mpg"
string outputpath = "C:\\convert\\"+output+".avi";
string fileargs = "-i" + " " + path + " " + outputpath;
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "C:\\convert\\ffmpeg.exe";
p.StartInfo.Arguments = fileargs;
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardOutput = true;
p.Start();
p.WaitForExit();
尝试读取命令行举例开关,你就什么事情弄清楚。顺便说一句,你的问题与C#无关,你的代码是确定的。 – 2010-11-23 15:10:12