mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-18 17:37:48 +01:00
Cancel if no frames were output (avoid "waiting for encoding" forever)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user