mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
CLI: --loop, --fix_scene_changes, --scene_change_sensitivity, --max_fps
This commit is contained in:
@@ -227,6 +227,26 @@ namespace Flowframes.Forms.Main
|
|||||||
{
|
{
|
||||||
Config.Set(Config.Key.maxVidHeight, Program.Cli.MaxHeight.ToString());
|
Config.Set(Config.Key.maxVidHeight, Program.Cli.MaxHeight.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Program.Cli.Loop != null)
|
||||||
|
{
|
||||||
|
Config.Set(Config.Key.enableLoop, ((bool)Program.Cli.Loop).ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Program.Cli.FixSceneChanges != null)
|
||||||
|
{
|
||||||
|
Config.Set(Config.Key.scnDetect, ((bool)Program.Cli.Loop).ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Program.Cli.FixSceneChangeVal > 0f)
|
||||||
|
{
|
||||||
|
Config.Set(Config.Key.scnDetectValue, Program.Cli.FixSceneChangeVal.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Program.Cli.MaxOutFps >= 1f)
|
||||||
|
{
|
||||||
|
Config.Set(Config.Key.maxFps, Program.Cli.MaxOutFps.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemovePreviewIfDisabled()
|
void RemovePreviewIfDisabled()
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ namespace Flowframes
|
|||||||
public static string InterpModel = "";
|
public static string InterpModel = "";
|
||||||
public static string OutputDir = "";
|
public static string OutputDir = "";
|
||||||
public static int MaxHeight = -1;
|
public static int MaxHeight = -1;
|
||||||
|
public static bool? Loop = false;
|
||||||
|
public static bool? FixSceneChanges = false;
|
||||||
|
public static float FixSceneChangeVal = -1f;
|
||||||
|
public static float MaxOutFps = -1f;
|
||||||
public static List<string> ValidFiles = new List<string>();
|
public static List<string> ValidFiles = new List<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,6 +139,22 @@ namespace Flowframes
|
|||||||
"h|max_height=", $"Max video size (pixels height). Larger videos will be downscaled.",
|
"h|max_height=", $"Max video size (pixels height). Larger videos will be downscaled.",
|
||||||
v => Cli.MaxHeight = v.GetInt()
|
v => Cli.MaxHeight = v.GetInt()
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"l|loop", $"Enable loop output mode",
|
||||||
|
v => Cli.Loop = v != null ? true : (bool?)null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"scn|fix_scene_changes", $"Do not interpolate scene cuts to avoid artifacts",
|
||||||
|
v => Cli.FixSceneChanges = v != null ? true : (bool?)null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"scnv|scene_change_sensitivity=", $"Scene change sensitivity, lower is more sensitive (e.g. 0.18)",
|
||||||
|
v => Cli.FixSceneChangeVal = v.GetFloat()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fps|max_fps=", $"Maximum FPS of output video, if the interpolation factor results in a higher FPS, it will be reduced to this value",
|
||||||
|
v => Cli.MaxOutFps = v.GetFloat()
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"o|output_dir=", "Output folder to save the interpolated video in",
|
"o|output_dir=", "Output folder to save the interpolated video in",
|
||||||
v => Cli.OutputDir = v.Trim()
|
v => Cli.OutputDir = v.Trim()
|
||||||
|
|||||||
Reference in New Issue
Block a user