From 5b7ca3e1304795906890d2a7f785bea180051fd1 Mon Sep 17 00:00:00 2001 From: Jaex Date: Sat, 8 Jan 2022 14:18:29 +0300 Subject: [PATCH] Added hide_banner to all FFmpeg args --- ShareX.MediaLib/FFmpegCLIManager.cs | 4 ++-- ShareX.ScreenCaptureLib/Screencast/ScreenRecorder.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ShareX.MediaLib/FFmpegCLIManager.cs b/ShareX.MediaLib/FFmpegCLIManager.cs index 915e9ea6f..ad49259ba 100644 --- a/ShareX.MediaLib/FFmpegCLIManager.cs +++ b/ShareX.MediaLib/FFmpegCLIManager.cs @@ -184,7 +184,7 @@ public VideoInfo GetVideoInfo(string videoPath) VideoInfo videoInfo = new VideoInfo(); videoInfo.FilePath = videoPath; - Run($"-i \"{videoPath}\" -hide_banner"); + Run($"-hide_banner -i \"{videoPath}\""); string output = Output.ToString(); Match matchInput = Regex.Match(output, @"Duration: (?\d{2}:\d{2}:\d{2}\.\d{2}),.+?start: (?\d+\.\d+),.+?bitrate: (?\d+) kb/s", @@ -226,7 +226,7 @@ public DirectShowDevices GetDirectShowDevices() { DirectShowDevices devices = new DirectShowDevices(); - Run("-list_devices true -f dshow -i dummy"); + Run("-hide_banner -list_devices true -f dshow -i dummy"); string output = Output.ToString(); string[] lines = output.Lines(); diff --git a/ShareX.ScreenCaptureLib/Screencast/ScreenRecorder.cs b/ShareX.ScreenCaptureLib/Screencast/ScreenRecorder.cs index 277997ece..31dfcf3ef 100644 --- a/ShareX.ScreenCaptureLib/Screencast/ScreenRecorder.cs +++ b/ShareX.ScreenCaptureLib/Screencast/ScreenRecorder.cs @@ -264,7 +264,7 @@ public bool FFmpegEncodeAsGIF(string input, string output) // https://ffmpeg.org/ffmpeg-filters.html#palettegen-1 // https://ffmpeg.org/ffmpeg-filters.html#paletteuse - return ffmpeg.Run($"-i \"{input}\" -lavfi \"palettegen=stats_mode={Options.FFmpeg.GIFStatsMode}[palette]," + + return ffmpeg.Run($"-hide_banner -i \"{input}\" -lavfi \"palettegen=stats_mode={Options.FFmpeg.GIFStatsMode}[palette]," + $"[0:v][palette]paletteuse=dither={Options.FFmpeg.GIFDither}" + $"{(Options.FFmpeg.GIFDither == FFmpegPaletteUseDither.bayer ? ":bayer_scale=" + Options.FFmpeg.GIFBayerScale : "")}\"" + $" -y \"{output}\"");