diff --git a/CodeLegacy/Forms/Main/Form1.Designer.cs b/CodeLegacy/Forms/Main/Form1.Designer.cs index 9907650..d974cf5 100644 --- a/CodeLegacy/Forms/Main/Form1.Designer.cs +++ b/CodeLegacy/Forms/Main/Form1.Designer.cs @@ -107,6 +107,8 @@ this.browseInputFileBtn = new HTAlt.WinForms.HTButton(); this.browseInputBtn = new HTAlt.WinForms.HTButton(); this.quickSettingsTab = new System.Windows.Forms.TabPage(); + this.vfrHandling = new System.Windows.Forms.ComboBox(); + this.label5 = new System.Windows.Forms.Label(); this.label20 = new System.Windows.Forms.Label(); this.maxFps = new System.Windows.Forms.ComboBox(); this.label24 = new System.Windows.Forms.Label(); @@ -141,8 +143,6 @@ this.cancelBtn = new System.Windows.Forms.Button(); this.menuStripQueue = new System.Windows.Forms.ContextMenuStrip(this.components); this.addCurrentConfigurationToQueueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.label5 = new System.Windows.Forms.Label(); - this.vfrHandling = new System.Windows.Forms.ComboBox(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); @@ -1200,6 +1200,29 @@ this.quickSettingsTab.Text = "Quick Settings"; this.quickSettingsTab.Enter += new System.EventHandler(this.LoadQuickSettings); // + // vfrHandling + // + this.vfrHandling.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.vfrHandling.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.vfrHandling.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.vfrHandling.ForeColor = System.Drawing.Color.White; + this.vfrHandling.FormattingEnabled = true; + this.vfrHandling.Location = new System.Drawing.Point(280, 187); + this.vfrHandling.Name = "vfrHandling"; + this.vfrHandling.Size = new System.Drawing.Size(249, 23); + this.vfrHandling.TabIndex = 92; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.ForeColor = System.Drawing.Color.White; + this.label5.Location = new System.Drawing.Point(6, 189); + this.label5.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(185, 15); + this.label5.TabIndex = 91; + this.label5.Text = "Detect Variable Frame Rate Videos"; + // // label20 // this.label20.AutoSize = true; @@ -1338,8 +1361,7 @@ this.dedupMode.FormattingEnabled = true; this.dedupMode.Items.AddRange(new object[] { "Disabled", - "1: After Extraction - Slow, Accurate", - "2: During Extraction - Fast, Less Accurate"}); + "Enabled (mpdecimate)"}); this.dedupMode.Location = new System.Drawing.Point(279, 67); this.dedupMode.Name = "dedupMode"; this.dedupMode.Size = new System.Drawing.Size(250, 23); @@ -1671,29 +1693,6 @@ this.addCurrentConfigurationToQueueToolStripMenuItem.Text = "Add Current Configuration to Queue"; this.addCurrentConfigurationToQueueToolStripMenuItem.Click += new System.EventHandler(this.addCurrentConfigurationToQueueToolStripMenuItem_Click); // - // label5 - // - this.label5.AutoSize = true; - this.label5.ForeColor = System.Drawing.Color.White; - this.label5.Location = new System.Drawing.Point(6, 189); - this.label5.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(185, 15); - this.label5.TabIndex = 91; - this.label5.Text = "Detect Variable Frame Rate Videos"; - // - // vfrHandling - // - this.vfrHandling.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.vfrHandling.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.vfrHandling.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.vfrHandling.ForeColor = System.Drawing.Color.White; - this.vfrHandling.FormattingEnabled = true; - this.vfrHandling.Location = new System.Drawing.Point(280, 187); - this.vfrHandling.Name = "vfrHandling"; - this.vfrHandling.Size = new System.Drawing.Size(249, 23); - this.vfrHandling.TabIndex = 92; - // // Form1 // this.AllowDrop = true; diff --git a/CodeLegacy/Forms/Main/Form1.cs b/CodeLegacy/Forms/Main/Form1.cs index 1c11dd1..029ca2b 100644 --- a/CodeLegacy/Forms/Main/Form1.cs +++ b/CodeLegacy/Forms/Main/Form1.cs @@ -843,8 +843,7 @@ namespace Flowframes.Forms.Main private void dedupMode_SelectedIndexChanged(object sender, EventArgs e) { dedupeSensLabel.Visible = dedupMode.SelectedIndex != 0; - magickDedupePanel.Visible = dedupMode.SelectedIndex == 1; - mpDedupePanel.Visible = dedupMode.SelectedIndex == 2; + mpDedupePanel.Visible = dedupMode.SelectedIndex == 1; SaveQuickSettings(null, null); } diff --git a/CodeLegacy/Forms/SettingsForm.Designer.cs b/CodeLegacy/Forms/SettingsForm.Designer.cs index 7a0cc66..ff92a32 100644 --- a/CodeLegacy/Forms/SettingsForm.Designer.cs +++ b/CodeLegacy/Forms/SettingsForm.Designer.cs @@ -932,8 +932,7 @@ this.dedupMode.FormattingEnabled = true; this.dedupMode.Items.AddRange(new object[] { "Disabled", - "1: After Extraction - Slow, Accurate", - "2: During Extraction - Fast, Less Accurate"}); + "Enabled (mpdecimate)"}); this.dedupMode.Location = new System.Drawing.Point(280, 7); this.dedupMode.Name = "dedupMode"; this.dedupMode.Size = new System.Drawing.Size(250, 21); diff --git a/CodeLegacy/Forms/SettingsForm.cs b/CodeLegacy/Forms/SettingsForm.cs index 7745572..c892bf0 100644 --- a/CodeLegacy/Forms/SettingsForm.cs +++ b/CodeLegacy/Forms/SettingsForm.cs @@ -291,8 +291,7 @@ namespace Flowframes.Forms private void dedupMode_SelectedIndexChanged(object sender, EventArgs e) { dedupeSensLabel.Visible = dedupMode.SelectedIndex != 0; - magickDedupePanel.Visible = dedupMode.SelectedIndex == 1; - mpDedupePanel.Visible = dedupMode.SelectedIndex == 2; + mpDedupePanel.Visible = dedupMode.SelectedIndex == 1; } private void clearModelCacheBtn_Click(object sender, EventArgs e) diff --git a/CodeLegacy/IO/ConfigParser.cs b/CodeLegacy/IO/ConfigParser.cs index b1ea4cf..e310e33 100644 --- a/CodeLegacy/IO/ConfigParser.cs +++ b/CodeLegacy/IO/ConfigParser.cs @@ -70,7 +70,7 @@ namespace Flowframes.IO public static void LoadComboxIndex(ComboBox comboBox) { - comboBox.SelectedIndex = Config.GetInt(comboBox.Name).Clamp(0, int.MaxValue); + comboBox.SelectedIndex = Config.GetInt(comboBox.Name).Clamp(0, comboBox.Items.Count - 1); } } } diff --git a/CodeLegacy/Magick/Dedupe.cs b/CodeLegacy/Magick/Dedupe.cs index 55166eb..a12cfb7 100644 --- a/CodeLegacy/Magick/Dedupe.cs +++ b/CodeLegacy/Magick/Dedupe.cs @@ -271,6 +271,8 @@ namespace Flowframes.Magick string mpDec = FfmpegCommands.GetMpdecimate(wrap: false); // FfmpegCommands.GetMpdecimate((int)FfmpegCommands.MpDecSensitivity.Normal, false); ffmpeg.StartInfo.Arguments = $"{baseCmd} & ffmpeg -loglevel debug -y {videoPath.GetConcStr()} -i {videoPath.Wrap()} -fps_mode vfr -vf {mpDec} -f null NUL 2>&1 | findstr keep_count:"; var ffmpegOutputLines = (await Task.Run(() => OsUtils.GetProcStdOut(ffmpeg, true))).SplitIntoLines(); + ffmpegOutputLines = ffmpegOutputLines.Where(l => l.Contains("keep_count")).Select(l => l.Split(']').Last()).ToArray(); + var test = string.Join("\n", ffmpegOutputLines); var frames = new Dictionary>(); int frameCount = 0; diff --git a/CodeLegacy/Main/Interpolate.cs b/CodeLegacy/Main/Interpolate.cs index 1bc616a..72ad451 100644 --- a/CodeLegacy/Main/Interpolate.cs +++ b/CodeLegacy/Main/Interpolate.cs @@ -294,6 +294,8 @@ namespace Flowframes // } } + IoUtils.TryDeleteIfExists(currentSettings.FullOutPath); // Partial output file might exist + AutoEncode.busy = false; Program.mainForm.Invoke(() => Program.mainForm.SetWorking(false)); Program.mainForm.Invoke(() => Program.mainForm.SetTab(Program.mainForm.interpOptsTab.Name));