1 提取视频帧
Process ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = " -i " + videoFilePath + " -r 1 -q:v 2 -f image2 " + @imagePath + "\\%6d.jpeg";
ffmpeg.StartInfo.FileName = Folder + "ffmpeg.exe";
ffmpeg.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
ffmpeg.Start();
ffmpeg.WaitForExit();
ffmpeg.Close();
ffmpeg.Dispose();
-videoFilePath : 视频文件路径
-imagePath : 存放图片路径
-r : 每s取一帧
-q:v:图片质量等
-%6d:图片名称000001.jpg......
2 多张图片合成视频
Process ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = "-r 25 -i " + imagespath + "\\pic-%6d.jpeg " + VideoPath + "\\" + videoName + ".mp4";
ffmpeg.StartInfo.FileName = Folder + "ffmpeg.exe";
ffmpeg.StartI