From 2526063d1face78df158128611755576981504e2 Mon Sep 17 00:00:00 2001 From: N00MKRAD Date: Fri, 22 Jan 2021 13:31:49 +0100 Subject: [PATCH] minor UI changes, temporarily disabled alpha option --- Code/Forms/SettingsForm.Designer.cs | 149 +++++++++++++++------------- Code/Main/CreateVideo.cs | 4 +- Code/Main/Interpolate.cs | 4 +- 3 files changed, 86 insertions(+), 71 deletions(-) diff --git a/Code/Forms/SettingsForm.Designer.cs b/Code/Forms/SettingsForm.Designer.cs index c38a974..6354208 100644 --- a/Code/Forms/SettingsForm.Designer.cs +++ b/Code/Forms/SettingsForm.Designer.cs @@ -82,6 +82,11 @@ this.keepAudio = new System.Windows.Forms.CheckBox(); this.label1 = new System.Windows.Forms.Label(); this.aiOptsPage = new Cyotek.Windows.Forms.TabListPage(); + this.label35 = new System.Windows.Forms.Label(); + this.panel12 = new System.Windows.Forms.Panel(); + this.dainNcnnTilesize = new System.Windows.Forms.ComboBox(); + this.label27 = new System.Windows.Forms.Label(); + this.label26 = new System.Windows.Forms.Label(); this.ncnnThreads = new System.Windows.Forms.NumericUpDown(); this.label30 = new System.Windows.Forms.Label(); this.panel6 = new System.Windows.Forms.Panel(); @@ -156,11 +161,7 @@ this.cmdDebugMode = new System.Windows.Forms.ComboBox(); this.titleLabel = new System.Windows.Forms.Label(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.label26 = new System.Windows.Forms.Label(); - this.panel12 = new System.Windows.Forms.Panel(); - this.dainNcnnTilesize = new System.Windows.Forms.ComboBox(); - this.label27 = new System.Windows.Forms.Label(); - this.label35 = new System.Windows.Forms.Label(); + this.label42 = new System.Windows.Forms.Label(); this.settingsTabList.SuspendLayout(); this.generalTab.SuspendLayout(); this.tabListPage2.SuspendLayout(); @@ -459,6 +460,7 @@ // tabListPage2 // this.tabListPage2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + this.tabListPage2.Controls.Add(this.label42); this.tabListPage2.Controls.Add(this.label4); this.tabListPage2.Controls.Add(this.enableAlpha); this.tabListPage2.Controls.Add(this.label25); @@ -842,6 +844,68 @@ this.aiOptsPage.Size = new System.Drawing.Size(762, 419); this.aiOptsPage.Text = "AI Specific Settings"; // + // label35 + // + this.label35.AutoSize = true; + this.label35.ForeColor = System.Drawing.Color.Silver; + this.label35.Location = new System.Drawing.Point(412, 261); + this.label35.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label35.Name = "label35"; + this.label35.Size = new System.Drawing.Size(258, 13); + this.label35.TabIndex = 80; + this.label35.Text = "Lower values decrease VRAM usage but also speed."; + // + // panel12 + // + this.panel12.BackgroundImage = global::Flowframes.Properties.Resources.baseline_create_white_18dp_semiTransparent; + this.panel12.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.panel12.Location = new System.Drawing.Point(378, 257); + this.panel12.Name = "panel12"; + this.panel12.Size = new System.Drawing.Size(21, 21); + this.panel12.TabIndex = 78; + this.toolTip1.SetToolTip(this.panel12, "Allows custom input."); + // + // dainNcnnTilesize + // + this.dainNcnnTilesize.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.dainNcnnTilesize.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.dainNcnnTilesize.ForeColor = System.Drawing.Color.White; + this.dainNcnnTilesize.FormattingEnabled = true; + this.dainNcnnTilesize.Items.AddRange(new object[] { + "256", + "384", + "512", + "768", + "1024", + "1536", + "2048"}); + this.dainNcnnTilesize.Location = new System.Drawing.Point(280, 257); + this.dainNcnnTilesize.Margin = new System.Windows.Forms.Padding(3, 3, 8, 3); + this.dainNcnnTilesize.Name = "dainNcnnTilesize"; + this.dainNcnnTilesize.Size = new System.Drawing.Size(87, 21); + this.dainNcnnTilesize.TabIndex = 79; + // + // label27 + // + this.label27.AutoSize = true; + this.label27.Location = new System.Drawing.Point(10, 260); + this.label27.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(93, 13); + this.label27.TabIndex = 77; + this.label27.Text = "Tile Size (Splitting)"; + // + // label26 + // + this.label26.AutoSize = true; + this.label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold); + this.label26.Location = new System.Drawing.Point(10, 230); + this.label26.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(152, 16); + this.label26.TabIndex = 76; + this.label26.Text = "DAIN-NCNN Settings"; + // // ncnnThreads // this.ncnnThreads.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); @@ -1484,8 +1548,8 @@ this.mp4Enc.Items.AddRange(new object[] { "h264 - Fast, good compatibility, medium quality per filesize", "h265 - Slower, mixed compatibility, very good quality per filesize", - "h264 NVENC - GPU-accelerated encoding, worse compression than h264", - "h265 NVENC - GPU-accelerated encoding, worse compression than h265"}); + "h264 NVENC - Fast GPU-accelerated encoding, worse compression than h264", + "h265 NVENC - Fast GPU-accelerated encoding, worse compression than h265"}); this.mp4Enc.Location = new System.Drawing.Point(280, 207); this.mp4Enc.Name = "mp4Enc"; this.mp4Enc.Size = new System.Drawing.Size(400, 21); @@ -1781,67 +1845,17 @@ this.titleLabel.TabIndex = 1; this.titleLabel.Text = "Settings"; // - // label26 + // label42 // - this.label26.AutoSize = true; - this.label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold); - this.label26.Location = new System.Drawing.Point(10, 230); - this.label26.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); - this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(152, 16); - this.label26.TabIndex = 76; - this.label26.Text = "DAIN-NCNN Settings"; - // - // panel12 - // - this.panel12.BackgroundImage = global::Flowframes.Properties.Resources.baseline_create_white_18dp_semiTransparent; - this.panel12.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.panel12.Location = new System.Drawing.Point(378, 257); - this.panel12.Name = "panel12"; - this.panel12.Size = new System.Drawing.Size(21, 21); - this.panel12.TabIndex = 78; - this.toolTip1.SetToolTip(this.panel12, "Allows custom input."); - // - // dainNcnnTilesize - // - this.dainNcnnTilesize.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.dainNcnnTilesize.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.dainNcnnTilesize.ForeColor = System.Drawing.Color.White; - this.dainNcnnTilesize.FormattingEnabled = true; - this.dainNcnnTilesize.Items.AddRange(new object[] { - "256", - "384", - "512", - "768", - "1024", - "1536", - "2048"}); - this.dainNcnnTilesize.Location = new System.Drawing.Point(280, 257); - this.dainNcnnTilesize.Margin = new System.Windows.Forms.Padding(3, 3, 8, 3); - this.dainNcnnTilesize.Name = "dainNcnnTilesize"; - this.dainNcnnTilesize.Size = new System.Drawing.Size(87, 21); - this.dainNcnnTilesize.TabIndex = 79; - // - // label27 - // - this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(10, 260); - this.label27.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); - this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(47, 13); - this.label27.TabIndex = 77; - this.label27.Text = "Tile Size"; - // - // label35 - // - this.label35.AutoSize = true; - this.label35.ForeColor = System.Drawing.Color.Silver; - this.label35.Location = new System.Drawing.Point(412, 261); - this.label35.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); - this.label35.Name = "label35"; - this.label35.Size = new System.Drawing.Size(258, 13); - this.label35.TabIndex = 80; - this.label35.Text = "Lower values decrease VRAM usage but also speed."; + this.label42.AutoSize = true; + this.label42.ForeColor = System.Drawing.Color.Silver; + this.label42.Location = new System.Drawing.Point(277, 70); + this.label42.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label42.Name = "label42"; + this.label42.Size = new System.Drawing.Size(346, 13); + this.label42.TabIndex = 79; + this.label42.Text = "Coming Soon " + + " "; // // SettingsForm // @@ -2014,5 +2028,6 @@ private System.Windows.Forms.ComboBox dainNcnnTilesize; private System.Windows.Forms.Label label27; private System.Windows.Forms.Label label26; + private System.Windows.Forms.Label label42; } } \ No newline at end of file diff --git a/Code/Main/CreateVideo.cs b/Code/Main/CreateVideo.cs index b735a66..6640689 100644 --- a/Code/Main/CreateVideo.cs +++ b/Code/Main/CreateVideo.cs @@ -67,7 +67,7 @@ namespace Flowframes.Main { Program.mainForm.SetStatus("Copying output frames..."); string copyPath = Path.Combine(i.current.outPath, folderName); - Logger.Log($"Copying interpolated frames to '{copyPath}'"); + Logger.Log($"Moving output frames to '{copyPath}'"); IOUtils.TryDeleteIfExists(copyPath); IOUtils.CreateDir(copyPath); Stopwatch sw = new Stopwatch(); @@ -91,7 +91,7 @@ namespace Flowframes.Main if (sw.ElapsedMilliseconds >= 500 || idx == vfrLines.Length) { sw.Restart(); - Logger.Log($"Copying interpolated frames to '{Path.GetFileName(copyPath)}' - {idx}/{vfrLines.Length}", false, true); + Logger.Log($"Moving output frames to '{Path.GetFileName(copyPath)}' - {idx}/{vfrLines.Length}", false, true); await Task.Delay(1); } } diff --git a/Code/Main/Interpolate.cs b/Code/Main/Interpolate.cs index 1575dba..6a265db 100644 --- a/Code/Main/Interpolate.cs +++ b/Code/Main/Interpolate.cs @@ -65,12 +65,12 @@ namespace Flowframes { if (!current.inputIsFrames) // Input is video - extract frames first { - current.alpha = (Config.GetBool("enableAlpha", true) && (Path.GetExtension(current.inPath).ToLower() == ".gif")); + current.alpha = (Config.GetBool("enableAlpha", false) && (Path.GetExtension(current.inPath).ToLower() == ".gif")); await ExtractFrames(current.inPath, current.framesFolder, current.alpha); } else { - current.alpha = (Config.GetBool("enableAlpha", true) && Path.GetExtension(IOUtils.GetFilesSorted(current.inPath).First()).ToLower() == ".gif"); + current.alpha = (Config.GetBool("enableAlpha", false) && Path.GetExtension(IOUtils.GetFilesSorted(current.inPath).First()).ToLower() == ".gif"); await FFmpegCommands.ImportImages(current.inPath, current.framesFolder, current.alpha, await Utils.GetOutputResolution(current.inPath, true)); } }