This commit is contained in:
n00mkrad
2022-06-04 12:43:48 +02:00
parent 2a3fe9a88f
commit eb174ade38
8 changed files with 92 additions and 44 deletions

View File

@@ -106,15 +106,13 @@ namespace Flowframes.Main
if (Config.GetBool(Config.Key.fixOutputDuration)) // Match input duration by padding duping last frame until interp frames == (inputframes * factor)
{
int neededFrames = (frameFiles.Length * interpFactor).RoundToInt() - fileContent.SplitIntoLines().Where(x => x.StartsWith("'file ")).Count();
for (int i = 0; i < neededFrames; i++)
fileContent += fileContent.SplitIntoLines().Where(x => x.StartsWith("'file ")).Last();
}
if (loop)
{
fileContent = fileContent.Remove(fileContent.LastIndexOf("\n"));
}
File.WriteAllText(framesFile, fileContent);
File.WriteAllText(framesFile + ".inputframes.json", JsonConvert.SerializeObject(inputFilenames, Formatting.Indented));

View File

@@ -88,6 +88,11 @@ namespace Flowframes
Program.mainForm.InterpolationDone();
}
public static async Task Realtime ()
{
await AiProcess.RunRifeNcnnVs(current.framesFolder, "", current.interpFactor, current.model.dir, true);
}
public static async Task<int> GetCurrentInputFrameCount()
{
if (currentInputFrameCount < 2)