mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-02 21:20:28 +12:00
Two preconfigured CLI video encoders
This commit is contained in:
parent
c1ff163cc8
commit
506ab5167d
|
@ -121,6 +121,11 @@ private void LoadSettings()
|
|||
cbDontShowPrintSettingDialog.Checked = Program.Settings.DontShowPrintSettingsDialog;
|
||||
|
||||
// Profiles
|
||||
if (Program.Settings.VideoEncoders.Count == 0)
|
||||
{
|
||||
Program.Settings.VideoEncoders.Add(new VideoEncoder() { Name = "x264 encoder to MP4", Path = "x264.exe", Args = "--output %output %input", OutputExtension = "mp4" });
|
||||
Program.Settings.VideoEncoders.Add(new VideoEncoder() { Name = "ffmpeg encoder to WebM", Path = "ffmpeg.exe", Args = "-i %input -c:v libvpx -crf 12 -b:v 500K %output", OutputExtension = "webm" });
|
||||
}
|
||||
Program.Settings.VideoEncoders.ForEach(x => AddVideoEncoder(x));
|
||||
|
||||
// Advanced
|
||||
|
|
|
@ -86,12 +86,12 @@ public async void StartRecording(TaskSettings TaskSettings)
|
|||
{
|
||||
if (!Program.Settings.VideoEncoders.IsValidIndex(TaskSettings.CaptureSettings.VideoEncoderSelected))
|
||||
{
|
||||
MessageBox.Show("Screen recorder CLI encoder not selected.", "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
MessageBox.Show("There is no valid CLI video encoder selected.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else if (!Program.Settings.VideoEncoders[TaskSettings.CaptureSettings.VideoEncoderSelected].IsValid())
|
||||
{
|
||||
MessageBox.Show("Screen recorder CLI file path have problem.", "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
MessageBox.Show("There is a problem with the CLI video encoder file path.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -202,9 +202,9 @@ public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
|
|||
|
||||
private void UpdateVideoEncoders()
|
||||
{
|
||||
cboEncoder.Items.Clear();
|
||||
if (Program.Settings.VideoEncoders.Count > 0)
|
||||
{
|
||||
cboEncoder.Items.Clear();
|
||||
Program.Settings.VideoEncoders.ForEach(x => cboEncoder.Items.Add(x));
|
||||
cboEncoder.SelectedIndex = TaskSettings.CaptureSettings.VideoEncoderSelected.BetweenOrDefault(0, Program.Settings.VideoEncoders.Count - 1);
|
||||
}
|
||||
|
@ -615,7 +615,7 @@ private void cbCaptureTransparent_CheckedChanged(object sender, EventArgs e)
|
|||
private void cbScreenRecorderOutput_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
TaskSettings.CaptureSettings.ScreenRecordOutput = (ScreenRecordOutput)cbScreenRecorderOutput.SelectedIndex;
|
||||
cboEncoder.Enabled = TaskSettings.CaptureSettings.ScreenRecordOutput == ScreenRecordOutput.AVICommandLine;
|
||||
btnEncoderConfig.Enabled = cboEncoder.Enabled = TaskSettings.CaptureSettings.ScreenRecordOutput == ScreenRecordOutput.AVICommandLine;
|
||||
}
|
||||
|
||||
private void cboEncoder_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in a new issue