mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Fixed static/VFR bug, fixed SBS UI bugs
This commit is contained in:
4
Code/Form1.Designer.cs
generated
4
Code/Form1.Designer.cs
generated
@@ -1317,7 +1317,6 @@
|
|||||||
this.runStepBtn.TabIndex = 42;
|
this.runStepBtn.TabIndex = 42;
|
||||||
this.runStepBtn.Text = "Run This Step";
|
this.runStepBtn.Text = "Run This Step";
|
||||||
this.runStepBtn.UseVisualStyleBackColor = false;
|
this.runStepBtn.UseVisualStyleBackColor = false;
|
||||||
this.runStepBtn.Visible = false;
|
|
||||||
this.runStepBtn.Click += new System.EventHandler(this.runStepBtn_Click);
|
this.runStepBtn.Click += new System.EventHandler(this.runStepBtn_Click);
|
||||||
//
|
//
|
||||||
// stepSelector
|
// stepSelector
|
||||||
@@ -1339,7 +1338,6 @@
|
|||||||
this.stepSelector.Name = "stepSelector";
|
this.stepSelector.Name = "stepSelector";
|
||||||
this.stepSelector.Size = new System.Drawing.Size(203, 24);
|
this.stepSelector.Size = new System.Drawing.Size(203, 24);
|
||||||
this.stepSelector.TabIndex = 73;
|
this.stepSelector.TabIndex = 73;
|
||||||
this.stepSelector.Visible = false;
|
|
||||||
//
|
//
|
||||||
// Form1
|
// Form1
|
||||||
//
|
//
|
||||||
@@ -1349,6 +1347,7 @@
|
|||||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
||||||
this.ClientSize = new System.Drawing.Size(934, 501);
|
this.ClientSize = new System.Drawing.Size(934, 501);
|
||||||
this.Controls.Add(this.cancelBtn);
|
this.Controls.Add(this.cancelBtn);
|
||||||
|
this.Controls.Add(this.runBtn);
|
||||||
this.Controls.Add(this.stepSelector);
|
this.Controls.Add(this.stepSelector);
|
||||||
this.Controls.Add(this.runStepBtn);
|
this.Controls.Add(this.runStepBtn);
|
||||||
this.Controls.Add(this.updateBtn);
|
this.Controls.Add(this.updateBtn);
|
||||||
@@ -1364,7 +1363,6 @@
|
|||||||
this.Controls.Add(this.panel1);
|
this.Controls.Add(this.panel1);
|
||||||
this.Controls.Add(this.logBox);
|
this.Controls.Add(this.logBox);
|
||||||
this.Controls.Add(this.progressCircle);
|
this.Controls.Add(this.progressCircle);
|
||||||
this.Controls.Add(this.runBtn);
|
|
||||||
this.Controls.Add(this.titleLabel);
|
this.Controls.Add(this.titleLabel);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace Flowframes
|
|||||||
ConfigParser.LoadComboxIndex(aiCombox);
|
ConfigParser.LoadComboxIndex(aiCombox);
|
||||||
|
|
||||||
Setup.Init();
|
Setup.Init();
|
||||||
UpdateStepByStepControls();
|
UpdateStepByStepControls(true);
|
||||||
|
|
||||||
Initialized();
|
Initialized();
|
||||||
Checks();
|
Checks();
|
||||||
@@ -240,6 +240,7 @@ namespace Flowframes
|
|||||||
foreach (Control c in controlsToHide)
|
foreach (Control c in controlsToHide)
|
||||||
c.Visible = !state;
|
c.Visible = !state;
|
||||||
Program.busy = state;
|
Program.busy = state;
|
||||||
|
Program.mainForm.UpdateStepByStepControls(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void aiCombox_SelectedIndexChanged(object sender, EventArgs e)
|
private void aiCombox_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
@@ -367,18 +368,21 @@ namespace Flowframes
|
|||||||
SetTab("interpolation");
|
SetTab("interpolation");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateStepByStepControls ()
|
public void UpdateStepByStepControls (bool settingsMayHaveChanged)
|
||||||
{
|
{
|
||||||
stepSelector.Items.Clear();
|
if (settingsMayHaveChanged)
|
||||||
if(Config.GetBool("scnDetect"))
|
{
|
||||||
stepSelector.Items.AddRange(new string[] { "1) Extract Scene Changes", "2) Import/Extract Frames", "3) Run Interpolation", "4) Export", "5) Cleanup & Reset" });
|
stepSelector.Items.Clear();
|
||||||
else
|
if (Config.GetBool("scnDetect"))
|
||||||
stepSelector.Items.AddRange(new string[] { "1) Import/Extract Frames", "2) Run Interpolation", "3) Export", "4) Cleanup & Reset" });
|
stepSelector.Items.AddRange(new string[] { "1) Extract Scene Changes", "2) Import/Extract Frames", "3) Run Interpolation", "4) Export", "5) Cleanup & Reset" });
|
||||||
stepSelector.SelectedIndex = 0;
|
else
|
||||||
|
stepSelector.Items.AddRange(new string[] { "1) Import/Extract Frames", "2) Run Interpolation", "3) Export", "4) Cleanup & Reset" });
|
||||||
|
stepSelector.SelectedIndex = 0;
|
||||||
|
}
|
||||||
bool stepByStep = Config.GetInt("processingMode") == 1;
|
bool stepByStep = Config.GetInt("processingMode") == 1;
|
||||||
stepSelector.Visible = stepByStep;
|
//stepSelector.Visible = stepByStep && !Program.busy;
|
||||||
runStepBtn.Visible = stepByStep;
|
//runStepBtn.Visible = stepByStep && !Program.busy;
|
||||||
runBtn.Visible = !stepByStep;
|
runBtn.Visible = !stepByStep && !Program.busy;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void runStepBtn_Click(object sender, EventArgs e)
|
private async void runStepBtn_Click(object sender, EventArgs e)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace Flowframes.Forms
|
|||||||
private void SettingsForm_FormClosing(object sender, FormClosingEventArgs e)
|
private void SettingsForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
Program.mainForm.UpdateStepByStepControls();
|
Program.mainForm.UpdateStepByStepControls(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveSettings ()
|
void SaveSettings ()
|
||||||
|
|||||||
@@ -160,9 +160,9 @@ namespace Flowframes
|
|||||||
bool useTimestamps = Config.GetInt("timingMode") == 1; // TODO: Auto-Disable timestamps if input frames are sequential, not timestamped
|
bool useTimestamps = Config.GetInt("timingMode") == 1; // TODO: Auto-Disable timestamps if input frames are sequential, not timestamped
|
||||||
|
|
||||||
if(sbsMode)
|
if(sbsMode)
|
||||||
await VfrDedupe.CreateTimecodeFiles(currentFramesPath, Config.GetBool("enableLoop"), firstFrameFix, -1, useTimestamps);
|
await VfrDedupe.CreateTimecodeFiles(currentFramesPath, Config.GetBool("enableLoop"), firstFrameFix, -1, !useTimestamps);
|
||||||
else
|
else
|
||||||
await VfrDedupe.CreateTimecodeFiles(currentFramesPath, Config.GetBool("enableLoop"), firstFrameFix, lastInterpFactor, useTimestamps);
|
await VfrDedupe.CreateTimecodeFiles(currentFramesPath, Config.GetBool("enableLoop"), firstFrameFix, lastInterpFactor, !useTimestamps);
|
||||||
|
|
||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
|
|
||||||
@@ -182,8 +182,8 @@ namespace Flowframes
|
|||||||
|
|
||||||
public static async Task RunAi(string outpath, int targetFrames, int tilesize, AI ai)
|
public static async Task RunAi(string outpath, int targetFrames, int tilesize, AI ai)
|
||||||
{
|
{
|
||||||
//currentlyUsingAutoEnc = IOUtils.GetAmountOfFiles(currentFramesPath, false) >= (AutoEncode.chunkSize + AutoEncode.safetyBufferFrames) * 1.2f; TODO: Enable me for v18!!
|
currentlyUsingAutoEnc = IOUtils.GetAmountOfFiles(currentFramesPath, false) >= (AutoEncode.chunkSize + AutoEncode.safetyBufferFrames) * 1.2f;
|
||||||
currentlyUsingAutoEnc = false;
|
|
||||||
Directory.CreateDirectory(outpath);
|
Directory.CreateDirectory(outpath);
|
||||||
|
|
||||||
List<Task> tasks = new List<Task>();
|
List<Task> tasks = new List<Task>();
|
||||||
@@ -200,8 +200,8 @@ namespace Flowframes
|
|||||||
if (ai.aiName == Networks.rifeNcnn.aiName)
|
if (ai.aiName == Networks.rifeNcnn.aiName)
|
||||||
tasks.Add(AiProcess.RunRifeNcnnMulti(currentFramesPath, outpath, tilesize, interpFactor));
|
tasks.Add(AiProcess.RunRifeNcnnMulti(currentFramesPath, outpath, tilesize, interpFactor));
|
||||||
|
|
||||||
if(currentlyUsingAutoEnc)
|
//if(currentlyUsingAutoEnc)
|
||||||
tasks.Add(AutoEncode.MainLoop(outpath));
|
// tasks.Add(AutoEncode.MainLoop(outpath));
|
||||||
await Task.WhenAll(tasks);
|
await Task.WhenAll(tasks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,7 +245,6 @@ namespace Flowframes
|
|||||||
Logger.Log("Canceled interpolation.");
|
Logger.Log("Canceled interpolation.");
|
||||||
if (!string.IsNullOrWhiteSpace(reason) && !noMsgBox)
|
if (!string.IsNullOrWhiteSpace(reason) && !noMsgBox)
|
||||||
Utils.ShowMessage($"Canceled:\n\n{reason}");
|
Utils.ShowMessage($"Canceled:\n\n{reason}");
|
||||||
Program.mainForm.UpdateStepByStepControls(); // This is needed, idk why
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Cleanup(string interpFramesDir, bool ignoreKeepSetting = false)
|
public static void Cleanup(string interpFramesDir, bool ignoreKeepSetting = false)
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ namespace Flowframes.Main
|
|||||||
if (Interpolate.canceled) return;
|
if (Interpolate.canceled) return;
|
||||||
Logger.Log($"Generating timecodes for {interpFactor}x...", false, true);
|
Logger.Log($"Generating timecodes for {interpFactor}x...", false, true);
|
||||||
|
|
||||||
|
if(noTimestamps)
|
||||||
|
Logger.Log("Timestamps are disabled, using static frame rate.");
|
||||||
|
|
||||||
bool sceneDetection = true;
|
bool sceneDetection = true;
|
||||||
|
|
||||||
if(frameFiles == null || frameFiles.Length < 1)
|
if(frameFiles == null || frameFiles.Length < 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user