string inputpath = strFileNamePath;
string outputpath = "C:\\Image\\";
//for (int iIndex = 0; iIndex < 1000; iIndex++)
//{
//string fileargs = "-i" + " " + inputpath + " -ab 56 -ar 44100 -b 200 -r 15 -s 320x240 -f flv " + outputpath + "SRT.flv";
string fileargs = "-i" + " " + inputpath + " " + outputpath + "image.jpg";
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "C:\\Documents and Settings\\Badr\\My Documents\\Visual Studio 2008\\Projects\\Video2image2video.\\ffmpeg\\ffmpeg.exe";
p.StartInfo.Arguments = fileargs;
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardOutput = true;
p.Start();
我有这样的代码这个创建仅1视频的图像我申请一个循环,但我反复生成初始图像我怎么可以得到所有的视频如何将视频转换为在c#中使用ffmpeg的图像文件?
感谢名单的图片提前
请尽量避免硬编码路径,C:\\文件等是令人震惊。使用System.IO.Path.GetDirectoryName(_ System.Reflection.Assembly.GetExecutingAssembly()。GetName()。CodeBase)'要获取exe所在的路径 – RvdK 2010-05-18 13:51:20