korasoglu Posted August 21, 2016 Share Posted August 21, 2016 (edited) Arkadaşlar ffmpeg ile videodan resim almaya çalıştım ters giden bir şey var anlamadım kullanım şeklim kullanım şekli aynen şu: ffmpeg -i video.mpg image d.jpg Arkadaşlar klasörde 3 video var fakat döngünün en son elemanının resmini veriyor hata nerede string yol = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); string[] videolar = Directory.GetFiles(yol + "\\aa\\", "*.mp4"); // programlar klasöründeki tüm dosyaları al int dosyaSayisi = Directory.GetFiles(yol + "\\aa\\", "*.*", SearchOption.AllDirectories).Length; foreach (string dosya in videolar) { string inputpath = dosya; string outputpath = yol + "\\aa\\"; toplam = toplam + 1; FileInfo yeniad = new FileInfo(dosya); string kisaad = yeniad.Name.Substring(0, yeniad.Name.Length - 4); MessageBox.Show(kisaad + ".jpg"); //for (int i = 0; i < dosyaSayisi; i++) // { string myPath = Application.StartupPath + "\\ffmpegx86.exe"; string fileargs = "-i" + " " + inputpath + " " + outputpath + kisaad + ".jpg"; System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = myPath; p.StartInfo.Arguments = fileargs; p.StartInfo.UseShellExecute = false; p.StartInfo.CreateNoWindow = true; p.StartInfo.RedirectStandardOutput = true; p.Start(); //p.WaitForExit(); //p.Close(); // } } Edited August 22, 2016 by korasoglu Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.