diff --git a/Code/OS/AiProcess.cs b/Code/OS/AiProcess.cs index 0395244..ca3bfb1 100644 --- a/Code/OS/AiProcess.cs +++ b/Code/OS/AiProcess.cs @@ -67,7 +67,8 @@ namespace Flowframes if (Interpolate.canceled) return; Program.mainForm.SetProgress(100); AiProcessSuspend.SetRunning(false); - InterpolationProgress.UpdateInterpProgress(IOUtils.GetAmountOfFiles(Interpolate.current.interpFolder, false, "*" + Interpolate.current.interpExt), InterpolationProgress.targetFrames); + int interpolatedFrames = IOUtils.GetAmountOfFiles(Interpolate.current.interpFolder, false, "*" + Interpolate.current.interpExt); + InterpolationProgress.UpdateInterpProgress(interpolatedFrames, InterpolationProgress.targetFrames); string logStr = $"Done running {aiName} - Interpolation took {FormatUtils.Time(processTime.Elapsed)}. Peak Output FPS: {InterpolationProgress.peakFpsOut.ToString("0.00")}"; if (Interpolate.currentlyUsingAutoEnc && AutoEncode.HasWorkToDo()) @@ -79,6 +80,13 @@ namespace Flowframes Logger.Log(logStr); processTime.Stop(); + if(interpolatedFrames < 3) + { + string amount = interpolatedFrames > 0 ? $"Only {interpolatedFrames}" : "No"; + Interpolate.Cancel($"Interpolation failed - {amount} interpolated frames were created."); + return; + } + while (Interpolate.currentlyUsingAutoEnc && Program.busy) { if (AvProcess.lastAvProcess != null && !AvProcess.lastAvProcess.HasExited && AvProcess.lastTask == AvProcess.TaskType.Encode)