diff --git a/Code/Data/InterpSettings.cs b/Code/Data/InterpSettings.cs index 707795a..12697a5 100644 --- a/Code/Data/InterpSettings.cs +++ b/Code/Data/InterpSettings.cs @@ -102,6 +102,7 @@ public InterpSettings (string serializedData) _inputResolution = new Size(0, 0); framesExt = ""; interpExt = ""; + Dictionary entries = new Dictionary(); @@ -214,13 +215,18 @@ public void RefreshExtensions(FrameType type = FrameType.Both) if (type == FrameType.Both || type == FrameType.Import) framesExt = (Config.GetBool(Config.Key.jpegFrames) ? ".jpg" : ".png"); - if (type == FrameType.Both || type == FrameType.Interp) - interpExt = (Config.GetBool(Config.Key.jpegInterp) ? ".jpg" : ".png"); + if (type == FrameType.Both || type == FrameType.Interp) { + if (Config.GetString(Config.Key.formatofInterp) == "png") {interpExt = ".png";}; + if (Config.GetString(Config.Key.formatofInterp) == "jpg") {interpExt = ".jpg";}; + if (Config.GetString(Config.Key.formatofInterp) == "bmp") {interpExt = ".bmp";}; + if (Config.GetString(Config.Key.formatofInterp) == "webp") {interpExt = ".webp";}; + } } Logger.Log($"RefreshExtensions - Using '{framesExt}' for imported frames, using '{interpExt}' for interpolated frames", true); } + public string Serialize () { string s = $"INPATH|{inPath}\n"; diff --git a/Code/Extensions/ExtensionMethods.cs b/Code/Extensions/ExtensionMethods.cs index 148c854..21ea043 100644 --- a/Code/Extensions/ExtensionMethods.cs +++ b/Code/Extensions/ExtensionMethods.cs @@ -129,14 +129,25 @@ public static float Clamp(this float i, float min, float max) return i; } - public static string[] SplitIntoLines(this string str) +/* public static string[] SplitIntoLines(this string str) { if (string.IsNullOrWhiteSpace(str)) return new string[0]; return Regex.Split(str, "\r\n|\r|\n"); + }*/ + + public static string[] SplitIntoLines(this string str) + { + if (string.IsNullOrWhiteSpace(str)) + return new string[0]; + + return str.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries); } + + + public static string Trunc(this string inStr, int maxChars, bool addEllipsis = true) { string str = inStr.Length <= maxChars ? inStr : inStr.Substring(0, maxChars); diff --git a/Code/Flowframes.csproj b/Code/Flowframes.csproj index b614300..18a41d3 100644 --- a/Code/Flowframes.csproj +++ b/Code/Flowframes.csproj @@ -70,7 +70,7 @@ bin\x64\Release\ DEBUG;TRACE - false + true pdbonly x64 7.3 @@ -422,6 +422,7 @@ + @@ -493,6 +494,7 @@ BatchForm.cs + Designer BigPreviewForm.cs @@ -547,7 +549,7 @@ False - Microsoft .NET Framework 4.7.2 %28x86 and x64%29 + Microsoft .NET Framework 4.7.2 %28x86 und x64%29 true diff --git a/Code/Forms/Main/Form1.Designer.cs b/Code/Forms/Main/Form1.Designer.cs index 8c0046e..4e01b10 100644 --- a/Code/Forms/Main/Form1.Designer.cs +++ b/Code/Forms/Main/Form1.Designer.cs @@ -89,6 +89,7 @@ private void InitializeComponent() this.label15 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.interpOptsTab = new System.Windows.Forms.TabPage(); + this.htButton2 = new HTAlt.WinForms.HTButton(); this.labelOutput = new System.Windows.Forms.Label(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.comboxOutputFormat = new System.Windows.Forms.ComboBox(); @@ -140,10 +141,11 @@ private void InitializeComponent() this.stepSelector = new System.Windows.Forms.ComboBox(); this.busyControlsPanel = new System.Windows.Forms.Panel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.pauseBtn = new System.Windows.Forms.Button(); this.cancelBtn = new System.Windows.Forms.Button(); + this.pauseBtn = new System.Windows.Forms.Button(); this.menuStripQueue = new System.Windows.Forms.ContextMenuStrip(this.components); this.addCurrentConfigurationToQueueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.textBox1 = new System.Windows.Forms.TextBox(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); @@ -175,12 +177,12 @@ private void InitializeComponent() // titleLabel // this.titleLabel.AutoSize = true; - this.titleLabel.Font = new System.Drawing.Font("Yu Gothic UI", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.titleLabel.Font = new System.Drawing.Font("Yu Gothic UI", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.titleLabel.ForeColor = System.Drawing.Color.White; this.titleLabel.Location = new System.Drawing.Point(12, 9); this.titleLabel.Margin = new System.Windows.Forms.Padding(3, 0, 3, 10); this.titleLabel.Name = "titleLabel"; - this.titleLabel.Size = new System.Drawing.Size(404, 40); + this.titleLabel.Size = new System.Drawing.Size(377, 37); this.titleLabel.TabIndex = 0; this.titleLabel.Text = "Flowframes Video Interpolator"; // @@ -191,9 +193,9 @@ private void InitializeComponent() this.aiModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.aiModel.ForeColor = System.Drawing.Color.White; this.aiModel.FormattingEnabled = true; - this.aiModel.Location = new System.Drawing.Point(281, 126); + this.aiModel.Location = new System.Drawing.Point(235, 125); this.aiModel.Name = "aiModel"; - this.aiModel.Size = new System.Drawing.Size(400, 23); + this.aiModel.Size = new System.Drawing.Size(446, 23); this.aiModel.TabIndex = 25; // // aiCombox @@ -203,9 +205,9 @@ private void InitializeComponent() this.aiCombox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.aiCombox.ForeColor = System.Drawing.Color.White; this.aiCombox.FormattingEnabled = true; - this.aiCombox.Location = new System.Drawing.Point(281, 7); + this.aiCombox.Location = new System.Drawing.Point(235, 7); this.aiCombox.Name = "aiCombox"; - this.aiCombox.Size = new System.Drawing.Size(400, 23); + this.aiCombox.Size = new System.Drawing.Size(446, 23); this.aiCombox.TabIndex = 21; this.aiCombox.SelectedIndexChanged += new System.EventHandler(this.aiCombox_SelectedIndexChanged); // @@ -272,11 +274,11 @@ private void InitializeComponent() // this.fpsInTbox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.fpsInTbox.ForeColor = System.Drawing.Color.White; - this.fpsInTbox.Location = new System.Drawing.Point(281, 97); + this.fpsInTbox.Location = new System.Drawing.Point(235, 97); this.fpsInTbox.MinimumSize = new System.Drawing.Size(4, 21); this.fpsInTbox.Name = "fpsInTbox"; this.fpsInTbox.ReadOnly = true; - this.fpsInTbox.Size = new System.Drawing.Size(100, 23); + this.fpsInTbox.Size = new System.Drawing.Size(146, 23); this.fpsInTbox.TabIndex = 8; this.fpsInTbox.Text = "0"; this.fpsInTbox.TextChanged += new System.EventHandler(this.fpsInTbox_TextChanged); @@ -308,13 +310,12 @@ private void InitializeComponent() // // outputTbox // - this.outputTbox.AllowDrop = true; this.outputTbox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.outputTbox.ForeColor = System.Drawing.Color.White; - this.outputTbox.Location = new System.Drawing.Point(281, 67); + this.outputTbox.Location = new System.Drawing.Point(235, 67); this.outputTbox.MinimumSize = new System.Drawing.Size(4, 21); this.outputTbox.Name = "outputTbox"; - this.outputTbox.Size = new System.Drawing.Size(400, 23); + this.outputTbox.Size = new System.Drawing.Size(446, 23); this.outputTbox.TabIndex = 4; this.outputTbox.DragDrop += new System.Windows.Forms.DragEventHandler(this.outputTbox_DragDrop); this.outputTbox.DragEnter += new System.Windows.Forms.DragEventHandler(this.outputTbox_DragEnter); @@ -324,10 +325,10 @@ private void InitializeComponent() this.inputTbox.AllowDrop = true; this.inputTbox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.inputTbox.ForeColor = System.Drawing.Color.White; - this.inputTbox.Location = new System.Drawing.Point(281, 37); + this.inputTbox.Location = new System.Drawing.Point(235, 37); this.inputTbox.MinimumSize = new System.Drawing.Size(4, 21); this.inputTbox.Name = "inputTbox"; - this.inputTbox.Size = new System.Drawing.Size(400, 23); + this.inputTbox.Size = new System.Drawing.Size(446, 23); this.inputTbox.TabIndex = 2; this.inputTbox.DragDrop += new System.Windows.Forms.DragEventHandler(this.inputTbox_DragDrop); this.inputTbox.DragEnter += new System.Windows.Forms.DragEventHandler(this.inputTbox_DragEnter); @@ -412,14 +413,14 @@ private void InitializeComponent() // // runBtn // - this.runBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.runBtn.Anchor = System.Windows.Forms.AnchorStyles.None; this.runBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); this.runBtn.Enabled = false; this.runBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.runBtn.ForeColor = System.Drawing.Color.White; - this.runBtn.Location = new System.Drawing.Point(12, 418); + this.runBtn.Location = new System.Drawing.Point(4, 357); this.runBtn.Name = "runBtn"; - this.runBtn.Size = new System.Drawing.Size(203, 71); + this.runBtn.Size = new System.Drawing.Size(250, 77); this.runBtn.TabIndex = 2; this.runBtn.Text = "Interpolate!"; this.runBtn.UseVisualStyleBackColor = false; @@ -435,7 +436,7 @@ private void InitializeComponent() this.progressCircle.InnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); this.progressCircle.InnerMargin = 2; this.progressCircle.InnerWidth = -1; - this.progressCircle.Location = new System.Drawing.Point(422, 12); + this.progressCircle.Location = new System.Drawing.Point(423, 6); this.progressCircle.MarqueeAnimationSpeed = 2000; this.progressCircle.Name = "progressCircle"; this.progressCircle.OuterColor = System.Drawing.Color.Gray; @@ -463,13 +464,13 @@ private void InitializeComponent() this.logBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.logBox.Cursor = System.Windows.Forms.Cursors.Arrow; this.logBox.ForeColor = System.Drawing.Color.White; - this.logBox.Location = new System.Drawing.Point(221, 357); + this.logBox.Location = new System.Drawing.Point(260, 321); this.logBox.MinimumSize = new System.Drawing.Size(4, 21); this.logBox.Multiline = true; this.logBox.Name = "logBox"; this.logBox.ReadOnly = true; this.logBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.logBox.Size = new System.Drawing.Size(701, 111); + this.logBox.Size = new System.Drawing.Size(671, 86); this.logBox.TabIndex = 5; this.logBox.TabStop = false; this.logBox.Text = "Welcome to Flowframes!"; @@ -495,16 +496,16 @@ private void InitializeComponent() this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel1.Controls.Add(this.statusLabel); this.panel1.Controls.Add(this.label12); - this.panel1.Location = new System.Drawing.Point(13, 357); + this.panel1.Location = new System.Drawing.Point(4, 321); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(203, 55); + this.panel1.Size = new System.Drawing.Size(250, 30); this.panel1.TabIndex = 6; // // statusLabel // this.statusLabel.AutoSize = true; this.statusLabel.ForeColor = System.Drawing.Color.White; - this.statusLabel.Location = new System.Drawing.Point(8, 30); + this.statusLabel.Location = new System.Drawing.Point(49, 7); this.statusLabel.Margin = new System.Windows.Forms.Padding(8, 0, 3, 0); this.statusLabel.Name = "statusLabel"; this.statusLabel.Size = new System.Drawing.Size(61, 13); @@ -521,7 +522,7 @@ private void InitializeComponent() this.updateBtn.ForeColor = System.Drawing.Color.White; this.updateBtn.ImageIndex = 0; this.updateBtn.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom; - this.updateBtn.Location = new System.Drawing.Point(790, 12); + this.updateBtn.Location = new System.Drawing.Point(790, 6); this.updateBtn.Name = "updateBtn"; this.updateBtn.Size = new System.Drawing.Size(40, 40); this.updateBtn.TabIndex = 41; @@ -539,7 +540,7 @@ private void InitializeComponent() this.queueBtn.ForeColor = System.Drawing.Color.White; this.queueBtn.ImageIndex = 0; this.queueBtn.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom; - this.queueBtn.Location = new System.Drawing.Point(836, 12); + this.queueBtn.Location = new System.Drawing.Point(836, 6); this.queueBtn.Name = "queueBtn"; this.queueBtn.Size = new System.Drawing.Size(40, 40); this.queueBtn.TabIndex = 39; @@ -593,7 +594,7 @@ private void InitializeComponent() this.settingsBtn.ForeColor = System.Drawing.Color.White; this.settingsBtn.ImageIndex = 0; this.settingsBtn.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom; - this.settingsBtn.Location = new System.Drawing.Point(882, 12); + this.settingsBtn.Location = new System.Drawing.Point(882, 6); this.settingsBtn.Name = "settingsBtn"; this.settingsBtn.Size = new System.Drawing.Size(40, 40); this.settingsBtn.TabIndex = 38; @@ -611,7 +612,7 @@ private void InitializeComponent() this.patreonBtn.ForeColor = System.Drawing.Color.White; this.patreonBtn.ImageIndex = 0; this.patreonBtn.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom; - this.patreonBtn.Location = new System.Drawing.Point(606, 12); + this.patreonBtn.Location = new System.Drawing.Point(606, 6); this.patreonBtn.Name = "patreonBtn"; this.patreonBtn.Size = new System.Drawing.Size(40, 40); this.patreonBtn.TabIndex = 37; @@ -629,7 +630,7 @@ private void InitializeComponent() this.paypalBtn.ForeColor = System.Drawing.Color.White; this.paypalBtn.ImageIndex = 0; this.paypalBtn.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom; - this.paypalBtn.Location = new System.Drawing.Point(559, 12); + this.paypalBtn.Location = new System.Drawing.Point(560, 6); this.paypalBtn.Name = "paypalBtn"; this.paypalBtn.Size = new System.Drawing.Size(40, 40); this.paypalBtn.TabIndex = 36; @@ -647,7 +648,7 @@ private void InitializeComponent() this.discordBtn.ForeColor = System.Drawing.Color.White; this.discordBtn.ImageIndex = 0; this.discordBtn.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom; - this.discordBtn.Location = new System.Drawing.Point(652, 12); + this.discordBtn.Location = new System.Drawing.Point(652, 6); this.discordBtn.Name = "discordBtn"; this.discordBtn.Size = new System.Drawing.Size(40, 40); this.discordBtn.TabIndex = 35; @@ -719,7 +720,7 @@ private void InitializeComponent() this.debugBtn.ForeColor = System.Drawing.Color.White; this.debugBtn.ImageIndex = 0; this.debugBtn.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom; - this.debugBtn.Location = new System.Drawing.Point(744, 12); + this.debugBtn.Location = new System.Drawing.Point(744, 9); this.debugBtn.Name = "debugBtn"; this.debugBtn.Size = new System.Drawing.Size(40, 40); this.debugBtn.TabIndex = 75; @@ -753,9 +754,9 @@ private void InitializeComponent() // this.longProgBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.longProgBar.BorderThickness = 0; - this.longProgBar.Location = new System.Drawing.Point(221, 474); + this.longProgBar.Location = new System.Drawing.Point(260, 413); this.longProgBar.Name = "longProgBar"; - this.longProgBar.Size = new System.Drawing.Size(700, 15); + this.longProgBar.Size = new System.Drawing.Size(671, 20); this.longProgBar.TabIndex = 33; // // mainTabControl @@ -774,13 +775,13 @@ private void InitializeComponent() this.mainTabControl.HoverTabButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(82)))), ((int)(((byte)(176)))), ((int)(((byte)(239))))); this.mainTabControl.HoverTabColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(63)))), ((int)(((byte)(70))))); this.mainTabControl.HoverUnselectedTabButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(85)))), ((int)(((byte)(85)))), ((int)(((byte)(85))))); - this.mainTabControl.Location = new System.Drawing.Point(13, 62); + this.mainTabControl.Location = new System.Drawing.Point(4, 52); this.mainTabControl.Name = "mainTabControl"; this.mainTabControl.Padding = new System.Drawing.Point(14, 4); this.mainTabControl.SelectedIndex = 0; this.mainTabControl.SelectedTabButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(151)))), ((int)(((byte)(234))))); this.mainTabControl.SelectedTabColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(122)))), ((int)(((byte)(204))))); - this.mainTabControl.Size = new System.Drawing.Size(909, 289); + this.mainTabControl.Size = new System.Drawing.Size(927, 267); this.mainTabControl.TabIndex = 4; this.mainTabControl.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.mainTabControl.UnderBorderTabLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(67)))), ((int)(((byte)(70))))); @@ -802,7 +803,7 @@ private void InitializeComponent() this.welcomeTab.Location = new System.Drawing.Point(4, 27); this.welcomeTab.Name = "welcomeTab"; this.welcomeTab.Padding = new System.Windows.Forms.Padding(3); - this.welcomeTab.Size = new System.Drawing.Size(901, 258); + this.welcomeTab.Size = new System.Drawing.Size(919, 236); this.welcomeTab.TabIndex = 4; this.welcomeTab.Text = "Welcome"; // @@ -825,10 +826,10 @@ private void InitializeComponent() this.panel8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.panel8.Controls.Add(this.patronsLabel); this.panel8.Controls.Add(this.label21); - this.panel8.Location = new System.Drawing.Point(593, 57); + this.panel8.Location = new System.Drawing.Point(593, 49); this.panel8.Margin = new System.Windows.Forms.Padding(5); this.panel8.Name = "panel8"; - this.panel8.Size = new System.Drawing.Size(300, 193); + this.panel8.Size = new System.Drawing.Size(326, 169); this.panel8.TabIndex = 4; // // patronsLabel @@ -859,11 +860,12 @@ private void InitializeComponent() this.panel6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.panel6.Controls.Add(this.newsLabel); this.panel6.Controls.Add(this.label15); - this.panel6.Location = new System.Drawing.Point(8, 57); + this.panel6.Location = new System.Drawing.Point(8, 49); this.panel6.Margin = new System.Windows.Forms.Padding(5); this.panel6.Name = "panel6"; - this.panel6.Size = new System.Drawing.Size(575, 193); + this.panel6.Size = new System.Drawing.Size(575, 169); this.panel6.TabIndex = 3; + this.panel6.Paint += new System.Windows.Forms.PaintEventHandler(this.panel6_Paint); // // newsLabel // @@ -903,6 +905,7 @@ private void InitializeComponent() // this.interpOptsTab.AllowDrop = true; this.interpOptsTab.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + this.interpOptsTab.Controls.Add(this.htButton2); this.interpOptsTab.Controls.Add(this.labelOutput); this.interpOptsTab.Controls.Add(this.flowLayoutPanel1); this.interpOptsTab.Controls.Add(this.aiInfoBtn); @@ -936,12 +939,26 @@ private void InitializeComponent() this.interpOptsTab.Location = new System.Drawing.Point(4, 27); this.interpOptsTab.Name = "interpOptsTab"; this.interpOptsTab.Padding = new System.Windows.Forms.Padding(3); - this.interpOptsTab.Size = new System.Drawing.Size(901, 258); + this.interpOptsTab.Size = new System.Drawing.Size(919, 236); this.interpOptsTab.TabIndex = 0; this.interpOptsTab.Text = "Interpolation"; this.interpOptsTab.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); this.interpOptsTab.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter); // + // htButton2 + // + this.htButton2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.htButton2.FlatAppearance.BorderSize = 0; + this.htButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.htButton2.ForeColor = System.Drawing.Color.White; + this.htButton2.Location = new System.Drawing.Point(690, 95); + this.htButton2.Name = "htButton2"; + this.htButton2.Size = new System.Drawing.Size(205, 23); + this.htButton2.TabIndex = 81; + this.htButton2.Text = "Reset"; + this.htButton2.UseVisualStyleBackColor = false; + this.htButton2.Click += new System.EventHandler(this.htButton2_Click); + // // labelOutput // this.labelOutput.AutoSize = true; @@ -960,9 +977,9 @@ private void InitializeComponent() this.flowLayoutPanel1.Controls.Add(this.comboxOutputQuality); this.flowLayoutPanel1.Controls.Add(this.textboxOutputQualityCust); this.flowLayoutPanel1.Controls.Add(this.comboxOutputColors); - this.flowLayoutPanel1.Location = new System.Drawing.Point(281, 157); + this.flowLayoutPanel1.Location = new System.Drawing.Point(235, 160); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(614, 23); + this.flowLayoutPanel1.Size = new System.Drawing.Size(449, 23); this.flowLayoutPanel1.TabIndex = 46; // // comboxOutputFormat @@ -984,7 +1001,7 @@ private void InitializeComponent() this.comboxOutputFormat.Location = new System.Drawing.Point(0, 0); this.comboxOutputFormat.Margin = new System.Windows.Forms.Padding(0, 0, 6, 0); this.comboxOutputFormat.Name = "comboxOutputFormat"; - this.comboxOutputFormat.Size = new System.Drawing.Size(75, 23); + this.comboxOutputFormat.Size = new System.Drawing.Size(93, 23); this.comboxOutputFormat.TabIndex = 47; this.comboxOutputFormat.SelectedIndexChanged += new System.EventHandler(this.comboxOutputFormat_SelectedIndexChanged); // @@ -1004,10 +1021,10 @@ private void InitializeComponent() "Animated GIF (Only supports up to 50 FPS)", "Image Sequence (PNG, JPG, WEBP)", "Real-time Interpolation (Video only)"}); - this.comboxOutputEncoder.Location = new System.Drawing.Point(81, 0); + this.comboxOutputEncoder.Location = new System.Drawing.Point(99, 0); this.comboxOutputEncoder.Margin = new System.Windows.Forms.Padding(0, 0, 6, 0); this.comboxOutputEncoder.Name = "comboxOutputEncoder"; - this.comboxOutputEncoder.Size = new System.Drawing.Size(90, 23); + this.comboxOutputEncoder.Size = new System.Drawing.Size(96, 23); this.comboxOutputEncoder.TabIndex = 50; this.comboxOutputEncoder.SelectedIndexChanged += new System.EventHandler(this.comboxOutputEncoder_SelectedIndexChanged); // @@ -1018,7 +1035,7 @@ private void InitializeComponent() this.comboxOutputQuality.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.comboxOutputQuality.ForeColor = System.Drawing.Color.White; this.comboxOutputQuality.FormattingEnabled = true; - this.comboxOutputQuality.Location = new System.Drawing.Point(177, 0); + this.comboxOutputQuality.Location = new System.Drawing.Point(201, 0); this.comboxOutputQuality.Margin = new System.Windows.Forms.Padding(0, 0, 6, 0); this.comboxOutputQuality.Name = "comboxOutputQuality"; this.comboxOutputQuality.Size = new System.Drawing.Size(100, 23); @@ -1030,7 +1047,7 @@ private void InitializeComponent() this.textboxOutputQualityCust.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.textboxOutputQualityCust.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.textboxOutputQualityCust.ForeColor = System.Drawing.Color.White; - this.textboxOutputQualityCust.Location = new System.Drawing.Point(283, 0); + this.textboxOutputQualityCust.Location = new System.Drawing.Point(307, 0); this.textboxOutputQualityCust.Margin = new System.Windows.Forms.Padding(0, 0, 6, 0); this.textboxOutputQualityCust.MaxLength = 3; this.textboxOutputQualityCust.MinimumSize = new System.Drawing.Size(4, 21); @@ -1047,10 +1064,10 @@ private void InitializeComponent() this.comboxOutputColors.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.comboxOutputColors.ForeColor = System.Drawing.Color.White; this.comboxOutputColors.FormattingEnabled = true; - this.comboxOutputColors.Location = new System.Drawing.Point(319, 0); + this.comboxOutputColors.Location = new System.Drawing.Point(343, 0); this.comboxOutputColors.Margin = new System.Windows.Forms.Padding(0); this.comboxOutputColors.Name = "comboxOutputColors"; - this.comboxOutputColors.Size = new System.Drawing.Size(117, 23); + this.comboxOutputColors.Size = new System.Drawing.Size(103, 23); this.comboxOutputColors.TabIndex = 49; // // aiInfoBtn @@ -1088,10 +1105,10 @@ private void InitializeComponent() // this.completionActionPanel.Controls.Add(this.completionAction); this.completionActionPanel.Controls.Add(this.label25); - this.completionActionPanel.Location = new System.Drawing.Point(681, 218); + this.completionActionPanel.Location = new System.Drawing.Point(689, 197); this.completionActionPanel.Margin = new System.Windows.Forms.Padding(0); this.completionActionPanel.Name = "completionActionPanel"; - this.completionActionPanel.Size = new System.Drawing.Size(220, 40); + this.completionActionPanel.Size = new System.Drawing.Size(220, 33); this.completionActionPanel.TabIndex = 42; // // completionAction @@ -1108,7 +1125,7 @@ private void InitializeComponent() "Sleep", "Hibernate", "Shutdown"}); - this.completionAction.Location = new System.Drawing.Point(84, 11); + this.completionAction.Location = new System.Drawing.Point(84, 4); this.completionAction.Name = "completionAction"; this.completionAction.Size = new System.Drawing.Size(130, 23); this.completionAction.TabIndex = 40; @@ -1119,7 +1136,7 @@ private void InitializeComponent() this.label25.AutoSize = true; this.label25.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label25.ForeColor = System.Drawing.Color.Silver; - this.label25.Location = new System.Drawing.Point(10, 15); + this.label25.Location = new System.Drawing.Point(10, 8); this.label25.Margin = new System.Windows.Forms.Padding(8, 0, 3, 0); this.label25.Name = "label25"; this.label25.Size = new System.Drawing.Size(68, 13); @@ -1222,7 +1239,7 @@ private void InitializeComponent() this.quickSettingsTab.Location = new System.Drawing.Point(4, 27); this.quickSettingsTab.Name = "quickSettingsTab"; this.quickSettingsTab.Padding = new System.Windows.Forms.Padding(3); - this.quickSettingsTab.Size = new System.Drawing.Size(901, 258); + this.quickSettingsTab.Size = new System.Drawing.Size(919, 236); this.quickSettingsTab.TabIndex = 1; this.quickSettingsTab.Text = "Quick Settings"; this.quickSettingsTab.Enter += new System.EventHandler(this.LoadQuickSettings); @@ -1578,7 +1595,7 @@ private void InitializeComponent() this.previewTab.Location = new System.Drawing.Point(4, 27); this.previewTab.Margin = new System.Windows.Forms.Padding(0); this.previewTab.Name = "previewTab"; - this.previewTab.Size = new System.Drawing.Size(901, 258); + this.previewTab.Size = new System.Drawing.Size(919, 236); this.previewTab.TabIndex = 3; this.previewTab.Text = "Preview"; // @@ -1602,7 +1619,7 @@ private void InitializeComponent() this.previewPicturebox.Location = new System.Drawing.Point(0, 0); this.previewPicturebox.Margin = new System.Windows.Forms.Padding(0); this.previewPicturebox.Name = "previewPicturebox"; - this.previewPicturebox.Size = new System.Drawing.Size(901, 258); + this.previewPicturebox.Size = new System.Drawing.Size(919, 236); this.previewPicturebox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.previewPicturebox.TabIndex = 0; this.previewPicturebox.TabStop = false; @@ -1615,7 +1632,7 @@ private void InitializeComponent() this.abtTab.Location = new System.Drawing.Point(4, 27); this.abtTab.Name = "abtTab"; this.abtTab.Padding = new System.Windows.Forms.Padding(3); - this.abtTab.Size = new System.Drawing.Size(901, 258); + this.abtTab.Size = new System.Drawing.Size(919, 236); this.abtTab.TabIndex = 2; this.abtTab.Text = "About"; // @@ -1630,7 +1647,7 @@ private void InitializeComponent() this.htButton1.ForeColor = System.Drawing.Color.White; this.htButton1.ImageIndex = 0; this.htButton1.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom; - this.htButton1.Location = new System.Drawing.Point(698, 9); + this.htButton1.Location = new System.Drawing.Point(698, 6); this.htButton1.Name = "htButton1"; this.htButton1.Size = new System.Drawing.Size(40, 40); this.htButton1.TabIndex = 40; @@ -1642,10 +1659,10 @@ private void InitializeComponent() this.runStepBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); this.runStepBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.runStepBtn.ForeColor = System.Drawing.Color.White; - this.runStepBtn.Location = new System.Drawing.Point(12, 442); + this.runStepBtn.Location = new System.Drawing.Point(4, 382); this.runStepBtn.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3); this.runStepBtn.Name = "runStepBtn"; - this.runStepBtn.Size = new System.Drawing.Size(203, 47); + this.runStepBtn.Size = new System.Drawing.Size(250, 52); this.runStepBtn.TabIndex = 42; this.runStepBtn.Text = "Run This Step"; this.runStepBtn.UseVisualStyleBackColor = false; @@ -1664,37 +1681,52 @@ private void InitializeComponent() "2) Run Interpolation", "3) Export", "4) Cleanup & Reset"}); - this.stepSelector.Location = new System.Drawing.Point(12, 418); + this.stepSelector.Location = new System.Drawing.Point(4, 357); this.stepSelector.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0); this.stepSelector.Name = "stepSelector"; - this.stepSelector.Size = new System.Drawing.Size(203, 24); + this.stepSelector.Size = new System.Drawing.Size(250, 24); this.stepSelector.TabIndex = 73; // // busyControlsPanel // this.busyControlsPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); this.busyControlsPanel.Controls.Add(this.tableLayoutPanel1); - this.busyControlsPanel.Location = new System.Drawing.Point(12, 418); + this.busyControlsPanel.Location = new System.Drawing.Point(4, 357); this.busyControlsPanel.Name = "busyControlsPanel"; - this.busyControlsPanel.Size = new System.Drawing.Size(203, 71); + this.busyControlsPanel.Size = new System.Drawing.Size(250, 77); this.busyControlsPanel.TabIndex = 74; this.busyControlsPanel.Visible = false; // // tableLayoutPanel1 // this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 49F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 51F)); - this.tableLayoutPanel1.Controls.Add(this.pauseBtn, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.cancelBtn, 0, 0); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Controls.Add(this.cancelBtn, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.pauseBtn, 0, 0); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(203, 71); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(250, 77); this.tableLayoutPanel1.TabIndex = 0; // + // cancelBtn + // + this.cancelBtn.Anchor = System.Windows.Forms.AnchorStyles.None; + this.cancelBtn.BackgroundImage = global::Flowframes.Properties.Resources.baseline_stop_white_48dp; + this.cancelBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.cancelBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Firebrick; + this.cancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cancelBtn.ForeColor = System.Drawing.Color.Firebrick; + this.cancelBtn.Location = new System.Drawing.Point(136, 9); + this.cancelBtn.Name = "cancelBtn"; + this.cancelBtn.Size = new System.Drawing.Size(103, 59); + this.cancelBtn.TabIndex = 0; + this.cancelBtn.UseVisualStyleBackColor = true; + this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click); + // // pauseBtn // this.pauseBtn.Anchor = System.Windows.Forms.AnchorStyles.None; @@ -1703,29 +1735,14 @@ private void InitializeComponent() this.pauseBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.DarkOrange; this.pauseBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.pauseBtn.ForeColor = System.Drawing.Color.DarkOrange; - this.pauseBtn.Location = new System.Drawing.Point(126, 10); + this.pauseBtn.Location = new System.Drawing.Point(14, 9); this.pauseBtn.Name = "pauseBtn"; - this.pauseBtn.Size = new System.Drawing.Size(50, 50); + this.pauseBtn.Size = new System.Drawing.Size(96, 59); this.pauseBtn.TabIndex = 1; this.pauseBtn.UseVisualStyleBackColor = true; this.pauseBtn.Visible = false; this.pauseBtn.Click += new System.EventHandler(this.pauseBtn_Click); // - // cancelBtn - // - this.cancelBtn.Anchor = System.Windows.Forms.AnchorStyles.None; - this.cancelBtn.BackgroundImage = global::Flowframes.Properties.Resources.baseline_stop_white_48dp; - this.cancelBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.cancelBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Firebrick; - this.cancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cancelBtn.ForeColor = System.Drawing.Color.Firebrick; - this.cancelBtn.Location = new System.Drawing.Point(24, 10); - this.cancelBtn.Name = "cancelBtn"; - this.cancelBtn.Size = new System.Drawing.Size(50, 50); - this.cancelBtn.TabIndex = 0; - this.cancelBtn.UseVisualStyleBackColor = true; - this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click); - // // menuStripQueue // this.menuStripQueue.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -1740,18 +1757,35 @@ private void InitializeComponent() this.addCurrentConfigurationToQueueToolStripMenuItem.Text = "Add Current Configuration to Queue"; this.addCurrentConfigurationToQueueToolStripMenuItem.Click += new System.EventHandler(this.addCurrentConfigurationToQueueToolStripMenuItem_Click); // + // textBox1 + // + this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.textBox1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.textBox1.ForeColor = System.Drawing.Color.White; + this.textBox1.Location = new System.Drawing.Point(4, 440); + this.textBox1.MinimumSize = new System.Drawing.Size(4, 21); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(927, 24); + this.textBox1.TabIndex = 76; + this.textBox1.TabStop = false; + this.textBox1.Text = " Status: Calculating performance metrics!"; + this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); + // // Form1 // this.AllowDrop = true; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 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, 466); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.runBtn); + this.Controls.Add(this.runStepBtn); this.Controls.Add(this.debugBtn); this.Controls.Add(this.busyControlsPanel); - this.Controls.Add(this.runBtn); this.Controls.Add(this.stepSelector); - this.Controls.Add(this.runStepBtn); this.Controls.Add(this.updateBtn); this.Controls.Add(this.htButton1); this.Controls.Add(this.queueBtn); @@ -1919,20 +1953,22 @@ private void InitializeComponent() private System.Windows.Forms.ComboBox outSpeedCombox; private System.Windows.Forms.PictureBox pictureBox5; private HTAlt.WinForms.HTButton aiInfoBtn; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - public System.Windows.Forms.ComboBox comboxOutputFormat; - public System.Windows.Forms.ComboBox comboxOutputColors; - public System.Windows.Forms.ComboBox comboxOutputEncoder; - public System.Windows.Forms.ComboBox comboxOutputQuality; private System.Windows.Forms.Label labelOutput; private System.Windows.Forms.ContextMenuStrip menuStripQueue; private System.Windows.Forms.ToolStripMenuItem addCurrentConfigurationToQueueToolStripMenuItem; - private System.Windows.Forms.TextBox textboxOutputQualityCust; public System.Windows.Forms.TabPage interpOptsTab; public System.Windows.Forms.TabPage quickSettingsTab; public System.Windows.Forms.TabPage abtTab; public System.Windows.Forms.TabPage previewTab; public System.Windows.Forms.TabPage welcomeTab; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + public System.Windows.Forms.ComboBox comboxOutputFormat; + public System.Windows.Forms.ComboBox comboxOutputEncoder; + public System.Windows.Forms.ComboBox comboxOutputQuality; + private System.Windows.Forms.TextBox textboxOutputQualityCust; + public System.Windows.Forms.ComboBox comboxOutputColors; + private HTAlt.WinForms.HTButton htButton2; } } diff --git a/Code/Forms/Main/Form1.cs b/Code/Forms/Main/Form1.cs index 74c27ae..55ef544 100644 --- a/Code/Forms/Main/Form1.cs +++ b/Code/Forms/Main/Form1.cs @@ -17,6 +17,19 @@ using System.Threading.Tasks; using System.Linq; using System.Runtime.InteropServices; +using static WinFormAnimation.AnimationFunctions; +using System.Management; +using System.Timers; +using System.Media; +using System.Windows.Controls.Primitives; +using Flowframes.Properties; +using Win32Interop.Enums; +using Flowframes.Forms.Main; +using Flowframes.Media; +using System.Threading; +using DiskDetector.Models; +using System.Runtime.Remoting.Lifetime; +using NvAPIWrapper.GPU; #pragma warning disable IDE1006 @@ -44,8 +57,209 @@ private async void Form1_Load(object sender, EventArgs e) AutoScaleMode = AutoScaleMode.None; } + public string ShowTotalPerformance(int sleeptime) + { + const int byteToHigherOrder = 1024 * 1024; + const int byteToHighestOrder = 1024 * 1024 * 1024; + int timeToSleep = sleeptime; + + string getCurrentCpuUsage(){ + try + { + PerformanceCounter cpuCounter; + cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total"); + cpuCounter.NextValue(); + System.Threading.Thread.Sleep(timeToSleep); + return "CPU:" + cpuCounter.NextValue().RoundToInt() + "%"; + } + catch (Exception ex) { return "CPU: ERROR"; } + } + + string getCurrentRamUsage(){ + try{ + PerformanceCounter ramCounter; + ramCounter = new PerformanceCounter("Memory", "Available MBytes"); + System.Threading.Thread.Sleep(timeToSleep); + float totalram = new Microsoft.VisualBasic.Devices.ComputerInfo().TotalPhysicalMemory; + float totalrambeautiful = (totalram/(byteToHigherOrder)); + float availableram = (ramCounter.NextValue()); + float usedram = (totalrambeautiful - availableram)/1024; + string usedramtext = String.Format("{0:0.00}", usedram); + float usedrampercent = (usedram / totalrambeautiful)* 1024 * 100; + string beautifulpercent = String.Format("{0:0.00}", usedrampercent); + return "RAM:" + usedramtext + " GB (" + beautifulpercent + "% used RAM)"; + } + catch (Exception ex){return "RAM: ERROR";} + } + + string GetCudaUsage() + { + try + { + var category = new PerformanceCounterCategory("GPU Engine"); + var counterNames = category.GetInstanceNames(); + var gpuCounters = new List(); + var result = 0f; + + foreach (string counterName in counterNames) + { + if (counterName.EndsWith("engtype_Cuda")) + { + foreach (PerformanceCounter counter in category.GetCounters(counterName)) + { + if (counter.CounterName == "Utilization Percentage") + { + gpuCounters.Add(counter); + } + } + } + } + + gpuCounters.ForEach(x => + { + _ = x.NextValue(); + }); + + System.Threading.Thread.Sleep(timeToSleep); + + gpuCounters.ForEach(x => + { + result += x.NextValue(); + }); + string beautifulpercent = String.Format("{0:0.00}", result); + return "CUDA: " + beautifulpercent + "%"; + } + catch + { + return "CUDA: ERROR"; + } + } + + string GetCudaRamUsage() + { + try + { + var category = new PerformanceCounterCategory("GPU Process Memory"); + var counterNames = category.GetInstanceNames(); + var gpuCounters = new List(); + var result = 0f; + foreach (string counterName in counterNames) { + if (counterName.EndsWith("phys_0")) + { + foreach (PerformanceCounter counter in category.GetCounters(counterName)) + { + if (counter.CounterName == "Dedicated Usage") + { + gpuCounters.Add(counter); + } + } + } + } + + gpuCounters.ForEach(x => + { + _ = x.NextValue(); + }); + + System.Threading.Thread.Sleep(timeToSleep); + gpuCounters.ForEach(x => + { + result += x.NextValue(); + }); + string beautifulresult = String.Format("{0:0.00}", (result/(byteToHighestOrder))); + return "GPU RAM: " + beautifulresult + " GB VRAM"; + } + catch + { + return "GPU RAM: ERROR"; + } + } + + string DiskUsageSpeed() + { + try + { + PerformanceCounter avgReadDisk; + PerformanceCounter avgReadWrite; + avgReadDisk = new PerformanceCounter("PhysicalDisk", "Disk Read Bytes/sec", "_Total"); + avgReadWrite = new PerformanceCounter("PhysicalDisk", "Disk Write Bytes/sec", "_Total"); + avgReadDisk.NextValue(); + avgReadWrite.NextValue(); + System.Threading.Thread.Sleep(timeToSleep/5); + float speed1 = avgReadDisk.NextValue() + avgReadWrite.NextValue(); + int speed5 = speed1.RoundToInt(); + + string diskreadwrite = "Disk Speed:" + speed5 / byteToHigherOrder + " MB/S"; + return diskreadwrite.ToString(); + } + catch (Exception ex){ return "Disk Speed: ERROR";} + } + + string GetCPUTemp() + { + try + { + string[] thermalZones = new PerformanceCounterCategory("Thermal Zone Information").GetInstanceNames(); + foreach (string thermalZone in thermalZones) + { + if (thermalZone.StartsWith(@"\_TZ.TZ")) + { + PerformanceCounter avgCPUTemp = new PerformanceCounter("Thermal Zone Information", "Temperature", thermalZone); + avgCPUTemp.NextValue(); + System.Threading.Thread.Sleep(timeToSleep / 5); + float temp1 = avgCPUTemp.NextValue(); + double v = (temp1 - 273.15); + float temp2 = (float)v; + int temp3 = temp2.RoundToInt(); + string avgCPUTempBeautiful = "CPU Temp:" + temp3 + " °C"; + return avgCPUTempBeautiful.ToString(); + } + } + } + catch (Exception ex) { return "CPU Temp: ERROR"; } + return "No Thermal Zone Found"; + } + + string GetGPUTemp() + { + try + { + + PhysicalGPU[] gpus = PhysicalGPU.GetPhysicalGPUs(); + foreach (PhysicalGPU gpu in gpus) + { + Console.WriteLine(gpu.FullName); + foreach (GPUThermalSensor sensor in gpu.ThermalInformation.ThermalSensors) + { + return "GPU Temp: " + sensor.CurrentTemperature + " °C"; + } + } + return "GPU Temp: ERROR"; + } + catch (Exception ex) { return "GPU Temp: ERROR"; } + } + + string performancecounter =" Status: " + getCurrentCpuUsage() + " | " + getCurrentRamUsage() + " | " + GetCudaUsage() + " | " + GetCudaRamUsage() + " | " + DiskUsageSpeed() + " | " + GetCPUTemp() + " | " + GetGPUTemp(); + //Console.WriteLine(performancecounter); + return textBox1.Text = performancecounter ; + } + + private async Task BackgroundTaskExecuter() + { + await Task.Run(() => + { + while (true) { + System.Threading.Thread.Sleep(2000); + ShowTotalPerformance(125); + } + }); + } + private async void Form1_Shown(object sender, EventArgs e) { + + BackgroundTaskExecuter(); + Refresh(); await Task.Delay(1); @@ -282,9 +496,83 @@ public void UpdateInputInfo() inputInfo.Text = str; } + public void Reset() + { + ResetAi((Config.GetString(Config.Key.lastUsedAiName))); + ResetTextBoxes(); + LoadOutputSettings(); + } + + public void ResetTextBoxes() + { + inputTbox.Text = ""; + outputTbox.Text = ""; + fpsInTbox.Text = "0"; + interpFactorCombox.SelectedIndex = 0; + fpsOutTbox.Text = "0 FPS"; + outSpeedCombox.SelectedIndex = 0; + } + + public void ResetAi(string lastusedAI) + { + string lastUsedAiName = lastusedAI; + aiCombox.SelectedIndex = Implementations.NetworksAvailable.IndexOf(Implementations.NetworksAvailable.Where(x => x.NameInternal == lastUsedAiName).FirstOrDefault()); + if (aiCombox.SelectedIndex < 0) aiCombox.SelectedIndex = 0; + Config.Set(Config.Key.lastUsedAiName, GetAi().NameInternal); + } + + public void playSystemSound() + { + string selectedVariable = (Config.GetString(Config.Key.systemSoundActivated)); + + switch (selectedVariable) + { + case "None": + Console.WriteLine("None system sound will be played."); + break; + + case "Asterisk": + SystemSounds.Asterisk.Play(); + break; + + case "Beep": + SystemSounds.Beep.Play(); + break; + + case "Exclamation": + SystemSounds.Exclamation.Play(); + break; + + case "Hand": + SystemSounds.Hand.Play(); + break; + + case "Question": + SystemSounds.Question.Play(); + break; + + case "Custom": + try { + System.Media.SoundPlayer player = new System.Media.SoundPlayer(Config.GetString(Config.Key.playSoundCustom)); + player.Play(); + } + + catch { + Console.WriteLine("Not a valid system sound."); + } + break; + + default: + Console.WriteLine("None system sound will be played."); + break; + } + } + public void InterpolationDone() { SetStatus("Done interpolating!"); + playSystemSound(); + if (!BatchProcessing.busy) CompletionAction(); @@ -327,6 +615,8 @@ void InitAis() aiCombox.Items.Add(GetAiComboboxName(ai)); string lastUsedAiName = Config.Get(Config.Key.lastUsedAiName); + + lastUsedAiName = Config.Get(Config.Key.lastUsedAiName); aiCombox.SelectedIndex = Implementations.NetworksAvailable.IndexOf(Implementations.NetworksAvailable.Where(x => x.NameInternal == lastUsedAiName).FirstOrDefault()); if (aiCombox.SelectedIndex < 0) aiCombox.SelectedIndex = 0; Config.Set(Config.Key.lastUsedAiName, GetAi().NameInternal); @@ -414,7 +704,7 @@ private void SaveOutputSettings () Config.Set(Config.Key.lastOutputSettings, string.Join(",", strings)); } - private void LoadOutputSettings() + public void LoadOutputSettings() { string[] strings = Config.Get(Config.Key.lastOutputSettings).Split(','); @@ -649,7 +939,6 @@ private void previewPicturebox_MouseClick(object sender, MouseEventArgs e) InterpolationProgress.bigPreviewForm.SetImage(previewPicturebox.Image); } } - private async void updateBtn_Click(object sender, EventArgs e) { new UpdaterForm().ShowDialog(); @@ -698,7 +987,6 @@ private void trimCombox_SelectedIndexChanged(object sender, EventArgs e) trimEndBox.Text = FormatUtils.MsToTimestamp(currInDuration); } } - private void trimResetBtn_Click(object sender, EventArgs e) { trimCombox_SelectedIndexChanged(null, null); @@ -772,7 +1060,17 @@ private void fpsOutTbox_Leave(object sender, EventArgs e) { float inFps = fpsInTbox.GetFloat(); float outFps = fpsOutTbox.GetFloat(); - var targetFactorRounded = Math.Round((Decimal)(outFps / inFps), 3, MidpointRounding.AwayFromZero); + decimal targetFactorRounded = 0; + if (targetFactorRounded == 0) + { + targetFactorRounded = 0; + } + + else + { + targetFactorRounded = Math.Round((Decimal)(outFps / inFps), 3, MidpointRounding.AwayFromZero); + } + interpFactorCombox.Text = $"{targetFactorRounded}"; ValidateFactor(); fpsOutTbox.Text = $"{inFps * interpFactorCombox.GetFloat()} FPS"; @@ -823,5 +1121,20 @@ private void comboxOutputQuality_SelectedIndexChanged(object sender, EventArgs e Refresh(); } + + private void textBox1_TextChanged(object sender, EventArgs e) + { + + } + + public void htButton2_Click(object sender, EventArgs e) + { + Reset(); + } + + private void panel6_Paint(object sender, PaintEventArgs e) + { + + } } } \ No newline at end of file diff --git a/Code/Forms/Main/Form1.resx b/Code/Forms/Main/Form1.resx index fda6c50..678e11b 100644 --- a/Code/Forms/Main/Form1.resx +++ b/Code/Forms/Main/Form1.resx @@ -143,6 +143,9 @@ Based on: 500, 17 + + 25 + diff --git a/Code/Forms/SettingsForm.Designer.cs b/Code/Forms/SettingsForm.Designer.cs index f474a1a..0a4230a 100644 --- a/Code/Forms/SettingsForm.Designer.cs +++ b/Code/Forms/SettingsForm.Designer.cs @@ -1,4 +1,6 @@ -namespace Flowframes.Forms +using Flowframes.IO; + +namespace Flowframes.Forms { partial class SettingsForm { @@ -32,6 +34,16 @@ private void InitializeComponent() System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm)); this.settingsTabList = new Cyotek.Windows.Forms.TabList(); this.generalTab = new Cyotek.Windows.Forms.TabListPage(); + this.htButton8 = new HTAlt.WinForms.HTButton(); + this.htButton7 = new HTAlt.WinForms.HTButton(); + this.htButton6 = new HTAlt.WinForms.HTButton(); + this.htButton5 = new HTAlt.WinForms.HTButton(); + this.label42 = new System.Windows.Forms.Label(); + this.htButton4 = new HTAlt.WinForms.HTButton(); + this.htButton3 = new HTAlt.WinForms.HTButton(); + this.htButton2 = new HTAlt.WinForms.HTButton(); + this.htButton1 = new HTAlt.WinForms.HTButton(); + this.label40 = new System.Windows.Forms.Label(); this.custOutDirBrowseBtn = new HTAlt.WinForms.HTButton(); this.custOutDir = new System.Windows.Forms.TextBox(); this.outFolderLoc = new System.Windows.Forms.ComboBox(); @@ -61,6 +73,13 @@ private void InitializeComponent() this.maxVidHeight = new System.Windows.Forms.ComboBox(); this.label31 = new System.Windows.Forms.Label(); this.tabListPage2 = new Cyotek.Windows.Forms.TabListPage(); + this.formatofInterp = new System.Windows.Forms.ComboBox(); + this.label13 = new System.Windows.Forms.Label(); + this.intelQSVDecode = new System.Windows.Forms.CheckBox(); + this.label12 = new System.Windows.Forms.Label(); + this.mpdecimateMode = new System.Windows.Forms.ComboBox(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); this.autoEncBlockPanel = new System.Windows.Forms.Panel(); this.label70 = new System.Windows.Forms.Label(); this.alwaysWaitForAutoEnc = new System.Windows.Forms.CheckBox(); @@ -92,9 +111,8 @@ private void InitializeComponent() this.scnDetect = new System.Windows.Forms.CheckBox(); this.label50 = new System.Windows.Forms.Label(); this.mpDedupePanel = new System.Windows.Forms.Panel(); - this.mpdecimateMode = new System.Windows.Forms.ComboBox(); - this.magickDedupePanel = new System.Windows.Forms.Panel(); this.dedupThresh = new System.Windows.Forms.NumericUpDown(); + this.magickDedupePanel = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); this.label24 = new System.Windows.Forms.Label(); this.enableLoop = new System.Windows.Forms.CheckBox(); @@ -104,6 +122,13 @@ private void InitializeComponent() this.keepAudio = new System.Windows.Forms.CheckBox(); this.label1 = new System.Windows.Forms.Label(); this.aiOptsPage = new Cyotek.Windows.Forms.TabListPage(); + this.label38 = new System.Windows.Forms.Label(); + this.label37 = new System.Windows.Forms.Label(); + this.wthreads = new System.Windows.Forms.NumericUpDown(); + this.label23 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.rifeCudaBufferSize = new System.Windows.Forms.NumericUpDown(); + this.label17 = new System.Windows.Forms.Label(); this.label66 = new System.Windows.Forms.Label(); this.rifeCudaFp16 = new System.Windows.Forms.CheckBox(); this.label65 = new System.Windows.Forms.Label(); @@ -128,6 +153,10 @@ private void InitializeComponent() this.label5 = new System.Windows.Forms.Label(); this.label32 = new System.Windows.Forms.Label(); this.vidExportTab = new Cyotek.Windows.Forms.TabListPage(); + this.playSoundCustomBtn = new System.Windows.Forms.Button(); + this.playSoundCustom = new System.Windows.Forms.TextBox(); + this.systemSoundActivated = new System.Windows.Forms.ComboBox(); + this.label14 = new System.Windows.Forms.Label(); this.label73 = new System.Windows.Forms.Label(); this.fixOutputDuration = new System.Windows.Forms.CheckBox(); this.label72 = new System.Windows.Forms.Label(); @@ -164,9 +193,11 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.scnDetectValue)).BeginInit(); this.mpDedupePanel.SuspendLayout(); - this.magickDedupePanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dedupThresh)).BeginInit(); + this.magickDedupePanel.SuspendLayout(); this.aiOptsPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.wthreads)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.rifeCudaBufferSize)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ncnnThreads)).BeginInit(); this.vidExportTab.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.minOutVidLength)).BeginInit(); @@ -185,14 +216,24 @@ private void InitializeComponent() this.settingsTabList.Controls.Add(this.vidExportTab); this.settingsTabList.Controls.Add(this.debugTab); this.settingsTabList.ForeColor = System.Drawing.Color.DodgerBlue; - this.settingsTabList.Location = new System.Drawing.Point(12, 62); + this.settingsTabList.Location = new System.Drawing.Point(12, 40); this.settingsTabList.Name = "settingsTabList"; - this.settingsTabList.Size = new System.Drawing.Size(920, 427); + this.settingsTabList.Size = new System.Drawing.Size(920, 520); this.settingsTabList.TabIndex = 0; // // generalTab // this.generalTab.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + this.generalTab.Controls.Add(this.htButton8); + this.generalTab.Controls.Add(this.htButton7); + this.generalTab.Controls.Add(this.htButton6); + this.generalTab.Controls.Add(this.htButton5); + this.generalTab.Controls.Add(this.label42); + this.generalTab.Controls.Add(this.htButton4); + this.generalTab.Controls.Add(this.htButton3); + this.generalTab.Controls.Add(this.htButton2); + this.generalTab.Controls.Add(this.htButton1); + this.generalTab.Controls.Add(this.label40); this.generalTab.Controls.Add(this.custOutDirBrowseBtn); this.generalTab.Controls.Add(this.custOutDir); this.generalTab.Controls.Add(this.outFolderLoc); @@ -223,15 +264,164 @@ private void InitializeComponent() this.generalTab.Controls.Add(this.label31); this.generalTab.ForeColor = System.Drawing.Color.White; this.generalTab.Name = "generalTab"; - this.generalTab.Size = new System.Drawing.Size(762, 419); + this.generalTab.Size = new System.Drawing.Size(762, 512); this.generalTab.Text = "Application"; // + // htButton8 + // + this.htButton8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.htButton8.FlatAppearance.BorderSize = 0; + this.htButton8.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.htButton8.ForeColor = System.Drawing.Color.White; + this.htButton8.Location = new System.Drawing.Point(542, 316); + this.htButton8.Name = "htButton8"; + this.htButton8.Size = new System.Drawing.Size(98, 23); + this.htButton8.TabIndex = 103; + this.htButton8.Text = "Save Disk space"; + this.toolTip1.SetToolTip(this.htButton8, "Optimal Settings for people who will take Quality\r\nover Performance, but more rad" + + "ical and this might\r\nget your drive full very easily. An uncompressed \r\nmovie up" + + "scaled will literrally take 1TB alone\r\n"); + this.htButton8.UseVisualStyleBackColor = false; + this.htButton8.Click += new System.EventHandler(this.htButton8_Click); + // + // htButton7 + // + this.htButton7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.htButton7.FlatAppearance.BorderSize = 0; + this.htButton7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.htButton7.ForeColor = System.Drawing.Color.White; + this.htButton7.Location = new System.Drawing.Point(450, 316); + this.htButton7.Name = "htButton7"; + this.htButton7.Size = new System.Drawing.Size(87, 23); + this.htButton7.TabIndex = 102; + this.htButton7.Text = "Super Purist"; + this.toolTip1.SetToolTip(this.htButton7, "Optimal Settings for people who will take Quality\r\nover Performance, but more rad" + + "ical and this might\r\nget your drive full very easily. An uncompressed \r\nmovie up" + + "scaled will literrally take 1TB alone\r\n"); + this.htButton7.UseVisualStyleBackColor = false; + this.htButton7.Click += new System.EventHandler(this.htButton7_Click); + // + // htButton6 + // + this.htButton6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.htButton6.FlatAppearance.BorderSize = 0; + this.htButton6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.htButton6.ForeColor = System.Drawing.Color.White; + this.htButton6.Location = new System.Drawing.Point(357, 316); + this.htButton6.Name = "htButton6"; + this.htButton6.Size = new System.Drawing.Size(87, 23); + this.htButton6.TabIndex = 101; + this.htButton6.Text = "Purist"; + this.toolTip1.SetToolTip(this.htButton6, "Optimal Settings for people who will take Quality\r\nover Performance. This might g" + + "et your drive\r\nfilled in very fast."); + this.htButton6.UseVisualStyleBackColor = false; + this.htButton6.Click += new System.EventHandler(this.htButton6_Click); + // + // htButton5 + // + this.htButton5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.htButton5.FlatAppearance.BorderSize = 0; + this.htButton5.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.htButton5.ForeColor = System.Drawing.Color.White; + this.htButton5.Location = new System.Drawing.Point(264, 316); + this.htButton5.Name = "htButton5"; + this.htButton5.Size = new System.Drawing.Size(87, 23); + this.htButton5.TabIndex = 100; + this.htButton5.Text = "Normal"; + this.toolTip1.SetToolTip(this.htButton5, "Optimal Settings for this CPU/GPU Setup.\r\nThis is the same as if you reset the ap" + + "plication."); + this.htButton5.UseVisualStyleBackColor = false; + this.htButton5.Click += new System.EventHandler(this.htButton5_Click); + // + // label42 + // + this.label42.AutoSize = true; + this.label42.Location = new System.Drawing.Point(10, 321); + this.label42.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label42.Name = "label42"; + this.label42.Size = new System.Drawing.Size(77, 13); + this.label42.TabIndex = 99; + this.label42.Text = "Quality Presets"; + // + // htButton4 + // + this.htButton4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.htButton4.FlatAppearance.BorderSize = 0; + this.htButton4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.htButton4.ForeColor = System.Drawing.Color.White; + this.htButton4.Location = new System.Drawing.Point(543, 276); + this.htButton4.Name = "htButton4"; + this.htButton4.Size = new System.Drawing.Size(98, 23); + this.htButton4.TabIndex = 98; + this.htButton4.Text = "Intel/Intel"; + this.toolTip1.SetToolTip(this.htButton4, "Optimal Settings for this CPU/GPU Setup.\r\nHowever Intel QSV is assumed to be enab" + + "led.\r\nThis will use RIFE CUDA but in CPU mode, since\r\nIntel IGPUS have no compat" + + "ibility with CUDA or NCNN."); + this.htButton4.UseVisualStyleBackColor = false; + this.htButton4.Click += new System.EventHandler(this.htButton4_Click); + // + // htButton3 + // + this.htButton3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.htButton3.FlatAppearance.BorderSize = 0; + this.htButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.htButton3.ForeColor = System.Drawing.Color.White; + this.htButton3.Location = new System.Drawing.Point(450, 276); + this.htButton3.Name = "htButton3"; + this.htButton3.Size = new System.Drawing.Size(87, 23); + this.htButton3.TabIndex = 97; + this.htButton3.Text = "AMD/AMD"; + this.toolTip1.SetToolTip(this.htButton3, "Optimal Settings for this CPU/GPU Setup."); + this.htButton3.UseVisualStyleBackColor = false; + this.htButton3.Click += new System.EventHandler(this.htButton3_Click); + // + // htButton2 + // + this.htButton2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.htButton2.FlatAppearance.BorderSize = 0; + this.htButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.htButton2.ForeColor = System.Drawing.Color.White; + this.htButton2.Location = new System.Drawing.Point(357, 276); + this.htButton2.Name = "htButton2"; + this.htButton2.Size = new System.Drawing.Size(87, 23); + this.htButton2.TabIndex = 96; + this.htButton2.Text = "AMD/Nvidia"; + this.toolTip1.SetToolTip(this.htButton2, "Optimal Settings for this CPU/GPU Setup."); + this.htButton2.UseVisualStyleBackColor = false; + this.htButton2.Click += new System.EventHandler(this.htButton2_Click); + // + // htButton1 + // + this.htButton1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.htButton1.FlatAppearance.BorderSize = 0; + this.htButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.htButton1.ForeColor = System.Drawing.Color.White; + this.htButton1.Location = new System.Drawing.Point(264, 276); + this.htButton1.Name = "htButton1"; + this.htButton1.Size = new System.Drawing.Size(87, 23); + this.htButton1.TabIndex = 95; + this.htButton1.Text = "Intel/Nvidia"; + this.toolTip1.SetToolTip(this.htButton1, "Optimal Settings for this CPU/GPU Setup.\r\nHowever Intel QSV is assumed to be enab" + + "led."); + this.htButton1.UseVisualStyleBackColor = false; + this.htButton1.Click += new System.EventHandler(this.htButton1_Click); + // + // label40 + // + this.label40.AutoSize = true; + this.label40.Location = new System.Drawing.Point(10, 281); + this.label40.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label40.Name = "label40"; + this.label40.Size = new System.Drawing.Size(105, 13); + this.label40.TabIndex = 94; + this.label40.Text = "Performance Presets"; + // // custOutDirBrowseBtn // this.custOutDirBrowseBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.custOutDirBrowseBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.custOutDirBrowseBtn.ForeColor = System.Drawing.Color.White; - this.custOutDirBrowseBtn.Location = new System.Drawing.Point(704, 95); + this.custOutDirBrowseBtn.Location = new System.Drawing.Point(688, 95); this.custOutDirBrowseBtn.Name = "custOutDirBrowseBtn"; this.custOutDirBrowseBtn.Size = new System.Drawing.Size(55, 23); this.custOutDirBrowseBtn.TabIndex = 93; @@ -243,7 +433,7 @@ private void InitializeComponent() // this.custOutDir.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.custOutDir.ForeColor = System.Drawing.Color.White; - this.custOutDir.Location = new System.Drawing.Point(486, 97); + this.custOutDir.Location = new System.Drawing.Point(470, 97); this.custOutDir.MinimumSize = new System.Drawing.Size(4, 21); this.custOutDir.Name = "custOutDir"; this.custOutDir.Size = new System.Drawing.Size(212, 20); @@ -259,7 +449,7 @@ private void InitializeComponent() this.outFolderLoc.Items.AddRange(new object[] { "Same As Input Directory", "Custom..."}); - this.outFolderLoc.Location = new System.Drawing.Point(280, 97); + this.outFolderLoc.Location = new System.Drawing.Point(264, 97); this.outFolderLoc.Name = "outFolderLoc"; this.outFolderLoc.Size = new System.Drawing.Size(200, 21); this.outFolderLoc.TabIndex = 91; @@ -279,7 +469,7 @@ private void InitializeComponent() // this.label77.AutoSize = true; this.label77.ForeColor = System.Drawing.Color.Silver; - this.label77.Location = new System.Drawing.Point(308, 190); + this.label77.Location = new System.Drawing.Point(292, 190); this.label77.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label77.Name = "label77"; this.label77.Size = new System.Drawing.Size(270, 13); @@ -289,7 +479,7 @@ private void InitializeComponent() // disablePreview // this.disablePreview.AutoSize = true; - this.disablePreview.Location = new System.Drawing.Point(280, 190); + this.disablePreview.Location = new System.Drawing.Point(264, 190); this.disablePreview.Name = "disablePreview"; this.disablePreview.Size = new System.Drawing.Size(15, 14); this.disablePreview.TabIndex = 88; @@ -311,7 +501,7 @@ private void InitializeComponent() this.modelDownloaderBtn.FlatAppearance.BorderSize = 0; this.modelDownloaderBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.modelDownloaderBtn.ForeColor = System.Drawing.Color.White; - this.modelDownloaderBtn.Location = new System.Drawing.Point(492, 215); + this.modelDownloaderBtn.Location = new System.Drawing.Point(476, 215); this.modelDownloaderBtn.Name = "modelDownloaderBtn"; this.modelDownloaderBtn.Size = new System.Drawing.Size(206, 23); this.modelDownloaderBtn.TabIndex = 86; @@ -323,7 +513,7 @@ private void InitializeComponent() // this.exportNamePatternLoop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.exportNamePatternLoop.ForeColor = System.Drawing.Color.White; - this.exportNamePatternLoop.Location = new System.Drawing.Point(624, 157); + this.exportNamePatternLoop.Location = new System.Drawing.Point(608, 157); this.exportNamePatternLoop.MinimumSize = new System.Drawing.Size(4, 21); this.exportNamePatternLoop.Name = "exportNamePatternLoop"; this.exportNamePatternLoop.Size = new System.Drawing.Size(100, 20); @@ -332,7 +522,7 @@ private void InitializeComponent() // label69 // this.label69.AutoSize = true; - this.label69.Location = new System.Drawing.Point(555, 160); + this.label69.Location = new System.Drawing.Point(539, 160); this.label69.Margin = new System.Windows.Forms.Padding(3, 10, 3, 7); this.label69.Name = "label69"; this.label69.Size = new System.Drawing.Size(63, 13); @@ -342,7 +532,7 @@ private void InitializeComponent() // label68 // this.label68.AutoSize = true; - this.label68.Location = new System.Drawing.Point(277, 160); + this.label68.Location = new System.Drawing.Point(261, 160); this.label68.Margin = new System.Windows.Forms.Padding(10, 10, 3, 7); this.label68.Name = "label68"; this.label68.Size = new System.Drawing.Size(34, 13); @@ -353,7 +543,7 @@ private void InitializeComponent() // this.info1.BackgroundImage = global::Flowframes.Properties.Resources.questmark_72px_bordeer; this.info1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.info1.Location = new System.Drawing.Point(730, 157); + this.info1.Location = new System.Drawing.Point(714, 157); this.info1.Name = "info1"; this.info1.Size = new System.Drawing.Size(29, 21); this.info1.TabIndex = 82; @@ -364,7 +554,7 @@ private void InitializeComponent() // this.exportNamePattern.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.exportNamePattern.ForeColor = System.Drawing.Color.White; - this.exportNamePattern.Location = new System.Drawing.Point(317, 157); + this.exportNamePattern.Location = new System.Drawing.Point(301, 157); this.exportNamePattern.MinimumSize = new System.Drawing.Size(4, 21); this.exportNamePattern.Name = "exportNamePattern"; this.exportNamePattern.Size = new System.Drawing.Size(232, 20); @@ -386,7 +576,7 @@ private void InitializeComponent() this.clearModelCacheBtn.FlatAppearance.BorderSize = 0; this.clearModelCacheBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.clearModelCacheBtn.ForeColor = System.Drawing.Color.White; - this.clearModelCacheBtn.Location = new System.Drawing.Point(280, 215); + this.clearModelCacheBtn.Location = new System.Drawing.Point(264, 215); this.clearModelCacheBtn.Name = "clearModelCacheBtn"; this.clearModelCacheBtn.Size = new System.Drawing.Size(206, 23); this.clearModelCacheBtn.TabIndex = 79; @@ -414,7 +604,7 @@ private void InitializeComponent() this.processingMode.Items.AddRange(new object[] { "Do All Steps At Once (Extract, Interpolate, Encode)", "Run Each Step Separately (For Manually Editing Frames)"}); - this.processingMode.Location = new System.Drawing.Point(280, 7); + this.processingMode.Location = new System.Drawing.Point(264, 7); this.processingMode.Name = "processingMode"; this.processingMode.Size = new System.Drawing.Size(300, 21); this.processingMode.TabIndex = 72; @@ -434,7 +624,7 @@ private void InitializeComponent() this.tempDirBrowseBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.tempDirBrowseBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.tempDirBrowseBtn.ForeColor = System.Drawing.Color.White; - this.tempDirBrowseBtn.Location = new System.Drawing.Point(704, 65); + this.tempDirBrowseBtn.Location = new System.Drawing.Point(688, 65); this.tempDirBrowseBtn.Name = "tempDirBrowseBtn"; this.tempDirBrowseBtn.Size = new System.Drawing.Size(55, 23); this.tempDirBrowseBtn.TabIndex = 70; @@ -446,7 +636,7 @@ private void InitializeComponent() // this.tempDirCustom.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.tempDirCustom.ForeColor = System.Drawing.Color.White; - this.tempDirCustom.Location = new System.Drawing.Point(486, 67); + this.tempDirCustom.Location = new System.Drawing.Point(470, 67); this.tempDirCustom.MinimumSize = new System.Drawing.Size(4, 21); this.tempDirCustom.Name = "tempDirCustom"; this.tempDirCustom.Size = new System.Drawing.Size(212, 20); @@ -455,7 +645,7 @@ private void InitializeComponent() // keepTempFolder // this.keepTempFolder.AutoSize = true; - this.keepTempFolder.Location = new System.Drawing.Point(280, 130); + this.keepTempFolder.Location = new System.Drawing.Point(264, 130); this.keepTempFolder.Name = "keepTempFolder"; this.keepTempFolder.Size = new System.Drawing.Size(15, 14); this.keepTempFolder.TabIndex = 68; @@ -493,8 +683,9 @@ private void InitializeComponent() "Parent Directory Of Output Folder", "Inside Output Folder", "Flowframes Program Folder", + "Windows Temp Folder", "Custom..."}); - this.tempFolderLoc.Location = new System.Drawing.Point(280, 67); + this.tempFolderLoc.Location = new System.Drawing.Point(264, 67); this.tempFolderLoc.Name = "tempFolderLoc"; this.tempFolderLoc.Size = new System.Drawing.Size(200, 21); this.tempFolderLoc.TabIndex = 65; @@ -504,7 +695,7 @@ private void InitializeComponent() // this.label34.AutoSize = true; this.label34.ForeColor = System.Drawing.Color.Silver; - this.label34.Location = new System.Drawing.Point(412, 41); + this.label34.Location = new System.Drawing.Point(396, 41); this.label34.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label34.Name = "label34"; this.label34.Size = new System.Drawing.Size(268, 13); @@ -515,7 +706,7 @@ private void InitializeComponent() // this.panel10.BackgroundImage = global::Flowframes.Properties.Resources.baseline_create_white_18dp_semiTransparent; this.panel10.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.panel10.Location = new System.Drawing.Point(378, 37); + this.panel10.Location = new System.Drawing.Point(362, 37); this.panel10.Name = "panel10"; this.panel10.Size = new System.Drawing.Size(21, 21); this.panel10.TabIndex = 61; @@ -535,7 +726,7 @@ private void InitializeComponent() "720", "540", "360"}); - this.maxVidHeight.Location = new System.Drawing.Point(280, 37); + this.maxVidHeight.Location = new System.Drawing.Point(264, 37); this.maxVidHeight.Margin = new System.Windows.Forms.Padding(3, 3, 8, 3); this.maxVidHeight.Name = "maxVidHeight"; this.maxVidHeight.Size = new System.Drawing.Size(87, 21); @@ -554,6 +745,13 @@ private void InitializeComponent() // tabListPage2 // this.tabListPage2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + this.tabListPage2.Controls.Add(this.formatofInterp); + this.tabListPage2.Controls.Add(this.label13); + this.tabListPage2.Controls.Add(this.intelQSVDecode); + this.tabListPage2.Controls.Add(this.label12); + this.tabListPage2.Controls.Add(this.mpdecimateMode); + this.tabListPage2.Controls.Add(this.label11); + this.tabListPage2.Controls.Add(this.label10); this.tabListPage2.Controls.Add(this.autoEncBlockPanel); this.tabListPage2.Controls.Add(this.label70); this.tabListPage2.Controls.Add(this.alwaysWaitForAutoEnc); @@ -595,21 +793,112 @@ private void InitializeComponent() this.tabListPage2.Controls.Add(this.label1); this.tabListPage2.ForeColor = System.Drawing.Color.White; this.tabListPage2.Name = "tabListPage2"; - this.tabListPage2.Size = new System.Drawing.Size(762, 419); + this.tabListPage2.Size = new System.Drawing.Size(762, 512); this.tabListPage2.Text = "Interpolation"; // + // formatofInterp + // + this.formatofInterp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.formatofInterp.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.formatofInterp.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.formatofInterp.ForeColor = System.Drawing.Color.White; + this.formatofInterp.FormattingEnabled = true; + this.formatofInterp.Items.AddRange(new object[] { + "bmp", + "jpg", + "png", + "webp"}); + this.formatofInterp.Location = new System.Drawing.Point(280, 123); + this.formatofInterp.Margin = new System.Windows.Forms.Padding(3, 3, 8, 3); + this.formatofInterp.Name = "formatofInterp"; + this.formatofInterp.Size = new System.Drawing.Size(55, 21); + this.formatofInterp.TabIndex = 103; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.ForeColor = System.Drawing.Color.Silver; + this.label13.Location = new System.Drawing.Point(353, 160); + this.label13.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(389, 13); + this.label13.TabIndex = 101; + this.label13.Text = "Intel QSV Image Extractor. This will always generate JPEG always. (Experiemntal)"; + this.label13.Click += new System.EventHandler(this.label13_Click); + // + // intelQSVDecode + // + this.intelQSVDecode.AutoSize = true; + this.intelQSVDecode.Location = new System.Drawing.Point(281, 159); + this.intelQSVDecode.Name = "intelQSVDecode"; + this.intelQSVDecode.Size = new System.Drawing.Size(15, 14); + this.intelQSVDecode.TabIndex = 100; + this.intelQSVDecode.UseVisualStyleBackColor = true; + this.intelQSVDecode.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(10, 160); + this.label12.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(93, 13); + this.label12.TabIndex = 99; + this.label12.Text = "Intel QSV Decode"; + this.label12.Click += new System.EventHandler(this.label12_Click); + // + // mpdecimateMode + // + this.mpdecimateMode.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.mpdecimateMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.mpdecimateMode.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.mpdecimateMode.ForeColor = System.Drawing.Color.White; + this.mpdecimateMode.FormattingEnabled = true; + this.mpdecimateMode.Items.AddRange(new object[] { + "Normal", + "Aggressive"}); + this.mpdecimateMode.Location = new System.Drawing.Point(599, 210); + this.mpdecimateMode.Margin = new System.Windows.Forms.Padding(3, 3, 8, 3); + this.mpdecimateMode.Name = "mpdecimateMode"; + this.mpdecimateMode.Size = new System.Drawing.Size(135, 21); + this.mpdecimateMode.TabIndex = 28; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.ForeColor = System.Drawing.Color.Silver; + this.label11.Location = new System.Drawing.Point(356, 130); + this.label11.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(252, 13); + this.label11.TabIndex = 97; + this.label11.Text = "JPG/PNG Images. JPEG vs PNG (Faster vs Quality)"; + this.label11.Click += new System.EventHandler(this.label11_Click); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(10, 130); + this.label10.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(135, 13); + this.label10.TabIndex = 95; + this.label10.Text = "Interpolated Frames Format"; + this.label10.Click += new System.EventHandler(this.label10_Click); + // // autoEncBlockPanel // - this.autoEncBlockPanel.Location = new System.Drawing.Point(4, 330); + this.autoEncBlockPanel.Location = new System.Drawing.Point(4, 455); this.autoEncBlockPanel.Name = "autoEncBlockPanel"; - this.autoEncBlockPanel.Size = new System.Drawing.Size(755, 86); + this.autoEncBlockPanel.Size = new System.Drawing.Size(755, 42); this.autoEncBlockPanel.TabIndex = 94; + this.autoEncBlockPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.autoEncBlockPanel_Paint); // // label70 // this.label70.AutoSize = true; this.label70.ForeColor = System.Drawing.Color.Silver; - this.label70.Location = new System.Drawing.Point(308, 390); + this.label70.Location = new System.Drawing.Point(309, 419); this.label70.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label70.Name = "label70"; this.label70.Size = new System.Drawing.Size(443, 13); @@ -620,7 +909,7 @@ private void InitializeComponent() // alwaysWaitForAutoEnc // this.alwaysWaitForAutoEnc.AutoSize = true; - this.alwaysWaitForAutoEnc.Location = new System.Drawing.Point(280, 390); + this.alwaysWaitForAutoEnc.Location = new System.Drawing.Point(281, 418); this.alwaysWaitForAutoEnc.Name = "alwaysWaitForAutoEnc"; this.alwaysWaitForAutoEnc.Size = new System.Drawing.Size(15, 14); this.alwaysWaitForAutoEnc.TabIndex = 92; @@ -629,7 +918,7 @@ private void InitializeComponent() // label58 // this.label58.AutoSize = true; - this.label58.Location = new System.Drawing.Point(10, 390); + this.label58.Location = new System.Drawing.Point(10, 418); this.label58.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label58.Name = "label58"; this.label58.Size = new System.Drawing.Size(229, 13); @@ -640,7 +929,7 @@ private void InitializeComponent() // this.pictureBox2.BackgroundImage = global::Flowframes.Properties.Resources.questmark_72px_bordeer; this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.pictureBox2.Location = new System.Drawing.Point(536, 357); + this.pictureBox2.Location = new System.Drawing.Point(548, 380); this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Size = new System.Drawing.Size(29, 21); this.pictureBox2.TabIndex = 90; @@ -651,7 +940,7 @@ private void InitializeComponent() // this.label41.AutoSize = true; this.label41.ForeColor = System.Drawing.Color.Silver; - this.label41.Location = new System.Drawing.Point(578, 360); + this.label41.Location = new System.Drawing.Point(590, 388); this.label41.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label41.Name = "label41"; this.label41.Size = new System.Drawing.Size(158, 13); @@ -669,7 +958,7 @@ private void InitializeComponent() "Disabled", "Enabled (Only Video)", "Enabled (Complete - With Audio, Subtitles)"}); - this.autoEncBackupMode.Location = new System.Drawing.Point(280, 357); + this.autoEncBackupMode.Location = new System.Drawing.Point(281, 380); this.autoEncBackupMode.Name = "autoEncBackupMode"; this.autoEncBackupMode.Size = new System.Drawing.Size(250, 21); this.autoEncBackupMode.TabIndex = 88; @@ -677,7 +966,7 @@ private void InitializeComponent() // label16 // this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(10, 360); + this.label16.Location = new System.Drawing.Point(10, 388); this.label16.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(114, 13); @@ -714,12 +1003,13 @@ private void InitializeComponent() this.label63.Size = new System.Drawing.Size(170, 13); this.label63.TabIndex = 84; this.label63.Text = "Import HQ JPEGs instead of PNGs"; + this.label63.Click += new System.EventHandler(this.label63_Click); // // label18 // this.label18.AutoSize = true; this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label18.Location = new System.Drawing.Point(10, 150); + this.label18.Location = new System.Drawing.Point(10, 190); this.label18.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label18.Name = "label18"; this.label18.Size = new System.Drawing.Size(152, 16); @@ -746,7 +1036,7 @@ private void InitializeComponent() this.sceneChangeFillMode.Items.AddRange(new object[] { "Basic (Duplicate Previous Frame)", "Fancy (Blend To Next Scene)"}); - this.sceneChangeFillMode.Location = new System.Drawing.Point(280, 267); + this.sceneChangeFillMode.Location = new System.Drawing.Point(281, 295); this.sceneChangeFillMode.Name = "sceneChangeFillMode"; this.sceneChangeFillMode.Size = new System.Drawing.Size(250, 21); this.sceneChangeFillMode.TabIndex = 80; @@ -754,7 +1044,7 @@ private void InitializeComponent() // label71 // this.label71.AutoSize = true; - this.label71.Location = new System.Drawing.Point(10, 270); + this.label71.Location = new System.Drawing.Point(10, 303); this.label71.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label71.Name = "label71"; this.label71.Size = new System.Drawing.Size(124, 13); @@ -811,7 +1101,7 @@ private void InitializeComponent() 0, 0, 131072}); - this.scnDetectValue.Location = new System.Drawing.Point(364, 238); + this.scnDetectValue.Location = new System.Drawing.Point(364, 270); this.scnDetectValue.Maximum = new decimal(new int[] { 5, 0, @@ -834,7 +1124,7 @@ private void InitializeComponent() // sbsAllowAutoEnc // this.sbsAllowAutoEnc.AutoSize = true; - this.sbsAllowAutoEnc.Location = new System.Drawing.Point(280, 330); + this.sbsAllowAutoEnc.Location = new System.Drawing.Point(281, 357); this.sbsAllowAutoEnc.Name = "sbsAllowAutoEnc"; this.sbsAllowAutoEnc.Size = new System.Drawing.Size(15, 14); this.sbsAllowAutoEnc.TabIndex = 72; @@ -843,7 +1133,7 @@ private void InitializeComponent() // dedupeSensLabel // this.dedupeSensLabel.AutoSize = true; - this.dedupeSensLabel.Location = new System.Drawing.Point(536, 181); + this.dedupeSensLabel.Location = new System.Drawing.Point(536, 213); this.dedupeSensLabel.Margin = new System.Windows.Forms.Padding(3); this.dedupeSensLabel.Name = "dedupeSensLabel"; this.dedupeSensLabel.Size = new System.Drawing.Size(57, 13); @@ -853,7 +1143,7 @@ private void InitializeComponent() // label53 // this.label53.AutoSize = true; - this.label53.Location = new System.Drawing.Point(10, 330); + this.label53.Location = new System.Drawing.Point(10, 358); this.label53.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label53.Name = "label53"; this.label53.Size = new System.Drawing.Size(203, 13); @@ -871,7 +1161,7 @@ private void InitializeComponent() "Disabled", "Enabled (Keep Interpolated Frames)", "Enabled (Delete Frames Once Encoded)"}); - this.autoEncMode.Location = new System.Drawing.Point(280, 297); + this.autoEncMode.Location = new System.Drawing.Point(281, 325); this.autoEncMode.Name = "autoEncMode"; this.autoEncMode.Size = new System.Drawing.Size(250, 21); this.autoEncMode.TabIndex = 70; @@ -880,7 +1170,7 @@ private void InitializeComponent() // label49 // this.label49.AutoSize = true; - this.label49.Location = new System.Drawing.Point(10, 300); + this.label49.Location = new System.Drawing.Point(10, 328); this.label49.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label49.Name = "label49"; this.label49.Size = new System.Drawing.Size(206, 13); @@ -891,7 +1181,7 @@ private void InitializeComponent() // this.panel14.BackgroundImage = global::Flowframes.Properties.Resources.baseline_create_white_18dp_semiTransparent; this.panel14.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.panel14.Location = new System.Drawing.Point(475, 237); + this.panel14.Location = new System.Drawing.Point(482, 269); this.panel14.Name = "panel14"; this.panel14.Size = new System.Drawing.Size(21, 21); this.panel14.TabIndex = 68; @@ -901,7 +1191,7 @@ private void InitializeComponent() // this.label52.AutoSize = true; this.label52.ForeColor = System.Drawing.Color.Silver; - this.label52.Location = new System.Drawing.Point(509, 242); + this.label52.Location = new System.Drawing.Point(516, 272); this.label52.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label52.Name = "label52"; this.label52.Size = new System.Drawing.Size(225, 13); @@ -911,7 +1201,7 @@ private void InitializeComponent() // label51 // this.label51.AutoSize = true; - this.label51.Location = new System.Drawing.Point(301, 241); + this.label51.Location = new System.Drawing.Point(301, 271); this.label51.Margin = new System.Windows.Forms.Padding(3); this.label51.Name = "label51"; this.label51.Size = new System.Drawing.Size(57, 13); @@ -921,7 +1211,7 @@ private void InitializeComponent() // scnDetect // this.scnDetect.AutoSize = true; - this.scnDetect.Location = new System.Drawing.Point(280, 240); + this.scnDetect.Location = new System.Drawing.Point(280, 271); this.scnDetect.Name = "scnDetect"; this.scnDetect.Size = new System.Drawing.Size(15, 14); this.scnDetect.TabIndex = 64; @@ -930,7 +1220,7 @@ private void InitializeComponent() // label50 // this.label50.AutoSize = true; - this.label50.Location = new System.Drawing.Point(10, 240); + this.label50.Location = new System.Drawing.Point(10, 273); this.label50.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label50.Name = "label50"; this.label50.Size = new System.Drawing.Size(129, 13); @@ -939,39 +1229,13 @@ private void InitializeComponent() // // mpDedupePanel // - this.mpDedupePanel.Controls.Add(this.mpdecimateMode); - this.mpDedupePanel.Location = new System.Drawing.Point(599, 177); + this.mpDedupePanel.Controls.Add(this.dedupThresh); + this.mpDedupePanel.Location = new System.Drawing.Point(599, 205); this.mpDedupePanel.Margin = new System.Windows.Forms.Padding(0); this.mpDedupePanel.Name = "mpDedupePanel"; this.mpDedupePanel.Size = new System.Drawing.Size(135, 21); this.mpDedupePanel.TabIndex = 61; // - // mpdecimateMode - // - this.mpdecimateMode.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.mpdecimateMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.mpdecimateMode.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.mpdecimateMode.ForeColor = System.Drawing.Color.White; - this.mpdecimateMode.FormattingEnabled = true; - this.mpdecimateMode.Items.AddRange(new object[] { - "Normal", - "Aggressive"}); - this.mpdecimateMode.Location = new System.Drawing.Point(0, 0); - this.mpdecimateMode.Margin = new System.Windows.Forms.Padding(3, 3, 8, 3); - this.mpdecimateMode.Name = "mpdecimateMode"; - this.mpdecimateMode.Size = new System.Drawing.Size(135, 21); - this.mpdecimateMode.TabIndex = 28; - // - // magickDedupePanel - // - this.magickDedupePanel.Controls.Add(this.dedupThresh); - this.magickDedupePanel.Controls.Add(this.panel3); - this.magickDedupePanel.Location = new System.Drawing.Point(599, 177); - this.magickDedupePanel.Margin = new System.Windows.Forms.Padding(0); - this.magickDedupePanel.Name = "magickDedupePanel"; - this.magickDedupePanel.Size = new System.Drawing.Size(135, 21); - this.magickDedupePanel.TabIndex = 60; - // // dedupThresh // this.dedupThresh.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); @@ -1003,6 +1267,15 @@ private void InitializeComponent() 0, 65536}); // + // magickDedupePanel + // + this.magickDedupePanel.Controls.Add(this.panel3); + this.magickDedupePanel.Location = new System.Drawing.Point(599, 205); + this.magickDedupePanel.Margin = new System.Windows.Forms.Padding(0); + this.magickDedupePanel.Name = "magickDedupePanel"; + this.magickDedupePanel.Size = new System.Drawing.Size(135, 21); + this.magickDedupePanel.TabIndex = 60; + // // panel3 // this.panel3.BackgroundImage = global::Flowframes.Properties.Resources.baseline_create_white_18dp_semiTransparent; @@ -1027,7 +1300,7 @@ private void InitializeComponent() // enableLoop // this.enableLoop.AutoSize = true; - this.enableLoop.Location = new System.Drawing.Point(280, 210); + this.enableLoop.Location = new System.Drawing.Point(280, 243); this.enableLoop.Name = "enableLoop"; this.enableLoop.Size = new System.Drawing.Size(15, 14); this.enableLoop.TabIndex = 31; @@ -1036,7 +1309,7 @@ private void InitializeComponent() // label15 // this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(10, 210); + this.label15.Location = new System.Drawing.Point(10, 243); this.label15.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(217, 13); @@ -1045,6 +1318,7 @@ private void InitializeComponent() // // dedupMode // + this.dedupMode.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton; this.dedupMode.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.dedupMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.dedupMode.FlatStyle = System.Windows.Forms.FlatStyle.Flat; @@ -1054,7 +1328,7 @@ private void InitializeComponent() "Disabled", "1: After Extraction - Slow, Accurate", "2: During Extraction - Fast, Less Accurate"}); - this.dedupMode.Location = new System.Drawing.Point(280, 177); + this.dedupMode.Location = new System.Drawing.Point(280, 210); this.dedupMode.Name = "dedupMode"; this.dedupMode.Size = new System.Drawing.Size(250, 21); this.dedupMode.TabIndex = 27; @@ -1063,7 +1337,7 @@ private void InitializeComponent() // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(10, 180); + this.label2.Location = new System.Drawing.Point(10, 213); this.label2.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(139, 13); @@ -1093,6 +1367,13 @@ private void InitializeComponent() // aiOptsPage // this.aiOptsPage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + this.aiOptsPage.Controls.Add(this.label38); + this.aiOptsPage.Controls.Add(this.label37); + this.aiOptsPage.Controls.Add(this.wthreads); + this.aiOptsPage.Controls.Add(this.label23); + this.aiOptsPage.Controls.Add(this.label19); + this.aiOptsPage.Controls.Add(this.rifeCudaBufferSize); + this.aiOptsPage.Controls.Add(this.label17); this.aiOptsPage.Controls.Add(this.label66); this.aiOptsPage.Controls.Add(this.rifeCudaFp16); this.aiOptsPage.Controls.Add(this.label65); @@ -1118,14 +1399,116 @@ private void InitializeComponent() this.aiOptsPage.Controls.Add(this.label32); this.aiOptsPage.ForeColor = System.Drawing.Color.White; this.aiOptsPage.Name = "aiOptsPage"; - this.aiOptsPage.Size = new System.Drawing.Size(762, 419); + this.aiOptsPage.Size = new System.Drawing.Size(762, 512); this.aiOptsPage.Text = "AI Specific Options"; // + // label38 + // + this.label38.AutoSize = true; + this.label38.ForeColor = System.Drawing.Color.Silver; + this.label38.Location = new System.Drawing.Point(562, 252); + this.label38.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label38.Name = "label38"; + this.label38.Size = new System.Drawing.Size(72, 13); + this.label38.TabIndex = 90; + this.label38.Text = "Your System: "; + this.label38.TextChanged += new System.EventHandler(this.label38_TextChanged); + // + // label37 + // + this.label37.AutoSize = true; + this.label37.ForeColor = System.Drawing.Color.Silver; + this.label37.Location = new System.Drawing.Point(351, 252); + this.label37.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label37.Name = "label37"; + this.label37.Size = new System.Drawing.Size(210, 13); + this.label37.TabIndex = 89; + this.label37.Text = "Value should be number of threads times 2."; + // + // wthreads + // + this.wthreads.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.wthreads.ForeColor = System.Drawing.Color.White; + this.wthreads.Location = new System.Drawing.Point(256, 245); + this.wthreads.Maximum = new decimal(new int[] { + 512, + 0, + 0, + 0}); + this.wthreads.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.wthreads.Name = "wthreads"; + this.wthreads.Size = new System.Drawing.Size(77, 20); + this.wthreads.TabIndex = 88; + this.wthreads.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(11, 245); + this.label23.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(82, 13); + this.label23.TabIndex = 87; + this.label23.Text = "Rife W-Threads"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.ForeColor = System.Drawing.Color.Silver; + this.label19.Location = new System.Drawing.Point(351, 220); + this.label19.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(359, 13); + this.label19.TabIndex = 86; + this.label19.Text = "Recommended between 200 to 400. Might improve Performance a little bit."; + // + // rifeCudaBufferSize + // + this.rifeCudaBufferSize.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.rifeCudaBufferSize.ForeColor = System.Drawing.Color.White; + this.rifeCudaBufferSize.Location = new System.Drawing.Point(256, 213); + this.rifeCudaBufferSize.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.rifeCudaBufferSize.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.rifeCudaBufferSize.Name = "rifeCudaBufferSize"; + this.rifeCudaBufferSize.Size = new System.Drawing.Size(77, 20); + this.rifeCudaBufferSize.TabIndex = 85; + this.rifeCudaBufferSize.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(11, 215); + this.label17.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(108, 13); + this.label17.TabIndex = 84; + this.label17.Text = "Rife Cuda Buffer Size"; + // // label66 // this.label66.AutoSize = true; this.label66.ForeColor = System.Drawing.Color.Silver; - this.label66.Location = new System.Drawing.Point(308, 211); + this.label66.Location = new System.Drawing.Point(284, 191); this.label66.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label66.Name = "label66"; this.label66.Size = new System.Drawing.Size(448, 13); @@ -1136,7 +1519,7 @@ private void InitializeComponent() // rifeCudaFp16 // this.rifeCudaFp16.AutoSize = true; - this.rifeCudaFp16.Location = new System.Drawing.Point(280, 210); + this.rifeCudaFp16.Location = new System.Drawing.Point(256, 190); this.rifeCudaFp16.Name = "rifeCudaFp16"; this.rifeCudaFp16.Size = new System.Drawing.Size(15, 14); this.rifeCudaFp16.TabIndex = 82; @@ -1145,7 +1528,7 @@ private void InitializeComponent() // label65 // this.label65.AutoSize = true; - this.label65.Location = new System.Drawing.Point(11, 210); + this.label65.Location = new System.Drawing.Point(11, 190); this.label65.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label65.Name = "label65"; this.label65.Size = new System.Drawing.Size(165, 13); @@ -1156,7 +1539,7 @@ private void InitializeComponent() // this.label35.AutoSize = true; this.label35.ForeColor = System.Drawing.Color.Silver; - this.label35.Location = new System.Drawing.Point(412, 291); + this.label35.Location = new System.Drawing.Point(388, 307); 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); @@ -1167,7 +1550,7 @@ private void InitializeComponent() // 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, 287); + this.panel12.Location = new System.Drawing.Point(354, 299); this.panel12.Name = "panel12"; this.panel12.Size = new System.Drawing.Size(21, 21); this.panel12.TabIndex = 78; @@ -1187,7 +1570,7 @@ private void InitializeComponent() "1024", "1536", "2048"}); - this.dainNcnnTilesize.Location = new System.Drawing.Point(280, 287); + this.dainNcnnTilesize.Location = new System.Drawing.Point(256, 299); 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); @@ -1196,7 +1579,7 @@ private void InitializeComponent() // label27 // this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(10, 290); + this.label27.Location = new System.Drawing.Point(10, 318); 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); @@ -1207,7 +1590,7 @@ private void InitializeComponent() // 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, 260); + this.label26.Location = new System.Drawing.Point(10, 285); this.label26.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label26.Name = "label26"; this.label26.Size = new System.Drawing.Size(151, 16); @@ -1218,9 +1601,9 @@ private void InitializeComponent() // this.ncnnThreads.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.ncnnThreads.ForeColor = System.Drawing.Color.White; - this.ncnnThreads.Location = new System.Drawing.Point(280, 98); + this.ncnnThreads.Location = new System.Drawing.Point(256, 98); this.ncnnThreads.Maximum = new decimal(new int[] { - 8, + 16, 0, 0, 0}); @@ -1242,7 +1625,7 @@ private void InitializeComponent() // this.label30.AutoSize = true; this.label30.ForeColor = System.Drawing.Color.Silver; - this.label30.Location = new System.Drawing.Point(412, 181); + this.label30.Location = new System.Drawing.Point(388, 161); this.label30.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label30.Name = "label30"; this.label30.Size = new System.Drawing.Size(347, 13); @@ -1253,7 +1636,7 @@ private void InitializeComponent() // this.panel6.BackgroundImage = global::Flowframes.Properties.Resources.baseline_create_white_18dp_semiTransparent; this.panel6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.panel6.Location = new System.Drawing.Point(378, 177); + this.panel6.Location = new System.Drawing.Point(354, 157); this.panel6.Name = "panel6"; this.panel6.Size = new System.Drawing.Size(21, 21); this.panel6.TabIndex = 65; @@ -1271,7 +1654,7 @@ private void InitializeComponent() "1440", "1080", "720"}); - this.uhdThresh.Location = new System.Drawing.Point(280, 177); + this.uhdThresh.Location = new System.Drawing.Point(256, 157); this.uhdThresh.Margin = new System.Windows.Forms.Padding(3, 3, 8, 3); this.uhdThresh.Name = "uhdThresh"; this.uhdThresh.Size = new System.Drawing.Size(87, 21); @@ -1280,7 +1663,7 @@ private void InitializeComponent() // label29 // this.label29.AutoSize = true; - this.label29.Location = new System.Drawing.Point(10, 180); + this.label29.Location = new System.Drawing.Point(10, 160); this.label29.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label29.Name = "label29"; this.label29.Size = new System.Drawing.Size(151, 13); @@ -1291,7 +1674,7 @@ private void InitializeComponent() // this.label28.AutoSize = true; this.label28.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold); - this.label28.Location = new System.Drawing.Point(10, 150); + this.label28.Location = new System.Drawing.Point(10, 130); this.label28.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label28.Name = "label28"; this.label28.Size = new System.Drawing.Size(101, 16); @@ -1302,7 +1685,7 @@ private void InitializeComponent() // this.label44.AutoSize = true; this.label44.ForeColor = System.Drawing.Color.Silver; - this.label44.Location = new System.Drawing.Point(370, 101); + this.label44.Location = new System.Drawing.Point(346, 101); this.label44.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label44.Name = "label44"; this.label44.Size = new System.Drawing.Size(358, 13); @@ -1323,7 +1706,7 @@ private void InitializeComponent() // this.panel2.BackgroundImage = global::Flowframes.Properties.Resources.baseline_create_white_18dp_semiTransparent; this.panel2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.panel2.Location = new System.Drawing.Point(536, 67); + this.panel2.Location = new System.Drawing.Point(512, 67); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(21, 21); this.panel2.TabIndex = 57; @@ -1333,7 +1716,7 @@ private void InitializeComponent() // this.panel1.BackgroundImage = global::Flowframes.Properties.Resources.baseline_create_white_18dp_semiTransparent; this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.panel1.Location = new System.Drawing.Point(536, 37); + this.panel1.Location = new System.Drawing.Point(512, 37); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(21, 21); this.panel1.TabIndex = 56; @@ -1349,7 +1732,7 @@ private void InitializeComponent() "0", "1", "0,1"}); - this.torchGpus.Location = new System.Drawing.Point(280, 37); + this.torchGpus.Location = new System.Drawing.Point(256, 37); this.torchGpus.Name = "torchGpus"; this.torchGpus.Size = new System.Drawing.Size(250, 21); this.torchGpus.TabIndex = 55; @@ -1374,7 +1757,7 @@ private void InitializeComponent() "0", "1", "0,1"}); - this.ncnnGpus.Location = new System.Drawing.Point(280, 67); + this.ncnnGpus.Location = new System.Drawing.Point(256, 67); this.ncnnGpus.Name = "ncnnGpus"; this.ncnnGpus.Size = new System.Drawing.Size(250, 21); this.ncnnGpus.TabIndex = 53; @@ -1404,6 +1787,10 @@ private void InitializeComponent() // this.vidExportTab.AutoScroll = true; this.vidExportTab.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + this.vidExportTab.Controls.Add(this.playSoundCustomBtn); + this.vidExportTab.Controls.Add(this.playSoundCustom); + this.vidExportTab.Controls.Add(this.systemSoundActivated); + this.vidExportTab.Controls.Add(this.label14); this.vidExportTab.Controls.Add(this.label73); this.vidExportTab.Controls.Add(this.fixOutputDuration); this.vidExportTab.Controls.Add(this.label72); @@ -1420,9 +1807,62 @@ private void InitializeComponent() this.vidExportTab.Controls.Add(this.label8); this.vidExportTab.ForeColor = System.Drawing.Color.White; this.vidExportTab.Name = "vidExportTab"; - this.vidExportTab.Size = new System.Drawing.Size(762, 419); + this.vidExportTab.Size = new System.Drawing.Size(762, 512); this.vidExportTab.Text = "Export Options"; // + // playSoundCustomBtn + // + this.playSoundCustomBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.playSoundCustomBtn.Location = new System.Drawing.Point(647, 155); + this.playSoundCustomBtn.Name = "playSoundCustomBtn"; + this.playSoundCustomBtn.Size = new System.Drawing.Size(75, 23); + this.playSoundCustomBtn.TabIndex = 89; + this.playSoundCustomBtn.Text = "Browse"; + this.playSoundCustomBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.TextAboveImage; + this.playSoundCustomBtn.UseVisualStyleBackColor = false; + this.playSoundCustomBtn.MouseClick += new System.Windows.Forms.MouseEventHandler(this.playSoundCustomBtn_MouseClick); + // + // playSoundCustom + // + this.playSoundCustom.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.playSoundCustom.ForeColor = System.Drawing.Color.White; + this.playSoundCustom.Location = new System.Drawing.Point(386, 157); + this.playSoundCustom.Name = "playSoundCustom"; + this.playSoundCustom.Size = new System.Drawing.Size(255, 20); + this.playSoundCustom.TabIndex = 88; + this.playSoundCustom.TextChanged += new System.EventHandler(this.playSoundCustom_TextChanged); + // + // systemSoundActivated + // + this.systemSoundActivated.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.systemSoundActivated.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.systemSoundActivated.ForeColor = System.Drawing.Color.White; + this.systemSoundActivated.FormattingEnabled = true; + this.systemSoundActivated.Items.AddRange(new object[] { + "None", + "Alarm", + "Asterisk", + "Beep", + "Exclamation", + "Hand", + "Question", + "Custom"}); + this.systemSoundActivated.Location = new System.Drawing.Point(280, 157); + this.systemSoundActivated.Name = "systemSoundActivated"; + this.systemSoundActivated.Size = new System.Drawing.Size(100, 21); + this.systemSoundActivated.TabIndex = 87; + this.systemSoundActivated.SelectedValueChanged += new System.EventHandler(this.systemSoundActivated_SelectedValueChanged); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(10, 160); + this.label14.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(129, 13); + this.label14.TabIndex = 85; + this.label14.Text = "Play Sound when finished"; + // // label73 // this.label73.AutoSize = true; @@ -1602,7 +2042,7 @@ private void InitializeComponent() this.debugTab.Controls.Add(this.cmdDebugMode); this.debugTab.ForeColor = System.Drawing.Color.White; this.debugTab.Name = "debugTab"; - this.debugTab.Size = new System.Drawing.Size(762, 419); + this.debugTab.Size = new System.Drawing.Size(762, 512); this.debugTab.Text = "Developer Options"; // // label7 @@ -1630,7 +2070,7 @@ private void InitializeComponent() "Slow", "Slower", "Very Slow"}); - this.serverCombox.Location = new System.Drawing.Point(280, 67); + this.serverCombox.Location = new System.Drawing.Point(247, 67); this.serverCombox.Name = "serverCombox"; this.serverCombox.Size = new System.Drawing.Size(250, 21); this.serverCombox.TabIndex = 86; @@ -1639,7 +2079,7 @@ private void InitializeComponent() // this.ffEncArgs.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.ffEncArgs.ForeColor = System.Drawing.Color.White; - this.ffEncArgs.Location = new System.Drawing.Point(280, 180); + this.ffEncArgs.Location = new System.Drawing.Point(247, 180); this.ffEncArgs.MinimumSize = new System.Drawing.Size(4, 21); this.ffEncArgs.Name = "ffEncArgs"; this.ffEncArgs.Size = new System.Drawing.Size(400, 20); @@ -1659,7 +2099,7 @@ private void InitializeComponent() // this.label54.AutoSize = true; this.label54.ForeColor = System.Drawing.Color.Silver; - this.label54.Location = new System.Drawing.Point(543, 154); + this.label54.Location = new System.Drawing.Point(510, 154); this.label54.Margin = new System.Windows.Forms.Padding(10, 10, 10, 7); this.label54.Name = "label54"; this.label54.Size = new System.Drawing.Size(118, 13); @@ -1681,7 +2121,7 @@ private void InitializeComponent() "Slow", "Slower", "Very Slow"}); - this.ffEncPreset.Location = new System.Drawing.Point(280, 150); + this.ffEncPreset.Location = new System.Drawing.Point(247, 150); this.ffEncPreset.Name = "ffEncPreset"; this.ffEncPreset.Size = new System.Drawing.Size(250, 21); this.ffEncPreset.TabIndex = 78; @@ -1739,7 +2179,7 @@ private void InitializeComponent() "No", "Yes, Close After Execution", "Yes, Keep Open After Process Has Exited"}); - this.cmdDebugMode.Location = new System.Drawing.Point(280, 37); + this.cmdDebugMode.Location = new System.Drawing.Point(247, 37); this.cmdDebugMode.Name = "cmdDebugMode"; this.cmdDebugMode.Size = new System.Drawing.Size(250, 21); this.cmdDebugMode.TabIndex = 27; @@ -1748,14 +2188,15 @@ private void InitializeComponent() // titleLabel // this.titleLabel.AutoSize = true; - this.titleLabel.Font = new System.Drawing.Font("Yu Gothic UI", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.titleLabel.Font = new System.Drawing.Font("Yu Gothic UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.titleLabel.ForeColor = System.Drawing.Color.White; - this.titleLabel.Location = new System.Drawing.Point(12, 9); + this.titleLabel.Location = new System.Drawing.Point(12, 5); this.titleLabel.Margin = new System.Windows.Forms.Padding(3, 0, 3, 10); this.titleLabel.Name = "titleLabel"; - this.titleLabel.Size = new System.Drawing.Size(119, 40); + this.titleLabel.Size = new System.Drawing.Size(87, 30); this.titleLabel.TabIndex = 1; this.titleLabel.Text = "Settings"; + this.titleLabel.Click += new System.EventHandler(this.titleLabel_Click); // // resetBtn // @@ -1767,9 +2208,9 @@ private void InitializeComponent() this.resetBtn.ForeColor = System.Drawing.Color.White; this.resetBtn.ImageIndex = 0; this.resetBtn.ImageSizeMode = HTAlt.WinForms.HTButton.ButtonImageSizeMode.Zoom; - this.resetBtn.Location = new System.Drawing.Point(889, 12); + this.resetBtn.Location = new System.Drawing.Point(896, 5); this.resetBtn.Name = "resetBtn"; - this.resetBtn.Size = new System.Drawing.Size(40, 40); + this.resetBtn.Size = new System.Drawing.Size(36, 33); this.resetBtn.TabIndex = 39; this.toolTip1.SetToolTip(this.resetBtn, "Reset To Default"); this.resetBtn.UseVisualStyleBackColor = false; @@ -1780,7 +2221,7 @@ private void InitializeComponent() this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); - this.ClientSize = new System.Drawing.Size(944, 501); + this.ClientSize = new System.Drawing.Size(944, 572); this.Controls.Add(this.resetBtn); this.Controls.Add(this.titleLabel); this.Controls.Add(this.settingsTabList); @@ -1801,10 +2242,12 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.scnDetectValue)).EndInit(); this.mpDedupePanel.ResumeLayout(false); - this.magickDedupePanel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dedupThresh)).EndInit(); + this.magickDedupePanel.ResumeLayout(false); this.aiOptsPage.ResumeLayout(false); this.aiOptsPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.wthreads)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.rifeCudaBufferSize)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ncnnThreads)).EndInit(); this.vidExportTab.ResumeLayout(false); this.vidExportTab.PerformLayout(); @@ -1820,7 +2263,6 @@ private void InitializeComponent() private Cyotek.Windows.Forms.TabList settingsTabList; private Cyotek.Windows.Forms.TabListPage generalTab; - private Cyotek.Windows.Forms.TabListPage tabListPage2; private Cyotek.Windows.Forms.TabListPage debugTab; private System.Windows.Forms.Label titleLabel; private System.Windows.Forms.Label label2; @@ -1848,7 +2290,6 @@ private void InitializeComponent() private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label32; private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Panel panel3; private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.Panel panel8; private System.Windows.Forms.Panel panel7; @@ -1864,9 +2305,7 @@ private void InitializeComponent() private HTAlt.WinForms.HTButton tempDirBrowseBtn; private System.Windows.Forms.ComboBox processingMode; private System.Windows.Forms.Label label39; - private System.Windows.Forms.Panel mpDedupePanel; private System.Windows.Forms.ComboBox mpdecimateMode; - private System.Windows.Forms.Panel magickDedupePanel; private System.Windows.Forms.Label label44; private System.Windows.Forms.Label label43; private System.Windows.Forms.ComboBox ffEncPreset; @@ -1895,7 +2334,6 @@ private void InitializeComponent() private System.Windows.Forms.Label label64; private HTAlt.WinForms.HTButton clearModelCacheBtn; private System.Windows.Forms.NumericUpDown scnDetectValue; - private System.Windows.Forms.NumericUpDown dedupThresh; private System.Windows.Forms.NumericUpDown ncnnThreads; private System.Windows.Forms.NumericUpDown minOutVidLength; private System.Windows.Forms.CheckBox keepSubs; @@ -1945,5 +2383,37 @@ private void InitializeComponent() private System.Windows.Forms.Label label78; private System.Windows.Forms.Label label7; private System.Windows.Forms.ComboBox serverCombox; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label11; + protected Cyotek.Windows.Forms.TabListPage tabListPage2; + private System.Windows.Forms.Panel mpDedupePanel; + private System.Windows.Forms.NumericUpDown dedupThresh; + private System.Windows.Forms.Panel magickDedupePanel; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.CheckBox intelQSVDecode; + private System.Windows.Forms.ComboBox formatofInterp; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.NumericUpDown rifeCudaBufferSize; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.ComboBox systemSoundActivated; + private System.Windows.Forms.Button playSoundCustomBtn; + private System.Windows.Forms.TextBox playSoundCustom; + private System.Windows.Forms.Label label37; + private System.Windows.Forms.NumericUpDown wthreads; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.Label label38; + private System.Windows.Forms.Label label40; + private HTAlt.WinForms.HTButton htButton1; + private HTAlt.WinForms.HTButton htButton4; + private HTAlt.WinForms.HTButton htButton3; + private HTAlt.WinForms.HTButton htButton2; + private System.Windows.Forms.Label label42; + private HTAlt.WinForms.HTButton htButton7; + private HTAlt.WinForms.HTButton htButton6; + private HTAlt.WinForms.HTButton htButton5; + private HTAlt.WinForms.HTButton htButton8; } } \ No newline at end of file diff --git a/Code/Forms/SettingsForm.cs b/Code/Forms/SettingsForm.cs index 8e6643d..20dad7f 100644 --- a/Code/Forms/SettingsForm.cs +++ b/Code/Forms/SettingsForm.cs @@ -1,13 +1,31 @@ using Flowframes.Data; +using Flowframes.Forms.Main; using Flowframes.IO; using Flowframes.Media; using Flowframes.MiscUtils; using Flowframes.Ui; +using HTAlt.WinForms; +using Microsoft.VisualBasic; using Microsoft.WindowsAPICodePack.Dialogs; +using NvAPIWrapper.Native.GPU.Structures; using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.Eventing.Reader; using System.Drawing; +using System.Linq; +using System.Management; +using System.Security.Cryptography; +using System.Text; +using System.Threading; using System.Threading.Tasks; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; using System.Windows.Forms; +using System.Windows.Input; +using System.Xml.Linq; +using Win32Interop.Enums; +using static System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox; #pragma warning disable IDE1006 @@ -22,6 +40,7 @@ public SettingsForm(int index = 0) AutoScaleMode = AutoScaleMode.None; InitializeComponent(); settingsTabList.SelectedIndex = index; + } private void SettingsForm_Load(object sender, EventArgs e) @@ -31,6 +50,7 @@ private void SettingsForm_Load(object sender, EventArgs e) InitServers(); LoadSettings(); + changeTextofCores(); initialized = true; Task.Run(() => CheckModelCacheSize()); } @@ -46,7 +66,7 @@ void InitServers() serverCombox.SelectedIndex = 0; } - public async Task CheckModelCacheSize () + public async Task CheckModelCacheSize() { await Task.Delay(200); @@ -71,9 +91,10 @@ private void SettingsForm_FormClosing(object sender, FormClosingEventArgs e) SaveSettings(); Program.mainForm.UpdateStepByStepControls(); Program.mainForm.LoadQuickSettings(); + } - void SaveSettings () + void SaveSettings() { // Remove spaces... torchGpus.Text = torchGpus.Text.Replace(" ", ""); @@ -88,12 +109,15 @@ void SaveSettings () ConfigParser.SaveGuiElement(exportNamePattern); ConfigParser.SaveGuiElement(exportNamePatternLoop); ConfigParser.SaveGuiElement(disablePreview); + // Interpolation ConfigParser.SaveGuiElement(keepAudio); ConfigParser.SaveGuiElement(keepSubs); ConfigParser.SaveGuiElement(keepMeta); ConfigParser.SaveGuiElement(enableAlpha); ConfigParser.SaveGuiElement(jpegFrames); + ConfigParser.SaveGuiElement(formatofInterp); + ConfigParser.SaveGuiElement(intelQSVDecode); ConfigParser.SaveComboxIndex(dedupMode); ConfigParser.SaveComboxIndex(mpdecimateMode); ConfigParser.SaveGuiElement(dedupThresh); @@ -110,13 +134,16 @@ void SaveSettings () ConfigParser.SaveGuiElement(ncnnGpus); ConfigParser.SaveGuiElement(ncnnThreads); ConfigParser.SaveGuiElement(uhdThresh); + ConfigParser.SaveGuiElement(rifeCudaBufferSize); ConfigParser.SaveGuiElement(rifeCudaFp16); + ConfigParser.SaveGuiElement(wthreads); ConfigParser.SaveGuiElement(dainNcnnTilesize, ConfigParser.StringMode.Int); // Export ConfigParser.SaveGuiElement(minOutVidLength, ConfigParser.StringMode.Int); ConfigParser.SaveGuiElement(maxFps); ConfigParser.SaveComboxIndex(loopMode); ConfigParser.SaveGuiElement(fixOutputDuration); + ConfigParser.SaveGuiElement(systemSoundActivated); ConfigParser.SaveGuiElement(playSoundCustom); // Debugging ConfigParser.SaveComboxIndex(cmdDebugMode); ConfigParser.SaveComboxIndex(serverCombox); @@ -141,6 +168,8 @@ void LoadSettings() ConfigParser.LoadGuiElement(keepMeta); ConfigParser.LoadGuiElement(enableAlpha); ConfigParser.LoadGuiElement(jpegFrames); + ConfigParser.LoadGuiElement(formatofInterp); + ConfigParser.LoadGuiElement(intelQSVDecode); ConfigParser.LoadComboxIndex(dedupMode); ConfigParser.LoadComboxIndex(mpdecimateMode); ConfigParser.LoadGuiElement(dedupThresh); @@ -158,12 +187,16 @@ void LoadSettings() ConfigParser.LoadGuiElement(ncnnThreads); ConfigParser.LoadGuiElement(uhdThresh); ConfigParser.LoadGuiElement(rifeCudaFp16); + ConfigParser.LoadGuiElement(wthreads); + ConfigParser.LoadGuiElement(rifeCudaBufferSize); ConfigParser.LoadGuiElement(dainNcnnTilesize); // Export ConfigParser.LoadGuiElement(minOutVidLength); - ConfigParser.LoadGuiElement(maxFps); + ConfigParser.LoadGuiElement(maxFps); ConfigParser.LoadComboxIndex(loopMode); ConfigParser.LoadGuiElement(fixOutputDuration); + ConfigParser.LoadGuiElement(systemSoundActivated); ConfigParser.LoadGuiElement(playSoundCustom); + // Debugging ConfigParser.LoadComboxIndex(cmdDebugMode); ConfigParser.LoadComboxIndex(serverCombox); @@ -173,8 +206,8 @@ void LoadSettings() private void tempFolderLoc_SelectedIndexChanged(object sender, EventArgs e) { - tempDirBrowseBtn.Visible = tempFolderLoc.SelectedIndex == 4; - tempDirCustom.Visible = tempFolderLoc.SelectedIndex == 4; + tempDirBrowseBtn.Visible = tempFolderLoc.SelectedIndex == 5; + tempDirCustom.Visible = tempFolderLoc.SelectedIndex == 5; } private void outFolderLoc_SelectedIndexChanged(object sender, EventArgs e) @@ -186,7 +219,7 @@ private void outFolderLoc_SelectedIndexChanged(object sender, EventArgs e) private void tempDirBrowseBtn_Click(object sender, EventArgs e) { CommonOpenFileDialog dialog = new CommonOpenFileDialog { InitialDirectory = tempDirCustom.Text.Trim(), IsFolderPicker = true }; - + if (dialog.ShowDialog() == CommonFileDialogResult.Ok) tempDirCustom.Text = dialog.FileName; @@ -244,5 +277,313 @@ private async void resetBtn_Click(object sender, EventArgs e) await Config.Reset(3, this); SettingsForm_Load(null, null); } + + private void label63_Click(object sender, EventArgs e) + { + + } + + private void label10_Click(object sender, EventArgs e) + { + + } + + private void label11_Click(object sender, EventArgs e) + { + + } + + private void autoEncBlockPanel_Paint(object sender, PaintEventArgs e) + { + + } + + private void label12_Click(object sender, EventArgs e) + { + + } + + private void label13_Click(object sender, EventArgs e) + { + + } + + private void titleLabel_Click(object sender, EventArgs e) + { + + } + + private void checkBox1_CheckedChanged(object sender, EventArgs e) + { + + } + + private void formatofInterp_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void playSoundCustom_TextChanged(object sender, EventArgs e) + { + + } + + private void playSoundCustomBtn_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e) + { + + OpenFileDialog openFileDialog1 = new OpenFileDialog + { + InitialDirectory = playSoundCustom.Text.Trim(), + Title = "Browse Text Files", + + CheckFileExists = true, + CheckPathExists = true, + + DefaultExt = "wav", + Filter = "WAVE (Uncompressed Audio)|*.wav", + FilterIndex = 2, + RestoreDirectory = true, + + ReadOnlyChecked = true, + ShowReadOnly = true + }; + + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + playSoundCustom.Text = openFileDialog1.FileName; + } + + ConfigParser.SaveGuiElement(playSoundCustom); + } + + private void systemSoundActivated_SelectedValueChanged(object sender, EventArgs e) + { + playSoundCustom.Visible = systemSoundActivated.SelectedIndex == 7; + playSoundCustomBtn.Visible = systemSoundActivated.SelectedIndex == 7; + } + + private void changeTextofCores() { + int coreCount = 0; + foreach (var item in new ManagementObjectSearcher("Select * from Win32_Processor").Get()) + { + coreCount += int.Parse(item["NumberOfCores"].ToString()); + } + + int threadcustom = Environment.ProcessorCount; + string customtext = "Your System: " + coreCount + "/" + threadcustom + " (C/T)"; + label38.Text = customtext; + } + + private void label38_TextChanged(object sender, EventArgs e) + { + + } + + Form1 dotheResetInMainGUI = Application.OpenForms.OfType().FirstOrDefault(); + + private async void changePresetToIntelNvidia() + { + DialogResult dialog2 = UiUtils.ShowMessageBox($"Are you sure you want to change to PERFORMANCE Intel/Nvidia Preset?", "Setting Preset", MessageBoxButtons.YesNo); + if (dialog2 == DialogResult.No) return; + await Task.Run(() => Config.Reset(3, this)); + Config.Set(Config.Key.autoEncMode, "2"); + Config.Set(Config.Key.tempFolderLoc, "0"); + Config.Set(Config.Key.intelQSVDecode, "True"); + Config.Set(Config.Key.jpegFrames, "True"); + Config.Set(Config.Key.formatofInterp, "jpg"); + Config.Set(Config.Key.rifeCudaFp16, "True"); + Config.Set(Config.Key.rifeCudaBufferSize, "250"); + int threadcount = Environment.ProcessorCount; + Config.Set(Config.Key.wthreads, (threadcount * 3).ToString()); + Config.Set(Config.Key.lastOutputSettings, "MP4,h264 NVENC,Very High,YUV 4:2:0 8-bit"); + Config.Set(Config.Key.lastUsedAiName, "RIFE_CUDA"); + SettingsForm_Load(null, null); + dotheResetInMainGUI.Reset(); + } + + private async void changePresetToAMDNvidia() + { + DialogResult dialog2 = UiUtils.ShowMessageBox($"Are you sure you want to change to PERFORMANCE AMD/Nvida Preset?", "Setting Preset", MessageBoxButtons.YesNo); + if (dialog2 == DialogResult.No) return; + await Task.Run(() => Config.Reset(3, this)); + Config.Set(Config.Key.autoEncMode, "2"); + Config.Set(Config.Key.tempFolderLoc, "0"); + Config.Set(Config.Key.intelQSVDecode, "False"); + Config.Set(Config.Key.jpegFrames, "True"); + Config.Set(Config.Key.formatofInterp, "jpg"); + Config.Set(Config.Key.rifeCudaFp16, "True"); + Config.Set(Config.Key.rifeCudaBufferSize, "250"); + int threadcount = Environment.ProcessorCount; + Config.Set(Config.Key.wthreads, (threadcount * 3).ToString()); + Config.Set(Config.Key.lastOutputSettings, "MP4,h264 NVENC,Very High,YUV 4:2:0 8-bit"); + Config.Set(Config.Key.lastUsedAiName, "RIFE_CUDA"); + SettingsForm_Load(null, null); + dotheResetInMainGUI.Reset(); + } + + + private async void changePresetToAMDAMD() + { + DialogResult dialog2 = UiUtils.ShowMessageBox($"Are you sure you want to change to PERFORMANCE AMD/AMD Preset?", "Setting Preset", MessageBoxButtons.YesNo); + if (dialog2 == DialogResult.No) return; + await Task.Run(() => Config.Reset(3, this)); + Config.Set(Config.Key.autoEncMode, "2"); + Config.Set(Config.Key.tempFolderLoc, "0"); + Config.Set(Config.Key.intelQSVDecode, "False"); + Config.Set(Config.Key.jpegFrames, "True"); + Config.Set(Config.Key.formatofInterp, "jpg"); + Config.Set(Config.Key.rifeCudaFp16, "False"); + Config.Set(Config.Key.rifeCudaBufferSize, "250"); + int threadcount = Environment.ProcessorCount; + Config.Set(Config.Key.wthreads, (threadcount * 3).ToString()); + Config.Set(Config.Key.lastOutputSettings, "MP4,h264,Very High,YUV 4:2:0 8-bit"); + Config.Set(Config.Key.lastUsedAiName, "RIFE_NCNN"); + SettingsForm_Load(null, null); + dotheResetInMainGUI.Reset(); + } + + private async void changePresetToIntelIntel() + { + DialogResult dialog2 = UiUtils.ShowMessageBox($"Are you sure you want to change to PERFORMANCE Intel/Intel Preset?", "Setting Preset", MessageBoxButtons.YesNo); + if (dialog2 == DialogResult.No) return; + await Task.Run(() => Config.Reset(3, this)); + Config.Set(Config.Key.autoEncMode, "2"); + Config.Set(Config.Key.tempFolderLoc, "0"); + Config.Set(Config.Key.intelQSVDecode, "True"); + Config.Set(Config.Key.jpegFrames, "True"); + Config.Set(Config.Key.formatofInterp, "jpg"); + Config.Set(Config.Key.rifeCudaFp16, "False"); + Config.Set(Config.Key.rifeCudaBufferSize, "250"); + int threadcount = Environment.ProcessorCount; + Config.Set(Config.Key.wthreads, (threadcount * 3).ToString()); + Config.Set(Config.Key.lastOutputSettings, "MP4,h264,Very High,YUV 4:2:0 8-bit"); + Config.Set(Config.Key.lastUsedAiName, "RIFE_CUDA"); + SettingsForm_Load(null, null); + dotheResetInMainGUI.Reset(); + } + + private async void changePresetToNormal() + { + DialogResult dialog2 = UiUtils.ShowMessageBox($"Are you sure you want to change to Normal Preset?", "Setting Preset", MessageBoxButtons.YesNo); + if (dialog2 == DialogResult.No) return; + await Task.Run(() => Config.Reset(3, this)); + Config.Set(Config.Key.autoEncMode, "0"); + Config.Set(Config.Key.tempFolderLoc, "0"); + Config.Set(Config.Key.intelQSVDecode, "False"); + Config.Set(Config.Key.jpegFrames, "True"); + Config.Set(Config.Key.formatofInterp, "png"); + Config.Set(Config.Key.rifeCudaFp16, "False"); + Config.Set(Config.Key.rifeCudaBufferSize, "250"); + int threadcount = Environment.ProcessorCount; + Config.Set(Config.Key.wthreads, (threadcount * 3).ToString()); + Config.Set(Config.Key.lastOutputSettings, "MP4,h264,Very High,YUV 4:2:0 8-bit"); + Config.Set(Config.Key.lastUsedAiName, "RIFE_CUDA"); + SettingsForm_Load(null, null); + dotheResetInMainGUI.Reset(); + } + + private async void changePresetToPurist() + { + DialogResult dialog2 = UiUtils.ShowMessageBox($"Are you sure you want to change to Purist Preset?", "Setting Preset", MessageBoxButtons.YesNo); + if (dialog2 == DialogResult.No) return; + await Task.Run(() => Config.Reset(3, this)); + Config.Set(Config.Key.autoEncMode, "0"); + Config.Set(Config.Key.tempFolderLoc, "0"); + Config.Set(Config.Key.intelQSVDecode, "False"); + Config.Set(Config.Key.jpegFrames, "False"); + Config.Set(Config.Key.formatofInterp, "png"); + Config.Set(Config.Key.rifeCudaFp16, "False"); + Config.Set(Config.Key.rifeCudaBufferSize, "250"); + int threadcount = Environment.ProcessorCount; + Config.Set(Config.Key.wthreads, (threadcount * 3).ToString()); + Config.Set(Config.Key.lastOutputSettings, "MP4,h264,Lossless,YUV 4:2:0 8-bit"); + Config.Set(Config.Key.lastUsedAiName, "RIFE_CUDA"); + SettingsForm_Load(null, null); + dotheResetInMainGUI.Reset(); + } + + private async void changePresetToSuperPurist() + { + DialogResult dialog2 = UiUtils.ShowMessageBox($"Are you sure you want to change to Super Purist Preset?", "Setting Preset", MessageBoxButtons.YesNo); + if (dialog2 == DialogResult.No) return; + await Task.Run(() => Config.Reset(3, this)); + Config.Set(Config.Key.autoEncMode, "0"); + Config.Set(Config.Key.tempFolderLoc, "0"); + Config.Set(Config.Key.intelQSVDecode, "False"); + Config.Set(Config.Key.jpegFrames, "False"); + Config.Set(Config.Key.formatofInterp, "bmp"); + Config.Set(Config.Key.rifeCudaFp16, "False"); + Config.Set(Config.Key.rifeCudaBufferSize, "250"); + int threadcount = Environment.ProcessorCount; + Config.Set(Config.Key.wthreads, (threadcount * 3).ToString()); + Config.Set(Config.Key.lastOutputSettings, "MP4,h264,Lossless,YUV 4:4:4 8-bit"); + Config.Set(Config.Key.lastUsedAiName, "RIFE_CUDA"); + SettingsForm_Load(null, null); + dotheResetInMainGUI.Reset(); + } + + + private async void changePresetToLowDiskSpaceMode() + { + DialogResult dialog2 = UiUtils.ShowMessageBox($"Are you sure you want to change to Super Purist Preset?", "Setting Preset", MessageBoxButtons.YesNo); + if (dialog2 == DialogResult.No) return; + await Task.Run(() => Config.Reset(3, this)); + Config.Set(Config.Key.autoEncMode, "2"); + Config.Set(Config.Key.tempFolderLoc, "0"); + Config.Set(Config.Key.intelQSVDecode, "False"); + Config.Set(Config.Key.jpegFrames, "True"); + Config.Set(Config.Key.formatofInterp, "jpg"); + Config.Set(Config.Key.rifeCudaFp16, "False"); + Config.Set(Config.Key.rifeCudaBufferSize, "250"); + int threadcount = Environment.ProcessorCount; + Config.Set(Config.Key.wthreads, (threadcount * 3).ToString()); + Config.Set(Config.Key.lastOutputSettings, "MP4,h264,very low,YUV 4:2:0 8-bit"); + Config.Set(Config.Key.lastUsedAiName, "RIFE_CUDA"); + Config.Set(Config.Key.alwaysWaitForAutoEnc, "True"); + SettingsForm_Load(null, null); + dotheResetInMainGUI.Reset(); + } + + + private void htButton1_Click(object sender, EventArgs e) + { + changePresetToIntelNvidia(); + } + + private void htButton2_Click(object sender, EventArgs e) + { + changePresetToAMDNvidia(); + } + + private void htButton3_Click(object sender, EventArgs e) + { + changePresetToAMDAMD(); + } + + private void htButton4_Click(object sender, EventArgs e) + { + changePresetToIntelIntel(); + } + + + private void htButton5_Click(object sender, EventArgs e) + { + changePresetToNormal(); + } + + private void htButton6_Click(object sender, EventArgs e) + { + changePresetToPurist(); + } + + private void htButton7_Click(object sender, EventArgs e) + { + changePresetToSuperPurist(); + } + + private void htButton8_Click(object sender, EventArgs e) + { + changePresetToLowDiskSpaceMode(); + } } -} +} \ No newline at end of file diff --git a/Code/Forms/SettingsForm.resx b/Code/Forms/SettingsForm.resx index 95e8249..735a30c 100644 --- a/Code/Forms/SettingsForm.resx +++ b/Code/Forms/SettingsForm.resx @@ -120,6 +120,9 @@ 17, 17 + + 17, 17 + Set the filename patterns using placeholders: [NAME] for the input filename @@ -140,6 +143,9 @@ The loop suffix gets added if the output gets looped. You can use the following If this is enabled together with Auto-Encode, a backup video will be created from already encoded chunks, after each chunk has finished encoding. This causes a minimal CPU load but requires lots of storage bandwidth - It's only recommended to use this on SSDs for longer videos. + + 25 + diff --git a/Code/IO/Config.cs b/Code/IO/Config.cs index aa31be2..8e3c5b9 100644 --- a/Code/IO/Config.cs +++ b/Code/IO/Config.cs @@ -1,10 +1,12 @@ using Flowframes.Forms; +using Flowframes.Forms.Main; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Threading.Tasks; +using System.Windows.Forms; namespace Flowframes.IO { @@ -31,6 +33,8 @@ public static async Task Reset(int retries = 3, SettingsForm settingsForm = null await Task.Delay(100); cachedValues.Clear(); await Task.Delay(100); + //Since this setting is not in the gui, this will never get initializied, if resetted. So needed to add here. + Set(Key.lastOutputSettings, "MP4,h264,Very High,YUV 4:2:0 8-bit"); if (settingsForm != null) settingsForm.Enabled = true; @@ -164,6 +168,11 @@ public static int GetInt(Key key) return Get(key, Type.Int).GetInt(); } + public static String GetString(Key key) + { + return Get(key, Type.String).ToString(); + } + public static int GetInt(Key key, int defaultVal) { WriteIfDoesntExist(key.ToString(), defaultVal.ToString()); @@ -244,9 +253,12 @@ private static string WriteDefaultValIfExists(string keyStr, Type type) if (key == Key.disablePreview) return WriteDefault(key, "True"); if (key == Key.maxVidHeight) return WriteDefault(key, "2160"); if (key == Key.clearLogOnInput) return WriteDefault(key, "True"); + if (key == Key.tempFolderLoc) return WriteDefault(key, "4"); if (key == Key.tempDirCustom) return WriteDefault(key, "D:/"); if (key == Key.exportNamePattern) return WriteDefault(key, "[NAME]-[FACTOR]x-[AI]-[MODEL]-[FPS]fps"); if (key == Key.exportNamePatternLoop) return WriteDefault(key, "-Loop[LOOPS]"); + + // Interpolation if (key == Key.dedupThresh) return WriteDefault(key, "2"); if (key == Key.keepAudio) return WriteDefault(key, "True"); @@ -256,17 +268,32 @@ private static string WriteDefaultValIfExists(string keyStr, Type type) if (key == Key.scnDetectValue) return WriteDefault(key, "0.2"); if (key == Key.sceneChangeFillMode) return WriteDefault(key, "1"); if (key == Key.autoEncMode) return WriteDefault(key, "2"); + if (key == Key.intelQSVDecode) return WriteDefault(key, "False"); if (key == Key.jpegFrames) return WriteDefault(key, "True"); + if (key == Key.formatofInterp) return WriteDefault(key, "png"); + if (key == Key.lastUsedAiName) return WriteDefault(key, "RIFE_CUDA"); + if (key == Key.lastOutputSettings) return WriteDefault(key, "MP4,h264,Very High,YUV 4:2:0 8-bit"); + if (key == Key.alwaysWaitForAutoEnc) return WriteDefault(key, "False"); + // Video Export - if (key == Key.minOutVidLength) return WriteDefault(key, "5"); - if (key == Key.gifDitherType) return WriteDefault(key, "bayer"); - if (key == Key.minVidLength) return WriteDefault(key, "5"); + if (key == Key.minOutVidLength) return WriteDefault(key, "5"); + if (key == Key.gifDitherType) return WriteDefault(key, "bayer"); + if (key == Key.minVidLength) return WriteDefault(key, "5"); + if (key == Key.systemSoundActivated) return WriteDefault(key, "None"); + if (key == Key.playSoundCustom) return WriteDefault(key, "D:/"); + // AI if (key == Key.uhdThresh) return WriteDefault(key, "1600"); if (key == Key.torchGpus) return WriteDefault(key, "0"); if (key == Key.ncnnGpus) return WriteDefault(key, "0"); - if (key == Key.ncnnThreads) return WriteDefault(key, "4"); + if (key == Key.ncnnThreads) return WriteDefault(key, "8"); + if (key == Key.rifeCudaBufferSize) return WriteDefault(key, "200"); + + int threadcount = Environment.ProcessorCount; + if (key == Key.wthreads) return WriteDefault(key, (threadcount*2).ToString()); + if (key == Key.dainNcnnTilesize) return WriteDefault(key, "768"); + // Debug / Other / Experimental if (key == Key.ffEncPreset) return WriteDefault(key, "fast"); if (key == Key.sbsRunPreviousStepIfNeeded) return WriteDefault(key, "True"); @@ -325,7 +352,8 @@ public enum Key gifDitherType, imgSeqSampleCount, jpegFrames, - jpegInterp, + formatofInterp, + intelQSVDecode, keepAspectRatio, keepAudio, keepColorSpace, @@ -345,6 +373,7 @@ public enum Key ncnnGpus, ncnnThreads, opusBitrate, + playSoundCustom, processingMode, rifeCudaBufferSize, rifeCudaFp16, @@ -355,12 +384,14 @@ public enum Key scnDetect, scnDetectValue, silentDevmodeCheck, + systemSoundActivated, tempDirCustom, tempFolderLoc, torchGpus, uhdThresh, vsRtShowOsd, vsUseLsmash, + wthreads, lastOutputSettings, } } diff --git a/Code/IO/Logger.cs b/Code/IO/Logger.cs index 9078d4c..8415875 100644 --- a/Code/IO/Logger.cs +++ b/Code/IO/Logger.cs @@ -3,10 +3,16 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; +using System.Management.Instrumentation; +using System.Reflection; +using System.Text; +using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; +using System.Xml.Linq; using DT = System.DateTime; namespace Flowframes @@ -19,6 +25,7 @@ class Logger public static long id; private static Dictionary sessionLogs = new Dictionary(); + private static string _lastUi = ""; public static string LastUiLine { get { return _lastUi; } } private static string _lastLog = ""; @@ -40,8 +47,11 @@ public LogEntry(string logMessageArg, bool hiddenArg = false, bool replaceLastLi } } + private static ConcurrentQueue logQueue = new ConcurrentQueue(); + + public static void Log(string msg, bool hidden = false, bool replaceLastLine = false, string filename = "") { logQueue.Enqueue(new LogEntry(msg, hidden, replaceLastLine, filename)); @@ -101,6 +111,49 @@ public static void Show(LogEntry entry) LogToFile(msg, false, entry.filename); } + + /*public static void LogToFile(string logStr, bool noLineBreak, string filename){ + if (string.IsNullOrWhiteSpace(filename)) + filename = defaultLogName; + + if (Path.GetExtension(filename) != ".txt") + filename = Path.ChangeExtension(filename, "txt"); + + file = Path.Combine(Paths.GetLogPath(), filename); + logStr = logStr.Replace(Environment.NewLine, " ").TrimWhitespaces(); + string time = DateTime.Now.ToString("MM-dd-yyyy HH:mm:ss"); + + try + { + string appendStr = noLineBreak ? $" {logStr}" : $"{Environment.NewLine}[{id.ToString().PadLeft(8, '0')}] [{time}]: {logStr}"; + sessionLogs[filename] = (sessionLogs.ContainsKey(filename) ? sessionLogs[filename] : "") + appendStr; + File.AppendAllText(file, appendStr); + id++; + } + + catch{ + // this if fine, i forgot why + } + } + + + public static string GetSessionLog(string filename) + { + if (!filename.Contains(".txt")) + filename = Path.ChangeExtension(filename, "txt"); + + if (sessionLogs.ContainsKey(filename)) + return sessionLogs[filename].ToString(); + else + return ""; + }*/ + + + ///////////////////// + ///This will write into the log file just every 5 seconds once. + private static StringBuilder buffer = new StringBuilder(); + private static DateTime lastWriteTime = DateTime.MinValue; + public static void LogToFile(string logStr, bool noLineBreak, string filename) { if (string.IsNullOrWhiteSpace(filename)) @@ -116,15 +169,23 @@ public static void LogToFile(string logStr, bool noLineBreak, string filename) try { string appendStr = noLineBreak ? $" {logStr}" : $"{Environment.NewLine}[{id.ToString().PadLeft(8, '0')}] [{time}]: {logStr}"; - sessionLogs[filename] = (sessionLogs.ContainsKey(filename) ? sessionLogs[filename] : "") + appendStr; - File.AppendAllText(file, appendStr); + buffer.Append(appendStr); id++; + + // If at least 10 seconds have elapsed since last write, write to file and clear buffer + if ((DateTime.Now - lastWriteTime).TotalSeconds >= 5) + { + File.AppendAllText(file, buffer.ToString()); + buffer.Clear(); + lastWriteTime = DateTime.Now; + } } catch { // this if fine, i forgot why } } + ///////////////////// public static string GetSessionLog(string filename) { @@ -132,17 +193,17 @@ public static string GetSessionLog(string filename) filename = Path.ChangeExtension(filename, "txt"); if (sessionLogs.ContainsKey(filename)) - return sessionLogs[filename]; + return sessionLogs[filename].ToString(); else return ""; } public static List GetSessionLogLastLines(string filename, int linesCount = 5) - { - string log = GetSessionLog(filename); - string[] lines = log.SplitIntoLines(); - return lines.Reverse().Take(linesCount).Reverse().ToList(); - } + { + string log = GetSessionLog(filename); + string[] lines = log.SplitIntoLines(); + return lines.Reverse().Take(linesCount).Reverse().ToList(); + } public static void LogIfLastLineDoesNotContainMsg(string s, bool hidden = false, bool replaceLastLine = false, string filename = "") { diff --git a/Code/IO/TSource.cs b/Code/IO/TSource.cs new file mode 100644 index 0000000..8ae9044 --- /dev/null +++ b/Code/IO/TSource.cs @@ -0,0 +1,6 @@ +namespace Flowframes +{ + internal class TSource + { + } +} \ No newline at end of file diff --git a/Code/Magick/Blend.cs b/Code/Magick/Blend.cs index dc899c1..500e49d 100644 --- a/Code/Magick/Blend.cs +++ b/Code/Magick/Blend.cs @@ -123,8 +123,30 @@ public static void BlendImages(string img1Path, string img2Path, string imgOutPa img2.Alpha(AlphaOption.Opaque); img2.Evaluate(Channels.Alpha, EvaluateOperator.Set, new Percentage(50)); img1.Composite(img2, Gravity.Center, CompositeOperator.Over); - img1.Format = MagickFormat.Png24; - img1.Quality = 10; + //img1.Format = MagickFormat.Png24; + + var imgformat = Config.GetString(Config.Key.formatofInterp); + + switch (imgformat) + { + case "png": + img1.Format = MagickFormat.Png24; + break; + case "jpg": + img1.Format = MagickFormat.Jpeg; + break; + case "bmp": + img1.Format = MagickFormat.Bmp; + break; + case "webp": + img1.Format = MagickFormat.WebP; + break; + default: + img1.Format = MagickFormat.Png24; + break; + } + + img1.Quality = 100; img1.Write(imgOutPath); } @@ -150,8 +172,30 @@ public static async Task BlendImages(string img1Path, string img2Path, string[] currentAlpha += alphaFraction; img1Inst.Composite(img2Inst, Gravity.Center, CompositeOperator.Over); - img1Inst.Format = MagickFormat.Png24; - img1Inst.Quality = 10; + //img1Inst.Format = MagickFormat.Png24; + + var imgformat = Config.GetString(Config.Key.formatofInterp); + + switch (imgformat) + { + case "png": + img1Inst.Format = MagickFormat.Png24; + break; + case "jpg": + img1Inst.Format = MagickFormat.Jpeg; + break; + case "bmp": + img1Inst.Format = MagickFormat.Bmp; + break; + case "webp": + img1Inst.Format = MagickFormat.WebP; + break; + default: + img1Inst.Format = MagickFormat.Png24; + break; + } + + img1Inst.Quality = 100; img1Inst.Write(outPath); await Task.Delay(1); } diff --git a/Code/Main/InterpolateUtils.cs b/Code/Main/InterpolateUtils.cs index 04a87f5..c6ff8c3 100644 --- a/Code/Main/InterpolateUtils.cs +++ b/Code/Main/InterpolateUtils.cs @@ -81,6 +81,9 @@ public static string GetTempFolderLoc(string inPath, string outPath) basePath = Paths.GetExeDir(); if (Config.GetInt(Config.Key.tempFolderLoc) == 4) + basePath = Path.GetTempPath() + "FlowFrames"; + + if (Config.GetInt(Config.Key.tempFolderLoc) == 5) { string custPath = Config.Get(Config.Key.tempDirCustom); diff --git a/Code/Media/FfmpegEncode.cs b/Code/Media/FfmpegEncode.cs index f76b4cd..1c31f6e 100644 --- a/Code/Media/FfmpegEncode.cs +++ b/Code/Media/FfmpegEncode.cs @@ -95,7 +95,7 @@ public static async Task GetFfmpegExportArgsOut(Fraction resampleFps, Vi } filters.Add(GetPadFilter()); - filters = filters.Where(f => f.IsNotEmpty()).ToList(); + filters = filters.Where(f => f.NotEmpty()).ToList(); return filters.Count > 0 ? $"{string.Join(" ", beforeArgs)} -filter_complex [0:v]{string.Join("[vf],[vf]", filters.Where(f => !string.IsNullOrWhiteSpace(f)))}[vf] -map [vf] {string.Join(" ", extraArgs)}" : diff --git a/Code/Media/FfmpegExtract.cs b/Code/Media/FfmpegExtract.cs index b930aee..588b08a 100644 --- a/Code/Media/FfmpegExtract.cs +++ b/Code/Media/FfmpegExtract.cs @@ -5,11 +5,14 @@ using Flowframes.Ui; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Drawing; using System.Globalization; using System.IO; using System.Linq; using System.Threading.Tasks; +using Win32Interop.Enums; +using Win32Interop.Structs; using static Flowframes.AvProcess; namespace Flowframes.Media @@ -32,7 +35,9 @@ public static async Task ExtractSceneChanges(string inPath, string outDir, Fract string scnDetect = $"-vf \"select='gt(scene,{Config.GetFloatString(Config.Key.scnDetectValue)})'\""; string rateArg = (rate.GetFloat() > 0) ? $"-r {rate}" : ""; - string args = $"{GetTrimArg(true)} {inArg} {GetImgArgs(format)} {rateArg} {scnDetect} -fps_mode passthrough -frame_pts 1 -s 256x144 {GetTrimArg(false)} \"{outDir}/%{Padding.inputFrames}d{format}\""; + + string args = $"{GetTrimArg(true)} {inArg} {GetImgArgs(format)} {rateArg} {scnDetect} -fps_mode passthrough -frame_pts 1 -s 256x144 {GetTrimArg(false)} \"{outDir}/%{Padding.inputFrames}d{format}\""; + LogMode logMode = Interpolate.currentMediaFile.FrameCount > 50 ? LogMode.OnlyLastLine : LogMode.Hidden; await RunFfmpeg(args, logMode, inputIsFrames ? "panic" : "warning", true); @@ -72,6 +77,8 @@ static string GetImgArgs(string extension, bool includePixFmt = true, bool alpha return args; } + + public static async Task VideoToFrames(string inputFile, string framesDir, bool alpha, Fraction rate, bool deDupe, bool delSrc, Size size, string format) { Logger.Log("Extracting video frames from input video..."); @@ -82,7 +89,28 @@ public static async Task VideoToFrames(string inputFile, string framesDir, bool string filters = FormatUtils.ConcatStrings(new[] { GetPadFilter(), mpStr }); string vf = filters.Length > 2 ? $"-vf {filters}" : ""; string rateArg = (rate.GetFloat() > 0) ? $" -r {rate}" : ""; - string args = $"{GetTrimArg(true)} -i {inputFile.Wrap()} {GetImgArgs(format, true, alpha)} -fps_mode passthrough {rateArg} -frame_pts 1 {vf} {sizeStr} {GetTrimArg(false)} \"{framesDir}/%{Padding.inputFrames}d{format}\""; + + //QSV Related Settings + //Check if IntelQSVDecode is set to "1" in config file, than enable this just for image extraction. If set to "0" default, then it will use cpu for extraction. + string qsvArg1 = "-hwaccel qsv -qsv_device 1 -c:v h264_qsv"; + int threadcount = Environment.ProcessorCount; + string qsvArg2 = "-threads "; + string qsvArg3 = threadcount.ToString(); + string qsvArg4 = "-vcodec mjpeg_qsv -qscale:v 2"; + + + string args; + + if (Config.GetString(Config.Key.intelQSVDecode) == "True") + { + args = $"{GetTrimArg(true)} {qsvArg1} -i {inputFile.Wrap()} {qsvArg2} {qsvArg3} {qsvArg4} {GetTrimArg(false)} \"{framesDir}/%{Padding.inputFrames}d{format}\""; + } + else + { + args = $"{GetTrimArg(true)} -i {inputFile.Wrap()} {GetImgArgs(format, true, alpha)} -fps_mode passthrough {rateArg} -frame_pts 1 {vf} {sizeStr} {GetTrimArg(false)} \"{framesDir}/%{Padding.inputFrames}d{format}\""; + } + + LogMode logMode = Interpolate.currentMediaFile.FrameCount > 50 ? LogMode.OnlyLastLine : LogMode.Hidden; await RunFfmpeg(args, logMode, true); int amount = IoUtils.GetAmountOfFiles(framesDir, false, "*" + format); diff --git a/Code/Os/AiProcess.cs b/Code/Os/AiProcess.cs index 03e3e01..29a08f1 100644 --- a/Code/Os/AiProcess.cs +++ b/Code/Os/AiProcess.cs @@ -199,14 +199,15 @@ public static async Task RunRifeCudaProcess(string inPath, string outDir, string string outPath = Path.Combine(inPath.GetParentDir(), outDir); Directory.CreateDirectory(outPath); string uhdStr = await InterpolateUtils.UseUhd() ? "--UHD" : ""; - string wthreads = $"--wthreads {2 * (int)interpFactor}"; - string rbuffer = $"--rbuffer {Config.GetInt(Config.Key.rifeCudaBufferSize, 200)}"; + string wthreads = $"--wthreads {Config.GetString(Config.Key.wthreads)}"; + string rbuffer = $"--rbuffer {Config.GetString(Config.Key.rifeCudaBufferSize)}"; //string scale = $"--scale {Config.GetFloat("rifeCudaScale", 1.0f).ToStringDot()}"; string prec = Config.GetBool(Config.Key.rifeCudaFp16) ? "--fp16" : ""; - string args = $" --input {inPath.Wrap()} --output {outDir} --model {mdl} --multi {interpFactor} {uhdStr} {wthreads} {rbuffer} {prec}"; + string imgformat = $"--imgformat {Config.GetString(Config.Key.formatofInterp)}"; + string args = $" --input {inPath.Wrap()} --output {outDir} --model {mdl} --multi {interpFactor} {uhdStr} {wthreads} {rbuffer} {prec} {imgformat}"; Process rifePy = OsUtils.NewProcess(!OsUtils.ShowHiddenCmd()); - AiStarted(rifePy, 3500); + AiStarted(rifePy, 1500); SetProgressCheck(Path.Combine(Interpolate.currentSettings.tempFolder, outDir), interpFactor); rifePy.StartInfo.Arguments = $"{OsUtils.GetCmdArg()} cd /D {Path.Combine(Paths.GetPkgPath(), Implementations.rifeCuda.PkgDir).Wrap()} & " + $"set CUDA_VISIBLE_DEVICES={Config.Get(Config.Key.torchGpus)} & {Python.GetPyCmd()} {script} {args}"; @@ -612,7 +613,7 @@ static void LogOutput(string line, AI ai, bool err = false) lastLogName = ai.LogFilename; Logger.Log(line, true, false, ai.LogFilename); - string lastLogLines = string.Join("\n", Logger.GetSessionLogLastLines(lastLogName, 6).Select(x => $"[{x.Split("]: [").Skip(1).FirstOrDefault()}")); + //string lastLogLines = string.Join("\n", Logger.GetSessionLogLastLines(lastLogName, 6).Select(x => $"[{x.Split("]: [").Skip(1).FirstOrDefault()}")); if (ai.Backend == AI.AiBackend.Pytorch) // Pytorch specific { @@ -647,7 +648,7 @@ static void LogOutput(string line, AI ai, bool err = false) if (!hasShownError && err && (line.Contains("RuntimeError") || line.Contains("ImportError") || line.Contains("OSError"))) { hasShownError = true; - UiUtils.ShowMessageBox($"A python error occured during interpolation!\nCheck the log for details:\n\n{lastLogLines}", UiUtils.MessageType.Error); + //UiUtils.ShowMessageBox($"A python error occured during interpolation!\nCheck the log for details:\n\n{lastLogLines}", UiUtils.MessageType.Error); } } @@ -676,7 +677,7 @@ static void LogOutput(string line, AI ai, bool err = false) if (!hasShownError && err && line.MatchesWildcard("vk* failed")) { hasShownError = true; - UiUtils.ShowMessageBox($"A Vulkan error occured during interpolation!\n\n{lastLogLines}", UiUtils.MessageType.Error); + //UiUtils.ShowMessageBox($"A Vulkan error occured during interpolation!\n\n{lastLogLines}", UiUtils.MessageType.Error); } } @@ -685,7 +686,7 @@ static void LogOutput(string line, AI ai, bool err = false) if (!hasShownError && Interpolate.currentSettings.outSettings.Format != Enums.Output.Format.Realtime && line.ToLowerInvariant().Contains("fwrite() call failed")) { hasShownError = true; - UiUtils.ShowMessageBox($"VapourSynth interpolation failed with an unknown error. Check the log for details:\n\n{lastLogLines}", UiUtils.MessageType.Error); + //UiUtils.ShowMessageBox($"VapourSynth interpolation failed with an unknown error. Check the log for details:\n\n{lastLogLines}", UiUtils.MessageType.Error); } if (!hasShownError && line.ToLowerInvariant().Contains("allocate memory failed")) diff --git a/Code/Os/Python.cs b/Code/Os/Python.cs index 7eb97cb..1826c79 100644 --- a/Code/Os/Python.cs +++ b/Code/Os/Python.cs @@ -19,7 +19,15 @@ class Python public static async Task CheckCompression () { - if(HasEmbeddedPyFolder() && (Config.Get(Config.Key.compressedPyVersion) != Updater.GetInstalledVer().ToString())) + // Check if file exist, if not, then go as usual, if yes, the no compression is done. + string filePath = (Paths.GetDataPath() + "\\FilesHaveBeenCompress.ini"); + int pythonHasBeenCompressed = 0; + if (System.IO.File.Exists(filePath)) + { + pythonHasBeenCompressed = 1; + } + + if (HasEmbeddedPyFolder() && (Config.Get(Config.Key.compressedPyVersion) != Updater.GetInstalledVer().ToString()) && pythonHasBeenCompressed == 0) { Program.mainForm.SetWorking(true, false); Stopwatch sw = new Stopwatch(); @@ -50,6 +58,8 @@ public static async Task CheckCompression () } Config.Set("compressedPyVersion", Updater.GetInstalledVer().ToString()); Logger.Log("Done compressing python runtime."); + // Create() creates a file at pathName if not existing + FileStream fs = File.Create(filePath); Logger.WriteToFile(compactOutput, true, "compact"); } catch { } diff --git a/Code/Ui/InterpolationProgress.cs b/Code/Ui/InterpolationProgress.cs index b6cd6a0..9b6f5e5 100644 --- a/Code/Ui/InterpolationProgress.cs +++ b/Code/Ui/InterpolationProgress.cs @@ -90,6 +90,9 @@ public static void UpdateLastFrameFromInterpOutput(string output) } } + + + public static async void GetProgressFromFfmpegLog(string logFile, int target) { targetFrames = target;