mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-19 09:49:26 +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;
|
if (Interpolate.canceled) return;
|
||||||
Program.mainForm.SetProgress(100);
|
Program.mainForm.SetProgress(100);
|
||||||
AiProcessSuspend.SetRunning(false);
|
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")}";
|
string logStr = $"Done running {aiName} - Interpolation took {FormatUtils.Time(processTime.Elapsed)}. Peak Output FPS: {InterpolationProgress.peakFpsOut.ToString("0.00")}";
|
||||||
|
|
||||||
if (Interpolate.currentlyUsingAutoEnc && AutoEncode.HasWorkToDo())
|
if (Interpolate.currentlyUsingAutoEnc && AutoEncode.HasWorkToDo())
|
||||||
@@ -79,6 +80,13 @@ namespace Flowframes
|
|||||||
Logger.Log(logStr);
|
Logger.Log(logStr);
|
||||||
processTime.Stop();
|
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)
|
while (Interpolate.currentlyUsingAutoEnc && Program.busy)
|
||||||
{
|
{
|
||||||
if (AvProcess.lastAvProcess != null && !AvProcess.lastAvProcess.HasExited && AvProcess.lastTask == AvProcess.TaskType.Encode)
|
if (AvProcess.lastAvProcess != null && !AvProcess.lastAvProcess.HasExited && AvProcess.lastTask == AvProcess.TaskType.Encode)
|
||||||
|
|||||||
Reference in New Issue
Block a user