ffmpeg options changes

This commit is contained in:
Jaex 2014-05-12 02:19:38 +03:00
parent 2e554cdf92
commit 6b28110702
5 changed files with 197 additions and 189 deletions

View file

@ -33,31 +33,31 @@ private void InitializeComponent()
this.lblExt = new System.Windows.Forms.Label();
this.lblCRF = new System.Windows.Forms.Label();
this.nudCRF = new System.Windows.Forms.NumericUpDown();
this.toolTipFFmpeg = new System.Windows.Forms.ToolTip(this.components);
this.tpFFmpeg = new System.Windows.Forms.ToolTip(this.components);
this.nudQscale = new System.Windows.Forms.NumericUpDown();
this.comboBoxExtension = new System.Windows.Forms.ComboBox();
this.cbExtension = new System.Windows.Forms.ComboBox();
this.lblCodec = new System.Windows.Forms.Label();
this.comboBoxCodec = new System.Windows.Forms.ComboBox();
this.comboBoxPreset = new System.Windows.Forms.ComboBox();
this.cbCodec = new System.Windows.Forms.ComboBox();
this.cbPreset = new System.Windows.Forms.ComboBox();
this.lblPreset = new System.Windows.Forms.Label();
this.groupBoxH264 = new System.Windows.Forms.GroupBox();
this.groupBoxH263 = new System.Windows.Forms.GroupBox();
this.labelQscale = new System.Windows.Forms.Label();
this.groupBoxFFmpegExe = new System.Windows.Forms.GroupBox();
this.gbH264 = new System.Windows.Forms.GroupBox();
this.gbH263 = new System.Windows.Forms.GroupBox();
this.lblQscale = new System.Windows.Forms.Label();
this.gbFFmpegExe = new System.Windows.Forms.GroupBox();
this.btnDownload = new System.Windows.Forms.Button();
this.buttonFFmpegBrowse = new System.Windows.Forms.Button();
this.textBoxFFmpegPath = new System.Windows.Forms.TextBox();
this.groupBoxCommandLinePreview = new System.Windows.Forms.GroupBox();
this.textBoxCommandLinePreview = new System.Windows.Forms.TextBox();
this.btnFFmpegBrowse = new System.Windows.Forms.Button();
this.tbFFmpegPath = new System.Windows.Forms.TextBox();
this.gbCommandLinePreview = new System.Windows.Forms.GroupBox();
this.tbCommandLinePreview = new System.Windows.Forms.TextBox();
this.gbCommandLineArgs = new System.Windows.Forms.GroupBox();
this.buttonFFmpegHelp = new System.Windows.Forms.Button();
this.textBoxUserArgs = new System.Windows.Forms.TextBox();
this.btnFFmpegHelp = new System.Windows.Forms.Button();
this.tbUserArgs = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.nudCRF)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudQscale)).BeginInit();
this.groupBoxH264.SuspendLayout();
this.groupBoxH263.SuspendLayout();
this.groupBoxFFmpegExe.SuspendLayout();
this.groupBoxCommandLinePreview.SuspendLayout();
this.gbH264.SuspendLayout();
this.gbH263.SuspendLayout();
this.gbFFmpegExe.SuspendLayout();
this.gbCommandLinePreview.SuspendLayout();
this.gbCommandLineArgs.SuspendLayout();
this.SuspendLayout();
//
@ -73,7 +73,7 @@ private void InitializeComponent()
// lblCRF
//
this.lblCRF.AutoSize = true;
this.lblCRF.Location = new System.Drawing.Point(8, 29);
this.lblCRF.Location = new System.Drawing.Point(16, 24);
this.lblCRF.Name = "lblCRF";
this.lblCRF.Size = new System.Drawing.Size(31, 13);
this.lblCRF.TabIndex = 13;
@ -81,7 +81,7 @@ private void InitializeComponent()
//
// nudCRF
//
this.nudCRF.Location = new System.Drawing.Point(80, 24);
this.nudCRF.Location = new System.Drawing.Point(72, 20);
this.nudCRF.Maximum = new decimal(new int[] {
51,
0,
@ -90,7 +90,7 @@ private void InitializeComponent()
this.nudCRF.Name = "nudCRF";
this.nudCRF.Size = new System.Drawing.Size(121, 20);
this.nudCRF.TabIndex = 14;
this.toolTipFFmpeg.SetToolTip(this.nudCRF, resources.GetString("nudCRF.ToolTip"));
this.tpFFmpeg.SetToolTip(this.nudCRF, resources.GetString("nudCRF.ToolTip"));
this.nudCRF.Value = new decimal(new int[] {
23,
0,
@ -99,7 +99,7 @@ private void InitializeComponent()
//
// nudQscale
//
this.nudQscale.Location = new System.Drawing.Point(88, 24);
this.nudQscale.Location = new System.Drawing.Point(72, 20);
this.nudQscale.Maximum = new decimal(new int[] {
31,
0,
@ -113,7 +113,7 @@ private void InitializeComponent()
this.nudQscale.Name = "nudQscale";
this.nudQscale.Size = new System.Drawing.Size(121, 20);
this.nudQscale.TabIndex = 16;
this.toolTipFFmpeg.SetToolTip(this.nudQscale, "1 being highest quality/largest filesize and 31 being the lowest quality/smallest" +
this.tpFFmpeg.SetToolTip(this.nudQscale, "1 being highest quality/largest filesize and 31 being the lowest quality/smallest" +
" filesize.");
this.nudQscale.Value = new decimal(new int[] {
3,
@ -121,18 +121,18 @@ private void InitializeComponent()
0,
0});
//
// comboBoxExtension
// cbExtension
//
this.comboBoxExtension.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxExtension.FormattingEnabled = true;
this.comboBoxExtension.Items.AddRange(new object[] {
this.cbExtension.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbExtension.FormattingEnabled = true;
this.cbExtension.Items.AddRange(new object[] {
"mp4",
"webm",
"avi"});
this.comboBoxExtension.Location = new System.Drawing.Point(304, 9);
this.comboBoxExtension.Name = "comboBoxExtension";
this.comboBoxExtension.Size = new System.Drawing.Size(152, 21);
this.comboBoxExtension.TabIndex = 15;
this.cbExtension.Location = new System.Drawing.Point(304, 9);
this.cbExtension.Name = "cbExtension";
this.cbExtension.Size = new System.Drawing.Size(152, 21);
this.cbExtension.TabIndex = 15;
//
// lblCodec
//
@ -143,77 +143,77 @@ private void InitializeComponent()
this.lblCodec.TabIndex = 16;
this.lblCodec.Text = "Codec:";
//
// comboBoxCodec
// cbCodec
//
this.comboBoxCodec.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxCodec.FormattingEnabled = true;
this.comboBoxCodec.Location = new System.Drawing.Point(64, 9);
this.comboBoxCodec.Name = "comboBoxCodec";
this.comboBoxCodec.Size = new System.Drawing.Size(160, 21);
this.comboBoxCodec.TabIndex = 17;
this.cbCodec.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbCodec.FormattingEnabled = true;
this.cbCodec.Location = new System.Drawing.Point(64, 9);
this.cbCodec.Name = "cbCodec";
this.cbCodec.Size = new System.Drawing.Size(160, 21);
this.cbCodec.TabIndex = 17;
//
// comboBoxPreset
// cbPreset
//
this.comboBoxPreset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxPreset.FormattingEnabled = true;
this.comboBoxPreset.Location = new System.Drawing.Point(80, 56);
this.comboBoxPreset.Name = "comboBoxPreset";
this.comboBoxPreset.Size = new System.Drawing.Size(121, 21);
this.comboBoxPreset.TabIndex = 19;
this.cbPreset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbPreset.FormattingEnabled = true;
this.cbPreset.Location = new System.Drawing.Point(72, 52);
this.cbPreset.Name = "cbPreset";
this.cbPreset.Size = new System.Drawing.Size(121, 21);
this.cbPreset.TabIndex = 19;
//
// lblPreset
//
this.lblPreset.AutoSize = true;
this.lblPreset.Location = new System.Drawing.Point(8, 61);
this.lblPreset.Location = new System.Drawing.Point(16, 56);
this.lblPreset.Name = "lblPreset";
this.lblPreset.Size = new System.Drawing.Size(40, 13);
this.lblPreset.TabIndex = 18;
this.lblPreset.Text = "Preset:";
//
// groupBoxH264
// gbH264
//
this.groupBoxH264.Controls.Add(this.nudCRF);
this.groupBoxH264.Controls.Add(this.lblCRF);
this.groupBoxH264.Controls.Add(this.lblPreset);
this.groupBoxH264.Controls.Add(this.comboBoxPreset);
this.groupBoxH264.Location = new System.Drawing.Point(8, 40);
this.groupBoxH264.Name = "groupBoxH264";
this.groupBoxH264.Size = new System.Drawing.Size(216, 96);
this.groupBoxH264.TabIndex = 22;
this.groupBoxH264.TabStop = false;
this.groupBoxH264.Text = "H.264";
this.gbH264.Controls.Add(this.nudCRF);
this.gbH264.Controls.Add(this.lblCRF);
this.gbH264.Controls.Add(this.lblPreset);
this.gbH264.Controls.Add(this.cbPreset);
this.gbH264.Location = new System.Drawing.Point(8, 40);
this.gbH264.Name = "gbH264";
this.gbH264.Size = new System.Drawing.Size(448, 88);
this.gbH264.TabIndex = 22;
this.gbH264.TabStop = false;
this.gbH264.Text = "H.264";
//
// groupBoxH263
// gbH263
//
this.groupBoxH263.Controls.Add(this.nudQscale);
this.groupBoxH263.Controls.Add(this.labelQscale);
this.groupBoxH263.Location = new System.Drawing.Point(240, 40);
this.groupBoxH263.Name = "groupBoxH263";
this.groupBoxH263.Size = new System.Drawing.Size(216, 96);
this.groupBoxH263.TabIndex = 23;
this.groupBoxH263.TabStop = false;
this.groupBoxH263.Text = "XviD";
this.gbH263.Controls.Add(this.nudQscale);
this.gbH263.Controls.Add(this.lblQscale);
this.gbH263.Location = new System.Drawing.Point(8, 40);
this.gbH263.Name = "gbH263";
this.gbH263.Size = new System.Drawing.Size(448, 88);
this.gbH263.TabIndex = 23;
this.gbH263.TabStop = false;
this.gbH263.Text = "XviD";
//
// labelQscale
// lblQscale
//
this.labelQscale.AutoSize = true;
this.labelQscale.Location = new System.Drawing.Point(16, 29);
this.labelQscale.Name = "labelQscale";
this.labelQscale.Size = new System.Drawing.Size(41, 13);
this.labelQscale.TabIndex = 15;
this.labelQscale.Text = "qscale:";
this.lblQscale.AutoSize = true;
this.lblQscale.Location = new System.Drawing.Point(16, 24);
this.lblQscale.Name = "lblQscale";
this.lblQscale.Size = new System.Drawing.Size(41, 13);
this.lblQscale.TabIndex = 15;
this.lblQscale.Text = "qscale:";
//
// groupBoxFFmpegExe
// gbFFmpegExe
//
this.groupBoxFFmpegExe.Controls.Add(this.btnDownload);
this.groupBoxFFmpegExe.Controls.Add(this.buttonFFmpegBrowse);
this.groupBoxFFmpegExe.Controls.Add(this.textBoxFFmpegPath);
this.groupBoxFFmpegExe.Location = new System.Drawing.Point(8, 144);
this.groupBoxFFmpegExe.Name = "groupBoxFFmpegExe";
this.groupBoxFFmpegExe.Size = new System.Drawing.Size(448, 56);
this.groupBoxFFmpegExe.TabIndex = 24;
this.groupBoxFFmpegExe.TabStop = false;
this.groupBoxFFmpegExe.Text = "ffmpeg.exe";
this.gbFFmpegExe.Controls.Add(this.btnDownload);
this.gbFFmpegExe.Controls.Add(this.btnFFmpegBrowse);
this.gbFFmpegExe.Controls.Add(this.tbFFmpegPath);
this.gbFFmpegExe.Location = new System.Drawing.Point(8, 136);
this.gbFFmpegExe.Name = "gbFFmpegExe";
this.gbFFmpegExe.Size = new System.Drawing.Size(448, 56);
this.gbFFmpegExe.TabIndex = 24;
this.gbFFmpegExe.TabStop = false;
this.gbFFmpegExe.Text = "ffmpeg.exe";
//
// btnDownload
//
@ -225,103 +225,103 @@ private void InitializeComponent()
this.btnDownload.UseVisualStyleBackColor = true;
this.btnDownload.Click += new System.EventHandler(this.btnDownload_Click);
//
// buttonFFmpegBrowse
// btnFFmpegBrowse
//
this.buttonFFmpegBrowse.Location = new System.Drawing.Point(320, 22);
this.buttonFFmpegBrowse.Name = "buttonFFmpegBrowse";
this.buttonFFmpegBrowse.Size = new System.Drawing.Size(40, 24);
this.buttonFFmpegBrowse.TabIndex = 1;
this.buttonFFmpegBrowse.Text = "...";
this.buttonFFmpegBrowse.UseVisualStyleBackColor = true;
this.buttonFFmpegBrowse.Click += new System.EventHandler(this.buttonFFmpegBrowse_Click);
this.btnFFmpegBrowse.Location = new System.Drawing.Point(320, 22);
this.btnFFmpegBrowse.Name = "btnFFmpegBrowse";
this.btnFFmpegBrowse.Size = new System.Drawing.Size(40, 24);
this.btnFFmpegBrowse.TabIndex = 1;
this.btnFFmpegBrowse.Text = "...";
this.btnFFmpegBrowse.UseVisualStyleBackColor = true;
this.btnFFmpegBrowse.Click += new System.EventHandler(this.buttonFFmpegBrowse_Click);
//
// textBoxFFmpegPath
// tbFFmpegPath
//
this.textBoxFFmpegPath.Location = new System.Drawing.Point(8, 24);
this.textBoxFFmpegPath.Name = "textBoxFFmpegPath";
this.textBoxFFmpegPath.Size = new System.Drawing.Size(304, 20);
this.textBoxFFmpegPath.TabIndex = 0;
this.tbFFmpegPath.Location = new System.Drawing.Point(8, 24);
this.tbFFmpegPath.Name = "tbFFmpegPath";
this.tbFFmpegPath.Size = new System.Drawing.Size(304, 20);
this.tbFFmpegPath.TabIndex = 0;
//
// groupBoxCommandLinePreview
// gbCommandLinePreview
//
this.groupBoxCommandLinePreview.Controls.Add(this.textBoxCommandLinePreview);
this.groupBoxCommandLinePreview.Location = new System.Drawing.Point(8, 272);
this.groupBoxCommandLinePreview.Name = "groupBoxCommandLinePreview";
this.groupBoxCommandLinePreview.Size = new System.Drawing.Size(448, 96);
this.groupBoxCommandLinePreview.TabIndex = 25;
this.groupBoxCommandLinePreview.TabStop = false;
this.groupBoxCommandLinePreview.Text = "Command line preview";
this.gbCommandLinePreview.Controls.Add(this.tbCommandLinePreview);
this.gbCommandLinePreview.Location = new System.Drawing.Point(8, 264);
this.gbCommandLinePreview.Name = "gbCommandLinePreview";
this.gbCommandLinePreview.Size = new System.Drawing.Size(448, 104);
this.gbCommandLinePreview.TabIndex = 25;
this.gbCommandLinePreview.TabStop = false;
this.gbCommandLinePreview.Text = "Command line preview";
//
// textBoxCommandLinePreview
// tbCommandLinePreview
//
this.textBoxCommandLinePreview.Location = new System.Drawing.Point(8, 24);
this.textBoxCommandLinePreview.Multiline = true;
this.textBoxCommandLinePreview.Name = "textBoxCommandLinePreview";
this.textBoxCommandLinePreview.ReadOnly = true;
this.textBoxCommandLinePreview.Size = new System.Drawing.Size(432, 64);
this.textBoxCommandLinePreview.TabIndex = 0;
this.tbCommandLinePreview.Location = new System.Drawing.Point(8, 24);
this.tbCommandLinePreview.Multiline = true;
this.tbCommandLinePreview.Name = "tbCommandLinePreview";
this.tbCommandLinePreview.ReadOnly = true;
this.tbCommandLinePreview.Size = new System.Drawing.Size(432, 72);
this.tbCommandLinePreview.TabIndex = 0;
//
// gbCommandLineArgs
//
this.gbCommandLineArgs.Controls.Add(this.buttonFFmpegHelp);
this.gbCommandLineArgs.Controls.Add(this.textBoxUserArgs);
this.gbCommandLineArgs.Location = new System.Drawing.Point(8, 208);
this.gbCommandLineArgs.Controls.Add(this.btnFFmpegHelp);
this.gbCommandLineArgs.Controls.Add(this.tbUserArgs);
this.gbCommandLineArgs.Location = new System.Drawing.Point(8, 200);
this.gbCommandLineArgs.Name = "gbCommandLineArgs";
this.gbCommandLineArgs.Size = new System.Drawing.Size(448, 56);
this.gbCommandLineArgs.TabIndex = 25;
this.gbCommandLineArgs.TabStop = false;
this.gbCommandLineArgs.Text = "Additional command line arguments";
//
// buttonFFmpegHelp
// btnFFmpegHelp
//
this.buttonFFmpegHelp.Location = new System.Drawing.Point(400, 22);
this.buttonFFmpegHelp.Name = "buttonFFmpegHelp";
this.buttonFFmpegHelp.Size = new System.Drawing.Size(40, 24);
this.buttonFFmpegHelp.TabIndex = 1;
this.buttonFFmpegHelp.Text = "?";
this.buttonFFmpegHelp.UseVisualStyleBackColor = true;
this.buttonFFmpegHelp.Click += new System.EventHandler(this.buttonFFmpegHelp_Click);
this.btnFFmpegHelp.Location = new System.Drawing.Point(400, 22);
this.btnFFmpegHelp.Name = "btnFFmpegHelp";
this.btnFFmpegHelp.Size = new System.Drawing.Size(40, 24);
this.btnFFmpegHelp.TabIndex = 1;
this.btnFFmpegHelp.Text = "?";
this.btnFFmpegHelp.UseVisualStyleBackColor = true;
this.btnFFmpegHelp.Click += new System.EventHandler(this.buttonFFmpegHelp_Click);
//
// textBoxUserArgs
// tbUserArgs
//
this.textBoxUserArgs.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.textBoxUserArgs.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystem;
this.textBoxUserArgs.Location = new System.Drawing.Point(8, 24);
this.textBoxUserArgs.Name = "textBoxUserArgs";
this.textBoxUserArgs.Size = new System.Drawing.Size(384, 20);
this.textBoxUserArgs.TabIndex = 0;
this.tbUserArgs.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.tbUserArgs.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystem;
this.tbUserArgs.Location = new System.Drawing.Point(8, 24);
this.tbUserArgs.Name = "tbUserArgs";
this.tbUserArgs.Size = new System.Drawing.Size(384, 20);
this.tbUserArgs.TabIndex = 0;
//
// FFmpegCLIOptionsForm
// FFmpegOptionsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(464, 378);
this.Controls.Add(this.gbH263);
this.Controls.Add(this.gbCommandLineArgs);
this.Controls.Add(this.groupBoxCommandLinePreview);
this.Controls.Add(this.groupBoxH263);
this.Controls.Add(this.groupBoxH264);
this.Controls.Add(this.comboBoxCodec);
this.Controls.Add(this.gbCommandLinePreview);
this.Controls.Add(this.gbH264);
this.Controls.Add(this.cbCodec);
this.Controls.Add(this.lblCodec);
this.Controls.Add(this.comboBoxExtension);
this.Controls.Add(this.cbExtension);
this.Controls.Add(this.lblExt);
this.Controls.Add(this.groupBoxFFmpegExe);
this.Controls.Add(this.gbFFmpegExe);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(480, 416);
this.Name = "FFmpegCLIOptionsForm";
this.Name = "FFmpegOptionsForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FFmpegGUI";
((System.ComponentModel.ISupportInitialize)(this.nudCRF)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudQscale)).EndInit();
this.groupBoxH264.ResumeLayout(false);
this.groupBoxH264.PerformLayout();
this.groupBoxH263.ResumeLayout(false);
this.groupBoxH263.PerformLayout();
this.groupBoxFFmpegExe.ResumeLayout(false);
this.groupBoxFFmpegExe.PerformLayout();
this.groupBoxCommandLinePreview.ResumeLayout(false);
this.groupBoxCommandLinePreview.PerformLayout();
this.gbH264.ResumeLayout(false);
this.gbH264.PerformLayout();
this.gbH263.ResumeLayout(false);
this.gbH263.PerformLayout();
this.gbFFmpegExe.ResumeLayout(false);
this.gbFFmpegExe.PerformLayout();
this.gbCommandLinePreview.ResumeLayout(false);
this.gbCommandLinePreview.PerformLayout();
this.gbCommandLineArgs.ResumeLayout(false);
this.gbCommandLineArgs.PerformLayout();
this.ResumeLayout(false);
@ -334,24 +334,24 @@ private void InitializeComponent()
private System.Windows.Forms.Label lblExt;
private System.Windows.Forms.Label lblCRF;
private System.Windows.Forms.NumericUpDown nudCRF;
private System.Windows.Forms.ToolTip toolTipFFmpeg;
private System.Windows.Forms.ComboBox comboBoxExtension;
private System.Windows.Forms.ToolTip tpFFmpeg;
private System.Windows.Forms.ComboBox cbExtension;
private System.Windows.Forms.Label lblCodec;
private System.Windows.Forms.ComboBox comboBoxCodec;
private System.Windows.Forms.ComboBox comboBoxPreset;
private System.Windows.Forms.ComboBox cbCodec;
private System.Windows.Forms.ComboBox cbPreset;
private System.Windows.Forms.Label lblPreset;
private System.Windows.Forms.GroupBox groupBoxH264;
private System.Windows.Forms.GroupBox groupBoxH263;
private System.Windows.Forms.GroupBox gbH264;
private System.Windows.Forms.GroupBox gbH263;
private System.Windows.Forms.NumericUpDown nudQscale;
private System.Windows.Forms.Label labelQscale;
private System.Windows.Forms.GroupBox groupBoxFFmpegExe;
private System.Windows.Forms.Button buttonFFmpegBrowse;
private System.Windows.Forms.TextBox textBoxFFmpegPath;
private System.Windows.Forms.GroupBox groupBoxCommandLinePreview;
private System.Windows.Forms.TextBox textBoxCommandLinePreview;
private System.Windows.Forms.Label lblQscale;
private System.Windows.Forms.GroupBox gbFFmpegExe;
private System.Windows.Forms.Button btnFFmpegBrowse;
private System.Windows.Forms.TextBox tbFFmpegPath;
private System.Windows.Forms.GroupBox gbCommandLinePreview;
private System.Windows.Forms.TextBox tbCommandLinePreview;
private System.Windows.Forms.GroupBox gbCommandLineArgs;
private System.Windows.Forms.Button buttonFFmpegHelp;
private System.Windows.Forms.TextBox textBoxUserArgs;
private System.Windows.Forms.Button btnFFmpegHelp;
private System.Windows.Forms.TextBox tbUserArgs;
private System.Windows.Forms.Button btnDownload;
}
}

View file

@ -68,25 +68,25 @@ public FFmpegOptionsForm(ScreencastOptions options)
private void LoadSettings()
{
comboBoxCodec.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegVideoCodec>());
comboBoxCodec.SelectedIndex = (int)Options.FFmpeg.VideoCodec;
comboBoxCodec.SelectedIndexChanged += (sender, e) => UpdateUI();
cbCodec.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegVideoCodec>());
cbCodec.SelectedIndex = (int)Options.FFmpeg.VideoCodec;
cbCodec.SelectedIndexChanged += (sender, e) => UpdateUI();
comboBoxExtension.Text = Options.FFmpeg.Extension;
comboBoxExtension.SelectedIndexChanged += (sender, e) => UpdateUI();
cbExtension.Text = Options.FFmpeg.Extension;
cbExtension.SelectedIndexChanged += (sender, e) => UpdateUI();
nudCRF.Value = Options.FFmpeg.CRF.Between((int)nudCRF.Minimum, (int)nudCRF.Maximum);
nudCRF.ValueChanged += (sender, e) => UpdateUI();
comboBoxPreset.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegPreset>());
comboBoxPreset.SelectedIndex = (int)Options.FFmpeg.Preset;
comboBoxPreset.SelectedIndexChanged += (sender, e) => UpdateUI();
cbPreset.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegPreset>());
cbPreset.SelectedIndex = (int)Options.FFmpeg.Preset;
cbPreset.SelectedIndexChanged += (sender, e) => UpdateUI();
nudQscale.Value = Options.FFmpeg.qscale.Between((int)nudQscale.Minimum, (int)nudQscale.Maximum);
nudQscale.ValueChanged += (sender, e) => UpdateUI();
textBoxUserArgs.Text = Options.FFmpeg.UserArgs;
textBoxUserArgs.TextChanged += (sender, e) => UpdateUI();
tbUserArgs.Text = Options.FFmpeg.UserArgs;
tbUserArgs.TextChanged += (sender, e) => UpdateUI();
string cli = "ffmpeg.exe";
if (string.IsNullOrEmpty(Options.FFmpeg.CLIPath) && File.Exists(cli))
@ -94,43 +94,47 @@ private void LoadSettings()
Options.FFmpeg.CLIPath = cli;
}
textBoxFFmpegPath.Text = Options.FFmpeg.CLIPath;
textBoxFFmpegPath.TextChanged += (sender, e) => UpdateUI();
tbFFmpegPath.Text = Options.FFmpeg.CLIPath;
tbFFmpegPath.TextChanged += (sender, e) => UpdateUI();
}
public void SaveSettings()
{
Options.FFmpeg.VideoCodec = (FFmpegVideoCodec)comboBoxCodec.SelectedIndex;
Options.FFmpeg.Extension = comboBoxExtension.Text;
Options.FFmpeg.VideoCodec = (FFmpegVideoCodec)cbCodec.SelectedIndex;
Options.FFmpeg.Extension = cbExtension.Text;
Options.FFmpeg.CRF = (int)nudCRF.Value;
Options.FFmpeg.Preset = (FFmpegPreset)comboBoxPreset.SelectedIndex;
Options.FFmpeg.Preset = (FFmpegPreset)cbPreset.SelectedIndex;
Options.FFmpeg.qscale = (int)nudQscale.Value;
Options.FFmpeg.UserArgs = textBoxUserArgs.Text;
Options.FFmpeg.UserArgs = tbUserArgs.Text;
Options.FFmpeg.CLIPath = textBoxFFmpegPath.Text;
Options.FFmpeg.CLIPath = tbFFmpegPath.Text;
}
public void UpdateUI()
{
SaveSettings();
groupBoxH263.Enabled = Options.FFmpeg.VideoCodec == FFmpegVideoCodec.libxvid;
groupBoxH264.Enabled = Options.FFmpeg.VideoCodec == FFmpegVideoCodec.libx264 || Options.FFmpeg.VideoCodec == FFmpegVideoCodec.libvpx;
gbH263.Visible = Options.FFmpeg.VideoCodec == FFmpegVideoCodec.libxvid;
gbH264.Visible = Options.FFmpeg.VideoCodec == FFmpegVideoCodec.libx264 || Options.FFmpeg.VideoCodec == FFmpegVideoCodec.libvpx;
if ((Options.FFmpeg.VideoCodec == FFmpegVideoCodec.libx264 || Options.FFmpeg.VideoCodec == FFmpegVideoCodec.libxvid) && comboBoxExtension.Text == "webm")
comboBoxExtension.Text = "mp4";
else if ((FFmpegVideoCodec)comboBoxCodec.SelectedIndex == FFmpegVideoCodec.libvpx && comboBoxExtension.Text != "webm")
comboBoxExtension.Text = "webm";
if ((Options.FFmpeg.VideoCodec == FFmpegVideoCodec.libx264 || Options.FFmpeg.VideoCodec == FFmpegVideoCodec.libxvid) && cbExtension.Text == "webm")
{
cbExtension.Text = "mp4";
}
else if (Options.FFmpeg.VideoCodec == FFmpegVideoCodec.libvpx && cbExtension.Text != "webm")
{
cbExtension.Text = "webm";
}
textBoxCommandLinePreview.Text = Options.GetFFmpegArgs();
tbCommandLinePreview.Text = Options.GetFFmpegArgs();
}
private void buttonFFmpegBrowse_Click(object sender, EventArgs e)
{
Helpers.BrowseFile("Browse for ffmpeg.exe", textBoxFFmpegPath, Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));
Helpers.BrowseFile("Browse for ffmpeg.exe", tbFFmpegPath, Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));
UpdateUI();
}
@ -146,11 +150,12 @@ private void btnDownload_Click(object sender, EventArgs e)
private void DownloaderForm_InstallRequested(string filePath)
{
bool result = FFmpegHelper.ExtractFFmpeg(filePath, DefaultToolsPath ?? "ffmpeg.exe");
string extractPath = DefaultToolsPath ?? "ffmpeg.exe";
bool result = FFmpegHelper.ExtractFFmpeg(filePath, extractPath);
if (result)
{
this.InvokeSafe(() => textBoxFFmpegPath.Text = DefaultToolsPath);
this.InvokeSafe(() => tbFFmpegPath.Text = extractPath);
MessageBox.Show("FFmpeg successfully downloaded.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else

View file

@ -117,7 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTipFFmpeg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="tpFFmpeg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="nudCRF.ToolTip" xml:space="preserve">

View file

@ -686,6 +686,7 @@ private void btnScreenRecorderOptions_Click(object sender, EventArgs e)
case ScreenRecordOutput.FFmpeg:
using (FFmpegOptionsForm form = new FFmpegOptionsForm(options))
{
form.DefaultToolsPath = Path.Combine(Program.ToolsFolder, "ffmpeg.exe");
form.ShowDialog();
}
break;

View file

@ -101,8 +101,8 @@ public bool IsUsingDefaultSettings
get
{
return UseDefaultAfterCaptureJob && UseDefaultAfterUploadJob && UseDefaultDestinations && UseDefaultGeneralSettings &&
UseDefaultImageSettings && UseDefaultCaptureSettings && UseDefaultUploadSettings && UseDefaultActions &&
UseDefaultIndexerSettings && UseDefaultAdvancedSettings && !WatchFolderEnabled;
UseDefaultImageSettings && UseDefaultCaptureSettings && UseDefaultUploadSettings && UseDefaultActions &&
UseDefaultIndexerSettings && UseDefaultAdvancedSettings && !WatchFolderEnabled;
}
}
@ -203,7 +203,9 @@ public string CaptureFolder
get
{
if (!string.IsNullOrEmpty(AdvancedSettings.CapturePath))
{
return AdvancedSettings.CapturePath;
}
return Program.ScreenshotsFolder;
}