mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Set FFmpeg path by default
This commit is contained in:
parent
e07758246c
commit
10cebbb0ae
5 changed files with 11 additions and 5 deletions
|
@ -161,5 +161,10 @@ public FFmpegOptions()
|
|||
Vorbis_qscale = 3;
|
||||
MP3_qscale = 4;
|
||||
}
|
||||
|
||||
public FFmpegOptions(string ffmpegPath) : this()
|
||||
{
|
||||
CLIPath = ffmpegPath;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -855,7 +855,7 @@ private void btnScreenRecorderFFmpegOptions_Click(object sender, EventArgs e)
|
|||
|
||||
using (FFmpegOptionsForm form = new FFmpegOptionsForm(options))
|
||||
{
|
||||
form.DefaultToolsPath = Path.Combine(Program.ToolsFolder, "ffmpeg.exe");
|
||||
form.DefaultToolsPath = Program.DefaultFFmpegPath;
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -238,6 +238,8 @@ public static string ScreenshotsFolder
|
|||
|
||||
public static string ToolsFolder => Path.Combine(PersonalPath, "Tools");
|
||||
|
||||
public static string DefaultFFmpegPath => Path.Combine(ToolsFolder, "ffmpeg.exe");
|
||||
|
||||
public static string ChromeHostManifestPath => Path.Combine(ToolsFolder, "Chrome-host-manifest.json");
|
||||
|
||||
public static string ChromeHostPath => Helpers.GetAbsolutePath("ShareX_Chrome.exe");
|
||||
|
|
|
@ -804,7 +804,7 @@ public static bool CheckFFmpeg(TaskSettings taskSettings)
|
|||
if (FFmpegDownloader.DownloadFFmpeg(false, DownloaderForm_InstallRequested) == DialogResult.OK)
|
||||
{
|
||||
Program.DefaultTaskSettings.CaptureSettings.FFmpegOptions.CLIPath = taskSettings.TaskSettingsReference.CaptureSettings.FFmpegOptions.CLIPath =
|
||||
taskSettings.CaptureSettings.FFmpegOptions.CLIPath = Path.Combine(Program.ToolsFolder, "ffmpeg.exe");
|
||||
taskSettings.CaptureSettings.FFmpegOptions.CLIPath = Program.DefaultFFmpegPath;
|
||||
|
||||
#if STEAM
|
||||
Program.DefaultTaskSettings.CaptureSettings.FFmpegOptions.OverrideCLIPath = taskSettings.TaskSettingsReference.CaptureSettings.FFmpegOptions.OverrideCLIPath =
|
||||
|
@ -823,8 +823,7 @@ public static bool CheckFFmpeg(TaskSettings taskSettings)
|
|||
|
||||
private static void DownloaderForm_InstallRequested(string filePath)
|
||||
{
|
||||
string extractPath = Path.Combine(Program.ToolsFolder, "ffmpeg.exe");
|
||||
bool result = FFmpegDownloader.ExtractFFmpeg(filePath, extractPath);
|
||||
bool result = FFmpegDownloader.ExtractFFmpeg(filePath, Program.DefaultFFmpegPath);
|
||||
|
||||
if (result)
|
||||
{
|
||||
|
|
|
@ -312,7 +312,7 @@ public class TaskSettingsCapture
|
|||
|
||||
#region Capture / Screen recorder
|
||||
|
||||
public FFmpegOptions FFmpegOptions = new FFmpegOptions();
|
||||
public FFmpegOptions FFmpegOptions = new FFmpegOptions(Program.DefaultFFmpegPath);
|
||||
public int ScreenRecordFPS = 20;
|
||||
public int GIFFPS = 5;
|
||||
public ScreenRecordGIFEncoding GIFEncoding = ScreenRecordGIFEncoding.FFmpeg;
|
||||
|
|
Loading…
Reference in a new issue