mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Don't create timecodes for all factors if step-by-step is not used
This commit is contained in:
@@ -136,7 +136,7 @@ namespace Flowframes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task PostProcessFrames ()
|
public static async Task PostProcessFrames (bool sbsMode = false)
|
||||||
{
|
{
|
||||||
bool firstFrameFix = lastAi.aiName == Networks.rifeCuda.aiName;
|
bool firstFrameFix = lastAi.aiName == Networks.rifeCuda.aiName;
|
||||||
|
|
||||||
@@ -155,8 +155,10 @@ namespace Flowframes
|
|||||||
|
|
||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
|
|
||||||
if (Config.GetInt("timingMode") == 1)
|
if(sbsMode)
|
||||||
await VfrDedupe.CreateTimecodeFiles(currentFramesPath, Config.GetBool("enableLoop"), firstFrameFix);
|
await VfrDedupe.CreateTimecodeFiles(currentFramesPath, Config.GetBool("enableLoop"), firstFrameFix, -1);
|
||||||
|
else
|
||||||
|
await VfrDedupe.CreateTimecodeFiles(currentFramesPath, Config.GetBool("enableLoop"), firstFrameFix, lastInterpFactor);
|
||||||
|
|
||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
MagickDedupe.RenameCounterDir(currentFramesPath, "png");
|
MagickDedupe.RenameCounterDir(currentFramesPath, "png");
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ namespace Flowframes.Main
|
|||||||
|
|
||||||
public static async Task DoInterpolate ()
|
public static async Task DoInterpolate ()
|
||||||
{
|
{
|
||||||
await PostProcessFrames();
|
await PostProcessFrames(true);
|
||||||
|
|
||||||
string interpFramesDir = Path.Combine(currentTempDir, Paths.interpDir);
|
string interpFramesDir = Path.Combine(currentTempDir, Paths.interpDir);
|
||||||
if (!IOUtils.TryDeleteIfExists(interpFramesDir))
|
if (!IOUtils.TryDeleteIfExists(interpFramesDir))
|
||||||
|
|||||||
@@ -13,13 +13,19 @@ namespace Flowframes.Main
|
|||||||
{
|
{
|
||||||
class VfrDedupe
|
class VfrDedupe
|
||||||
{
|
{
|
||||||
|
public static async Task CreateTimecodeFiles(string framesPath, bool loopEnabled, bool firstFrameFix, int times)
|
||||||
public static async Task CreateTimecodeFiles(string framesPath, bool loopEnabled, bool firstFrameFix)
|
|
||||||
{
|
{
|
||||||
Logger.Log("Generating timecodes...");
|
Logger.Log("Generating timecodes...");
|
||||||
await CreateTimecodeFile(framesPath, loopEnabled, 2, firstFrameFix);
|
if(times <= 0)
|
||||||
await CreateTimecodeFile(framesPath, loopEnabled, 4, firstFrameFix);
|
{
|
||||||
await CreateTimecodeFile(framesPath, loopEnabled, 8, firstFrameFix);
|
await CreateTimecodeFile(framesPath, loopEnabled, 2, firstFrameFix);
|
||||||
|
await CreateTimecodeFile(framesPath, loopEnabled, 4, firstFrameFix);
|
||||||
|
await CreateTimecodeFile(framesPath, loopEnabled, 8, firstFrameFix);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await CreateTimecodeFile(framesPath, loopEnabled, times, firstFrameFix);
|
||||||
|
}
|
||||||
frameFiles = null;
|
frameFiles = null;
|
||||||
Logger.Log($"Generating timecodes... Done.", false, true);
|
Logger.Log($"Generating timecodes... Done.", false, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user