From 68ffe9e682b144c2a649133b061ec62b8a2a2f39 Mon Sep 17 00:00:00 2001 From: Richard Date: Thu, 11 Feb 2021 11:36:12 +0100 Subject: [PATCH] set last frame to 0 on restart --- Code/Main/InterpolateUtils.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Code/Main/InterpolateUtils.cs b/Code/Main/InterpolateUtils.cs index 37a1f17..24fc2c5 100644 --- a/Code/Main/InterpolateUtils.cs +++ b/Code/Main/InterpolateUtils.cs @@ -74,6 +74,7 @@ namespace Flowframes.Main Logger.Log($"Starting GetProgressByFrameAmount() loop for outdir '{currentOutdir}', target is {target} frames", true); bool firstProgUpd = true; Program.mainForm.SetProgress(0); + lastFrame = 0; while (Program.busy) { if (!progressPaused && AiProcess.processTime.IsRunning && Directory.Exists(currentOutdir)) @@ -95,7 +96,6 @@ namespace Flowframes.Main public static void UpdateLastFrameFromInterpOutput(string output) { - Logger.Log(output); switch (AiProcess.currentAiName) { case "RIFE-CUDA": @@ -138,7 +138,7 @@ namespace Flowframes.Main float eta = framesLeft * secondsPerFrame; string etaStr = FormatUtils.Time(new TimeSpan(0, 0, eta.RoundToInt()), false); - bool replaceLine = Regex.Split(Logger.textbox.Text, "\r\n|\r|\n").Last().Contains("Average Speed: "); + bool replaceLine = Regex.Split(Logger.textbox.Text, "\r\n|\r|\n").Last().Contains("Average speed: "); string logStr = $"Interpolated {frames}/{target} frames ({percent}%) - Average speed: {fpsIn} FPS in / {fpsOut} FPS out - "; logStr += $"Time: {FormatUtils.Time(AiProcess.processTime.Elapsed)} - ETA: {etaStr}"; @@ -157,7 +157,7 @@ namespace Flowframes.Main catch { } } - public static async Task DeleteInterpolatedInputFrames () + public static async Task DeleteInterpolatedInputFrames() { interpolatedInputFramesCount = 0; string[] inputFrames = IOUtils.GetFilesSorted(i.current.framesFolder); @@ -172,7 +172,7 @@ namespace Flowframes.Main } } - public static void SetPreviewImg (Image img) + public static void SetPreviewImg(Image img) { if (img == null) return;