Print ffmpeg log while waiting for autoenc to finish

This commit is contained in:
N00MKRAD
2021-01-06 21:44:09 +01:00
parent c31c6872e8
commit 36c8a17dff
8 changed files with 20 additions and 10 deletions

View File

@@ -40,7 +40,7 @@ namespace Flowframes
hasShownError = false;
}
static void AiFinished (string aiName)
static async Task AiFinished (string aiName)
{
Program.mainForm.SetProgress(100);
InterpolateUtils.UpdateInterpProgress(IOUtils.GetAmountOfFiles(Interpolate.current.interpFolder, false, "*.png"), InterpolateUtils.targetFrames);
@@ -49,6 +49,12 @@ namespace Flowframes
logStr += " - Waiting for encoding to finish...";
Logger.Log(logStr);
processTime.Stop();
while (AvProcess.lastProcess != null && !AvProcess.lastProcess.HasExited)
{
string lastLine = AvProcess.lastOutputFfmpeg.SplitIntoLines().Last();
Logger.Log(lastLine.Trim(), false, Logger.GetLastLine().Contains("frame"));
await Task.Delay(1000);
}
}
public static async Task RunDainNcnn(string framesPath, string outPath, int targetFrames, int tilesize)