diff --git a/Code/FFmpeg/FFmpeg.cs b/Code/FFmpeg/FFmpeg.cs index 28a33a2..fb21155 100644 --- a/Code/FFmpeg/FFmpeg.cs +++ b/Code/FFmpeg/FFmpeg.cs @@ -73,7 +73,11 @@ public static string RunAndGetOutput (string args) Process ffmpeg = OsUtils.NewProcess(true); ffmpeg.StartInfo.Arguments = $"/C cd /D {Paths.binPath.Wrap()} & ffmpeg.exe -hide_banner -y -stats {args}"; ffmpeg.Start(); - ffmpeg.WaitForExit(); + if (!ffmpeg.WaitForExit(1000)) + { + ffmpeg.Kill(); + Process.Start("taskkill", "/F /IM ffmpeg.exe"); + } string output = ffmpeg.StandardOutput.ReadToEnd(); string err = ffmpeg.StandardError.ReadToEnd();