mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
CLI Video Encoder fixes
This commit is contained in:
parent
57bbee03d0
commit
160098b761
8 changed files with 17 additions and 15 deletions
|
@ -1,4 +1,7 @@
|
|||
* Support for secondary uploaders if primary uploaders fail
|
||||
ShareX 8.7.2
|
||||
|
||||
* CLI Video Encoder configurations are now managed in Application Settings
|
||||
* Support for secondary uploaders if primary uploaders fail
|
||||
|
||||
ShareX 8.7.1 - 2014-04-09
|
||||
|
||||
|
|
|
@ -35,21 +35,17 @@ namespace HelpersLib
|
|||
{
|
||||
public class VideoEncoder
|
||||
{
|
||||
[DefaultValue("x264 encoder to MP4")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[DefaultValue("x264.exe")]
|
||||
public string Path { get; set; }
|
||||
|
||||
[DefaultValue("--output %output %input")]
|
||||
public string Args { get; set; }
|
||||
|
||||
[DefaultValue("mp4")]
|
||||
public string OutputExtension { get; set; }
|
||||
|
||||
public VideoEncoder()
|
||||
{
|
||||
this.ApplyDefaultPropertyValues();
|
||||
Name = "x264 encoder to MP4";
|
||||
Path = "x264.exe";
|
||||
Args = "--output %output %input";
|
||||
OutputExtension = "mp4";
|
||||
}
|
||||
|
||||
/// <param name="sourceFilePath">AVI file path</param>
|
||||
|
|
|
@ -106,7 +106,6 @@ public ApplicationConfig()
|
|||
#region Profiles
|
||||
|
||||
public List<VideoEncoder> VideoEncoders = new List<VideoEncoder>();
|
||||
public int VideoEncoderId = 0;
|
||||
|
||||
#endregion Profiles
|
||||
|
||||
|
|
1
ShareX/Forms/EncoderProgramForm.Designer.cs
generated
1
ShareX/Forms/EncoderProgramForm.Designer.cs
generated
|
@ -139,6 +139,7 @@ private void InitializeComponent()
|
|||
//
|
||||
// EncoderProgramForm
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(324, 145);
|
||||
|
|
1
ShareX/Forms/ExternalProgramForm.Designer.cs
generated
1
ShareX/Forms/ExternalProgramForm.Designer.cs
generated
|
@ -119,6 +119,7 @@ private void InitializeComponent()
|
|||
//
|
||||
// ExternalProgramForm
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(327, 121);
|
||||
|
|
|
@ -149,7 +149,7 @@ await TaskEx.Run(() =>
|
|||
case ScreenRecordOutput.AVICommandLine:
|
||||
if (Program.Settings.VideoEncoders.Count > 0)
|
||||
{
|
||||
VideoEncoder encoder = Program.Settings.VideoEncoders[Program.Settings.VideoEncoderId.BetweenOrDefault(0, Program.Settings.VideoEncoders.Count - 1)];
|
||||
VideoEncoder encoder = Program.Settings.VideoEncoders[TaskSettings.CaptureSettings.VideoEncoderSelected.BetweenOrDefault(0, Program.Settings.VideoEncoders.Count - 1)];
|
||||
path = Path.Combine(TaskSettings.CaptureFolder, TaskHelpers.GetFilename(TaskSettings, encoder.OutputExtension));
|
||||
screenRecorder.EncodeUsingCommandLine(encoder, path);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public partial class TaskSettingsForm : Form
|
|||
private ToolStripDropDownItem tsmiImageFileUploaders, tsmiTextFileUploaders;
|
||||
private bool loaded;
|
||||
|
||||
private readonly string ConfigureEncoder = "<--- Configure video encoders --->";
|
||||
private readonly string ConfigureEncoder = "<--- configure video encoders --->";
|
||||
|
||||
public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
|
||||
{
|
||||
|
@ -206,9 +206,9 @@ private void UpdateVideoEncoders()
|
|||
{
|
||||
cboEncoder.Items.Clear();
|
||||
Program.Settings.VideoEncoders.ForEach(x => cboEncoder.Items.Add(x));
|
||||
cboEncoder.Items.Add(ConfigureEncoder);
|
||||
cboEncoder.SelectedIndex = Program.Settings.VideoEncoderId.BetweenOrDefault(0, Program.Settings.VideoEncoders.Count - 1);
|
||||
cboEncoder.SelectedIndex = TaskSettings.CaptureSettings.VideoEncoderSelected.BetweenOrDefault(0, Program.Settings.VideoEncoders.Count - 1);
|
||||
}
|
||||
cboEncoder.Items.Add(ConfigureEncoder);
|
||||
}
|
||||
|
||||
private void UpdateDefaultSettingVisibility()
|
||||
|
@ -628,7 +628,7 @@ private void cboEncoder_SelectedIndexChanged(object sender, EventArgs e)
|
|||
}
|
||||
else
|
||||
{
|
||||
Program.Settings.VideoEncoderId = cboEncoder.SelectedIndex;
|
||||
TaskSettings.CaptureSettings.VideoEncoderSelected = cboEncoder.SelectedIndex;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -274,6 +274,8 @@ public class TaskSettingsCapture
|
|||
public float ScreenRecordDuration = 3f;
|
||||
public float ScreenRecordStartDelay = 0.1f;
|
||||
|
||||
public int VideoEncoderSelected = 0;
|
||||
|
||||
#endregion Capture / Screen recorder
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue