From f9d46dcfc3716a3e04e6b7715d46a8163dff921d Mon Sep 17 00:00:00 2001 From: Jaex Date: Mon, 8 Jun 2015 21:19:30 +0300 Subject: [PATCH] Added FFmpeg GIF stats mode and dither settings --- ShareX.ScreenCaptureLib/Enums.cs | 16 + .../Screencast/FFmpegHelper.cs | 6 +- .../Screencast/FFmpegOptions.cs | 4 + .../Screencast/FFmpegOptionsForm.Designer.cs | 134 ++- .../Screencast/FFmpegOptionsForm.cs | 28 +- .../Screencast/FFmpegOptionsForm.resx | 954 ++++++++++++------ 6 files changed, 797 insertions(+), 345 deletions(-) diff --git a/ShareX.ScreenCaptureLib/Enums.cs b/ShareX.ScreenCaptureLib/Enums.cs index b4281476c..d956a9573 100644 --- a/ShareX.ScreenCaptureLib/Enums.cs +++ b/ShareX.ScreenCaptureLib/Enums.cs @@ -117,4 +117,20 @@ public enum FFmpegAudioCodec [Description("MP3")] libmp3lame } + + public enum FFmpegPaletteGenStatsMode + { + full, + diff + } + + public enum FFmpegPaletteUseDither + { + none, + bayer, + heckbert, + floyd_steinberg, + sierra2, + sierra2_4a + } } \ No newline at end of file diff --git a/ShareX.ScreenCaptureLib/Screencast/FFmpegHelper.cs b/ShareX.ScreenCaptureLib/Screencast/FFmpegHelper.cs index 4e2b6af82..f88b8dd11 100644 --- a/ShareX.ScreenCaptureLib/Screencast/FFmpegHelper.cs +++ b/ShareX.ScreenCaptureLib/Screencast/FFmpegHelper.cs @@ -76,11 +76,13 @@ public bool EncodeGIF(string input, string output) try { - result = Run(Options.FFmpeg.CLIPath, string.Format("-i \"{0}\" -vf palettegen -y \"{1}\"", input, palettePath)); + // https://ffmpeg.org/ffmpeg-filters.html#palettegen-1 + result = Run(Options.FFmpeg.CLIPath, string.Format("-i \"{0}\" -vf \"palettegen=stats_mode={2}\" -y \"{1}\"", input, palettePath, Options.FFmpeg.GIFStatsMode)); if (result) { - result = Run(Options.FFmpeg.CLIPath, string.Format("-i \"{0}\" -i \"{1}\" -lavfi paletteuse -y \"{2}\"", input, palettePath, output)); + // https://ffmpeg.org/ffmpeg-filters.html#paletteuse + result = Run(Options.FFmpeg.CLIPath, string.Format("-i \"{0}\" -i \"{1}\" -lavfi \"paletteuse=dither={3}\" -y \"{2}\"", input, palettePath, output, Options.FFmpeg.GIFDither)); } } finally diff --git a/ShareX.ScreenCaptureLib/Screencast/FFmpegOptions.cs b/ShareX.ScreenCaptureLib/Screencast/FFmpegOptions.cs index a7191e7e8..29112f7b5 100644 --- a/ShareX.ScreenCaptureLib/Screencast/FFmpegOptions.cs +++ b/ShareX.ScreenCaptureLib/Screencast/FFmpegOptions.cs @@ -46,6 +46,8 @@ public class FFmpegOptions public int x264_CRF { get; set; } public int VPx_bitrate { get; set; } // kbit/s public int XviD_qscale { get; set; } + public FFmpegPaletteGenStatsMode GIFStatsMode { get; set; } + public FFmpegPaletteUseDither GIFDither { get; set; } // Audio public int AAC_bitrate { get; set; } // kbit/s @@ -93,6 +95,8 @@ public FFmpegOptions() x264_Preset = FFmpegPreset.veryfast; VPx_bitrate = 3000; XviD_qscale = 10; + GIFStatsMode = FFmpegPaletteGenStatsMode.full; + GIFDither = FFmpegPaletteUseDither.sierra2_4a; // Audio AAC_bitrate = 128; diff --git a/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.Designer.cs b/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.Designer.cs index 18be284bf..f71a81607 100644 --- a/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.Designer.cs +++ b/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.Designer.cs @@ -31,18 +31,18 @@ private void InitializeComponent() this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FFmpegOptionsForm)); this.lblExtension = new System.Windows.Forms.Label(); - this.lblX264CRF = new System.Windows.Forms.Label(); + this.lblx264CRF = new System.Windows.Forms.Label(); this.nudx264CRF = new System.Windows.Forms.NumericUpDown(); this.ttHelpTip = new System.Windows.Forms.ToolTip(this.components); - this.nudQscale = new System.Windows.Forms.NumericUpDown(); - this.cbPreset = new System.Windows.Forms.ComboBox(); + this.nudXvidQscale = new System.Windows.Forms.NumericUpDown(); + this.cbx264Preset = new System.Windows.Forms.ComboBox(); this.tbVorbis_qscale = new System.Windows.Forms.TrackBar(); this.tbMP3_qscale = new System.Windows.Forms.TrackBar(); this.tbAACBitrate = new System.Windows.Forms.TrackBar(); this.lblCodec = new System.Windows.Forms.Label(); this.cboVideoCodec = new System.Windows.Forms.ComboBox(); - this.lblPreset = new System.Windows.Forms.Label(); - this.lblQscale = new System.Windows.Forms.Label(); + this.lblx264Preset = new System.Windows.Forms.Label(); + this.lblXvidQscale = new System.Windows.Forms.Label(); this.gbFFmpegExe = new System.Windows.Forms.GroupBox(); this.btnDownload = new System.Windows.Forms.Button(); this.btnFFmpegBrowse = new System.Windows.Forms.Button(); @@ -81,8 +81,13 @@ private void InitializeComponent() this.txtExtension = new System.Windows.Forms.TextBox(); this.btnHelp = new System.Windows.Forms.Button(); this.eiFFmpeg = new ShareX.HelpersLib.ExportImportControl(); + this.tpGIF = new System.Windows.Forms.TabPage(); + this.lblGIFStatsMode = new System.Windows.Forms.Label(); + this.cbGIFStatsMode = new System.Windows.Forms.ComboBox(); + this.cbGIFDither = new System.Windows.Forms.ComboBox(); + this.lblGIFDither = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.nudx264CRF)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudQscale)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudXvidQscale)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tbVorbis_qscale)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tbMP3_qscale)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tbAACBitrate)).BeginInit(); @@ -100,6 +105,7 @@ private void InitializeComponent() this.tpMP3.SuspendLayout(); this.gbSource.SuspendLayout(); this.gbCodecs.SuspendLayout(); + this.tpGIF.SuspendLayout(); this.SuspendLayout(); // // lblExtension @@ -107,10 +113,10 @@ private void InitializeComponent() resources.ApplyResources(this.lblExtension, "lblExtension"); this.lblExtension.Name = "lblExtension"; // - // lblX264CRF + // lblx264CRF // - resources.ApplyResources(this.lblX264CRF, "lblX264CRF"); - this.lblX264CRF.Name = "lblX264CRF"; + resources.ApplyResources(this.lblx264CRF, "lblx264CRF"); + this.lblx264CRF.Name = "lblx264CRF"; // // nudx264CRF // @@ -140,36 +146,36 @@ private void InitializeComponent() this.ttHelpTip.UseAnimation = false; this.ttHelpTip.UseFading = false; // - // nudQscale + // nudXvidQscale // - resources.ApplyResources(this.nudQscale, "nudQscale"); - this.nudQscale.Maximum = new decimal(new int[] { + resources.ApplyResources(this.nudXvidQscale, "nudXvidQscale"); + this.nudXvidQscale.Maximum = new decimal(new int[] { 31, 0, 0, 0}); - this.nudQscale.Minimum = new decimal(new int[] { + this.nudXvidQscale.Minimum = new decimal(new int[] { 1, 0, 0, 0}); - this.nudQscale.Name = "nudQscale"; - this.ttHelpTip.SetToolTip(this.nudQscale, resources.GetString("nudQscale.ToolTip")); - this.nudQscale.Value = new decimal(new int[] { + this.nudXvidQscale.Name = "nudXvidQscale"; + this.ttHelpTip.SetToolTip(this.nudXvidQscale, resources.GetString("nudXvidQscale.ToolTip")); + this.nudXvidQscale.Value = new decimal(new int[] { 3, 0, 0, 0}); - this.nudQscale.ValueChanged += new System.EventHandler(this.nudQscale_ValueChanged); + this.nudXvidQscale.ValueChanged += new System.EventHandler(this.nudQscale_ValueChanged); // - // cbPreset + // cbx264Preset // - this.cbPreset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbPreset.FormattingEnabled = true; - resources.ApplyResources(this.cbPreset, "cbPreset"); - this.cbPreset.Name = "cbPreset"; - this.ttHelpTip.SetToolTip(this.cbPreset, resources.GetString("cbPreset.ToolTip")); - this.cbPreset.SelectedIndexChanged += new System.EventHandler(this.cbPreset_SelectedIndexChanged); + this.cbx264Preset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbx264Preset.FormattingEnabled = true; + resources.ApplyResources(this.cbx264Preset, "cbx264Preset"); + this.cbx264Preset.Name = "cbx264Preset"; + this.ttHelpTip.SetToolTip(this.cbx264Preset, resources.GetString("cbx264Preset.ToolTip")); + this.cbx264Preset.SelectedIndexChanged += new System.EventHandler(this.cbPreset_SelectedIndexChanged); // // tbVorbis_qscale // @@ -220,15 +226,15 @@ private void InitializeComponent() this.cboVideoCodec.Name = "cboVideoCodec"; this.cboVideoCodec.SelectedIndexChanged += new System.EventHandler(this.cboVideoCodec_SelectedIndexChanged); // - // lblPreset + // lblx264Preset // - resources.ApplyResources(this.lblPreset, "lblPreset"); - this.lblPreset.Name = "lblPreset"; + resources.ApplyResources(this.lblx264Preset, "lblx264Preset"); + this.lblx264Preset.Name = "lblx264Preset"; // - // lblQscale + // lblXvidQscale // - resources.ApplyResources(this.lblQscale, "lblQscale"); - this.lblQscale.Name = "lblQscale"; + resources.ApplyResources(this.lblXvidQscale, "lblXvidQscale"); + this.lblXvidQscale.Name = "lblXvidQscale"; // // gbFFmpegExe // @@ -309,6 +315,7 @@ private void InitializeComponent() this.tcFFmpegVideoCodecs.Controls.Add(this.tpX264); this.tcFFmpegVideoCodecs.Controls.Add(this.tpVpx); this.tcFFmpegVideoCodecs.Controls.Add(this.tpXvid); + this.tcFFmpegVideoCodecs.Controls.Add(this.tpGIF); resources.ApplyResources(this.tcFFmpegVideoCodecs, "tcFFmpegVideoCodecs"); this.tcFFmpegVideoCodecs.Name = "tcFFmpegVideoCodecs"; this.tcFFmpegVideoCodecs.SelectedIndex = 0; @@ -316,9 +323,9 @@ private void InitializeComponent() // tpX264 // this.tpX264.Controls.Add(this.nudx264CRF); - this.tpX264.Controls.Add(this.lblX264CRF); - this.tpX264.Controls.Add(this.cbPreset); - this.tpX264.Controls.Add(this.lblPreset); + this.tpX264.Controls.Add(this.lblx264CRF); + this.tpX264.Controls.Add(this.cbx264Preset); + this.tpX264.Controls.Add(this.lblx264Preset); resources.ApplyResources(this.tpX264, "tpX264"); this.tpX264.Name = "tpX264"; this.tpX264.UseVisualStyleBackColor = true; @@ -370,8 +377,8 @@ private void InitializeComponent() // // tpXvid // - this.tpXvid.Controls.Add(this.nudQscale); - this.tpXvid.Controls.Add(this.lblQscale); + this.tpXvid.Controls.Add(this.nudXvidQscale); + this.tpXvid.Controls.Add(this.lblXvidQscale); resources.ApplyResources(this.tpXvid, "tpXvid"); this.tpXvid.Name = "tpXvid"; this.tpXvid.UseVisualStyleBackColor = true; @@ -528,6 +535,44 @@ private void InitializeComponent() this.eiFFmpeg.ExportRequested += new ShareX.HelpersLib.ExportImportControl.ExportEventHandler(this.eiFFmpeg_ExportRequested); this.eiFFmpeg.ImportRequested += new ShareX.HelpersLib.ExportImportControl.ImportEventHandler(this.eiFFmpeg_ImportRequested); // + // tpGIF + // + this.tpGIF.Controls.Add(this.cbGIFDither); + this.tpGIF.Controls.Add(this.lblGIFDither); + this.tpGIF.Controls.Add(this.cbGIFStatsMode); + this.tpGIF.Controls.Add(this.lblGIFStatsMode); + resources.ApplyResources(this.tpGIF, "tpGIF"); + this.tpGIF.Name = "tpGIF"; + this.tpGIF.UseVisualStyleBackColor = true; + // + // lblGIFStatsMode + // + resources.ApplyResources(this.lblGIFStatsMode, "lblGIFStatsMode"); + this.lblGIFStatsMode.Name = "lblGIFStatsMode"; + // + // cbGIFStatsMode + // + this.cbGIFStatsMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbGIFStatsMode.FormattingEnabled = true; + resources.ApplyResources(this.cbGIFStatsMode, "cbGIFStatsMode"); + this.cbGIFStatsMode.Name = "cbGIFStatsMode"; + this.ttHelpTip.SetToolTip(this.cbGIFStatsMode, resources.GetString("cbGIFStatsMode.ToolTip")); + this.cbGIFStatsMode.SelectedIndexChanged += new System.EventHandler(this.cbGIFStatsMode_SelectedIndexChanged); + // + // cbGIFDither + // + this.cbGIFDither.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbGIFDither.FormattingEnabled = true; + resources.ApplyResources(this.cbGIFDither, "cbGIFDither"); + this.cbGIFDither.Name = "cbGIFDither"; + this.ttHelpTip.SetToolTip(this.cbGIFDither, resources.GetString("cbGIFDither.ToolTip")); + this.cbGIFDither.SelectedIndexChanged += new System.EventHandler(this.cbGIFDither_SelectedIndexChanged); + // + // lblGIFDither + // + resources.ApplyResources(this.lblGIFDither, "lblGIFDither"); + this.lblGIFDither.Name = "lblGIFDither"; + // // FFmpegOptionsForm // resources.ApplyResources(this, "$this"); @@ -550,7 +595,7 @@ private void InitializeComponent() this.Name = "FFmpegOptionsForm"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; ((System.ComponentModel.ISupportInitialize)(this.nudx264CRF)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudQscale)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudXvidQscale)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tbVorbis_qscale)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tbMP3_qscale)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tbAACBitrate)).EndInit(); @@ -579,6 +624,8 @@ private void InitializeComponent() this.gbSource.PerformLayout(); this.gbCodecs.ResumeLayout(false); this.gbCodecs.PerformLayout(); + this.tpGIF.ResumeLayout(false); + this.tpGIF.PerformLayout(); this.ResumeLayout(false); } @@ -586,15 +633,15 @@ private void InitializeComponent() #endregion private System.Windows.Forms.Label lblExtension; - private System.Windows.Forms.Label lblX264CRF; + private System.Windows.Forms.Label lblx264CRF; private System.Windows.Forms.NumericUpDown nudx264CRF; private System.Windows.Forms.ToolTip ttHelpTip; private System.Windows.Forms.Label lblCodec; private System.Windows.Forms.ComboBox cboVideoCodec; - private System.Windows.Forms.ComboBox cbPreset; - private System.Windows.Forms.Label lblPreset; - private System.Windows.Forms.NumericUpDown nudQscale; - private System.Windows.Forms.Label lblQscale; + private System.Windows.Forms.ComboBox cbx264Preset; + private System.Windows.Forms.Label lblx264Preset; + private System.Windows.Forms.NumericUpDown nudXvidQscale; + private System.Windows.Forms.Label lblXvidQscale; private System.Windows.Forms.GroupBox gbFFmpegExe; private System.Windows.Forms.Button btnFFmpegBrowse; private System.Windows.Forms.TextBox txtFFmpegPath; @@ -636,5 +683,10 @@ private void InitializeComponent() private System.Windows.Forms.Label lblVP8BitrateK; private System.Windows.Forms.NumericUpDown nudVP8Bitrate; private System.Windows.Forms.Label lblVP8Bitrate; + private System.Windows.Forms.TabPage tpGIF; + private System.Windows.Forms.ComboBox cbGIFDither; + private System.Windows.Forms.Label lblGIFDither; + private System.Windows.Forms.ComboBox cbGIFStatsMode; + private System.Windows.Forms.Label lblGIFStatsMode; } } \ No newline at end of file diff --git a/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.cs b/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.cs index c3496aa58..7fa35072d 100644 --- a/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.cs +++ b/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.cs @@ -48,7 +48,9 @@ public FFmpegOptionsForm(ScreencastOptions options) eiFFmpeg.ObjectType = typeof(FFmpegOptions); cboVideoCodec.Items.AddRange(Helpers.GetEnumDescriptions()); cboAudioCodec.Items.AddRange(Helpers.GetEnumDescriptions()); - cbPreset.Items.AddRange(Helpers.GetEnumDescriptions()); + cbx264Preset.Items.AddRange(Helpers.GetEnumDescriptions()); + cbGIFStatsMode.Items.AddRange(Helpers.GetEnumDescriptions()); + cbGIFDither.Items.AddRange(Helpers.GetEnumDescriptions()); SettingsLoad(); } @@ -75,13 +77,17 @@ private void SettingsLoad() // x264 nudx264CRF.Value = Options.FFmpeg.x264_CRF.Between((int)nudx264CRF.Minimum, (int)nudx264CRF.Maximum); - cbPreset.SelectedIndex = (int)Options.FFmpeg.x264_Preset; + cbx264Preset.SelectedIndex = (int)Options.FFmpeg.x264_Preset; // VPx nudVP8Bitrate.Value = Options.FFmpeg.VPx_bitrate.Between((int)nudVP8Bitrate.Minimum, (int)nudVP8Bitrate.Maximum); // Xvid - nudQscale.Value = Options.FFmpeg.XviD_qscale.Between((int)nudQscale.Minimum, (int)nudQscale.Maximum); + nudXvidQscale.Value = Options.FFmpeg.XviD_qscale.Between((int)nudXvidQscale.Minimum, (int)nudXvidQscale.Maximum); + + // GIF + cbGIFStatsMode.SelectedIndex = (int)Options.FFmpeg.GIFStatsMode; + cbGIFDither.SelectedIndex = (int)Options.FFmpeg.GIFDither; // AAC tbAACBitrate.Value = Options.FFmpeg.AAC_bitrate / 32; @@ -251,7 +257,7 @@ private void nudx264CRF_ValueChanged(object sender, EventArgs e) private void cbPreset_SelectedIndexChanged(object sender, EventArgs e) { - Options.FFmpeg.x264_Preset = (FFmpegPreset)cbPreset.SelectedIndex; + Options.FFmpeg.x264_Preset = (FFmpegPreset)cbx264Preset.SelectedIndex; UpdateUI(); } @@ -263,7 +269,19 @@ private void nudVP8Bitrate_ValueChanged(object sender, EventArgs e) private void nudQscale_ValueChanged(object sender, EventArgs e) { - Options.FFmpeg.XviD_qscale = (int)nudQscale.Value; + Options.FFmpeg.XviD_qscale = (int)nudXvidQscale.Value; + UpdateUI(); + } + + private void cbGIFStatsMode_SelectedIndexChanged(object sender, EventArgs e) + { + Options.FFmpeg.GIFStatsMode = (FFmpegPaletteGenStatsMode)cbGIFStatsMode.SelectedIndex; + UpdateUI(); + } + + private void cbGIFDither_SelectedIndexChanged(object sender, EventArgs e) + { + Options.FFmpeg.GIFDither = (FFmpegPaletteUseDither)cbGIFDither.SelectedIndex; UpdateUI(); } diff --git a/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.resx b/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.resx index 426080f5c..a34229c87 100644 --- a/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.resx +++ b/ShareX.ScreenCaptureLib/Screencast/FFmpegOptionsForm.resx @@ -146,35 +146,38 @@ 2 - + True - - 8, 16 + + 16, 16 - + 31, 13 - + 0 - + CRF: - @Invariant - - lblX264CRF - + + lblx264CRF + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tpX264 - + 1 + + 17, 17 + - 48, 12 + 144, 12 48, 20 @@ -186,9 +189,6 @@ Center - - 17, 17 - Constant Rate Factor (CRF): The range of the quantizer scale is 0-51: where 0 is lossless, 23 is default, and 51 is worst possible. A lower value is a higher quality and a subjectively sane range is 18-28. @@ -209,57 +209,60 @@ If the output looks good, then try a higher value and if it looks bad then choos 0 - - 96, 12 + + 17, 17 + + + 144, 12 - + 48, 20 - + 1 - + Center - + 1 being highest quality/largest filesize and 31 being the lowest quality/smallest filesize. - - nudQscale + + nudXvidQscale - + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tpXvid - + 0 - - 184, 12 + + 144, 36 - + 121, 21 - + 3 - + A preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower preset will provide better compression (compression is quality per filesize). This means that, for example, if you target a certain file size or constant bit rate, you will achieve better quality with a slower preset. Similarly, for constant quality encoding, you will simply save bitrate by choosing a slower preset. - - cbPreset + + cbx264Preset - + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tpX264 - + 2 @@ -269,7 +272,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 112, 3 - 197, 36 + 197, 64 1 @@ -296,7 +299,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 112, 3 - 197, 36 + 197, 64 1 @@ -323,7 +326,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 112, 3 - 197, 36 + 197, 64 1 @@ -391,60 +394,120 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 4 - + True - - 112, 16 + + 16, 40 - + 40, 13 - + 2 - + Preset: - - lblPreset + + lblx264Preset - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tpX264 - + 3 - + True - - 8, 16 + + 16, 16 - + 80, 13 - + 0 - + Variable bitrate: - - lblQscale + + lblXvidQscale - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tpXvid - + 1 + + btnDownload + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbFFmpegExe + + + 0 + + + btnFFmpegBrowse + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbFFmpegExe + + + 1 + + + txtFFmpegPath + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbFFmpegExe + + + 2 + + + 8, 8 + + + 648, 56 + + + 0 + + + ffmpeg.exe + + + gbFFmpegExe + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 9 + 552, 22 @@ -480,7 +543,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi ... - @Invariant + btnFFmpegBrowse @@ -514,29 +577,56 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 2 - - 8, 8 + + cbCustomCommands - - 648, 56 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + gbCommandLinePreview + + 0 - - ffmpeg.exe - @Invariant - - gbFFmpegExe + + txtCommandLinePreview - + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbCommandLinePreview + + + 1 + + + 8, 377 + + + 8, 8, 8, 8 + + + 648, 96 + + + 6 + + + Command line preview + + + gbCommandLinePreview + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 9 + + 8 True @@ -598,32 +688,53 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 1 - - 8, 345 + + btnFFmpegHelp - - 8, 8, 8, 8 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 648, 96 + + gbCommandLineArgs - - 6 + + 0 - - Command line preview + + tbUserArgs - - gbCommandLinePreview + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + gbCommandLineArgs + + + 1 + + + 8, 308 + + + 648, 56 + + + 5 + + + Additional command line arguments + + + gbCommandLineArgs + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 8 + + 10 Top, Right @@ -639,7 +750,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi ? - @Invariant + btnFFmpegHelp @@ -676,30 +787,6 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 1 - - 8, 276 - - - 648, 56 - - - 5 - - - Additional command line arguments - - - gbCommandLineArgs - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 10 - 4, 22 @@ -707,14 +794,14 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 3, 3, 3, 3 - 312, 42 + 312, 70 1 x264 / x265 - @Invariant + tpX264 @@ -727,6 +814,252 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 0 + + lblVP8BitrateK + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpVpx + + + 0 + + + nudVP8Bitrate + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpVpx + + + 1 + + + lblVP8Bitrate + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpVpx + + + 2 + + + 4, 22 + + + 312, 70 + + + 2 + + + VP8 (WebM) + + + tpVpx + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tcFFmpegVideoCodecs + + + 1 + + + 4, 22 + + + 312, 70 + + + 3 + + + Xvid + + + tpXvid + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tcFFmpegVideoCodecs + + + 2 + + + 144, 36 + + + 104, 21 + + + 3 + + + bayer: Ordered 8x8 bayer dithering (deterministic) +heckbert: Dithering as defined by Paul Heckbert in 1982 (simple error diffusion). Note: this dithering is sometimes considered "wrong" and is included as a reference. +floyd_steinberg: Floyd and Steingberg dithering (error diffusion) +sierra2: Frankie Sierra dithering v2 (error diffusion) +sierra2_4a: Frankie Sierra dithering v2 "Lite" (error diffusion) + +Default is sierra2_4a. + + + cbGIFDither + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpGIF + + + 0 + + + True + + + NoControl + + + 16, 40 + + + 81, 13 + + + 2 + + + Dithering mode: + + + lblGIFDither + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpGIF + + + 1 + + + 144, 12 + + + 104, 21 + + + 1 + + + full: Compute full frame histograms. +diff: Compute histograms only for the part that differs from previous frame. This might be relevant to give more importance to the moving part of your input if the background is static. + +Default is full. + + + cbGIFStatsMode + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpGIF + + + 2 + + + True + + + 16, 16 + + + 97, 13 + + + 0 + + + Palette stats mode: + + + lblGIFStatsMode + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpGIF + + + 3 + + + 4, 22 + + + 3, 3, 3, 3 + + + 312, 70 + + + 4 + + + GIF + + + tpGIF + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tcFFmpegVideoCodecs + + + 3 + + + 8, 200 + + + 320, 96 + + + 3 + + + tcFFmpegVideoCodecs + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + True @@ -734,7 +1067,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi NoControl - 172, 16 + 220, 16 34, 13 @@ -744,7 +1077,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi kbit/s - @Invariant + lblVP8BitrateK @@ -758,7 +1091,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 0 - 96, 12 + 144, 12 72, 20 @@ -785,7 +1118,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi True - 8, 16 + 16, 16 80, 13 @@ -808,77 +1141,8 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 2 - - 4, 22 - - - 312, 42 - - - 2 - - - VP8 (WebM) - @Invariant - - tpVpx - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tcFFmpegVideoCodecs - - - 1 - - - 4, 22 - - - 312, 42 - - - 3 - - - Xvid - @Invariant - - tpXvid - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tcFFmpegVideoCodecs - - - 2 - - - 8, 200 - - - 320, 68 - - - 3 - - - tcFFmpegVideoCodecs - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 7 - - 176, 340 + 176, 372 88, 23 @@ -902,7 +1166,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 6 - 267, 340 + 267, 372 53, 23 @@ -925,11 +1189,107 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 5 + + tpAAC + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tcFFmpegAudioCodecs + + + 0 + + + tpVorbis + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tcFFmpegAudioCodecs + + + 1 + + + tpMP3 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tcFFmpegAudioCodecs + + + 2 + + + 336, 200 + + + 320, 96 + + + 4 + + + tcFFmpegAudioCodecs + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + lblAACQuality + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpAAC + + + 1 + + + 4, 22 + + + 3, 3, 3, 3 + + + 312, 70 + + + 3 + + + AAC + + + tpAAC + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tcFFmpegAudioCodecs + + + 0 + True - 8, 16 + 16, 16 40, 13 @@ -952,38 +1312,50 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 1 - + + lblVorbisQuality + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpVorbis + + + 1 + + 4, 22 - + 3, 3, 3, 3 - - 312, 42 + + 312, 70 - - 3 + + 0 - - AAC - @Invariant - - tpAAC + + Vorbis - + + tpVorbis + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tcFFmpegAudioCodecs - - 0 + + 1 True - 8, 16 + 16, 16 42, 13 @@ -1006,38 +1378,50 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 1 - + + lblMP3Quality + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpMP3 + + + 1 + + 4, 22 - + 3, 3, 3, 3 - - 312, 42 + + 312, 70 - - 0 + + 2 - - Vorbis - @Invariant - - tpVorbis + + MP3 - + + tpMP3 + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tcFFmpegAudioCodecs - - 1 + + 2 True - 8, 16 + 16, 16 42, 13 @@ -1060,54 +1444,6 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 1 - - 4, 22 - - - 3, 3, 3, 3 - - - 312, 42 - - - 2 - - - MP3 - @Invariant - - tpMP3 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tcFFmpegAudioCodecs - - - 2 - - - 336, 200 - - - 320, 68 - - - 4 - - - tcFFmpegAudioCodecs - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - 184, 25 @@ -1252,18 +1588,6 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 3 - - 8, 24 - - - 88, 23 - - - 0 - - - Refresh - btnRefreshSources @@ -1300,14 +1624,29 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 3 - - 512, 22 + + 8, 24 - - 56, 20 + + 88, 23 - - 5 + + 0 + + + Refresh + + + btnRefreshSources + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbSource + + + 4 txtExtension @@ -1345,8 +1684,29 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 2 + + 512, 22 + + + 56, 20 + + + 5 + + + txtExtension + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbCodecs + + + 0 + - 576, 448 + 576, 480 80, 24 @@ -1370,7 +1730,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 1 - 384, 448 + 384, 480 192, 24 @@ -1397,7 +1757,7 @@ Similarly, for constant quality encoding, you will simply save bitrate by choosi 6, 13 - 666, 482 + 666, 513 CenterScreen