mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-28 15:31:30 +12:00
Removed -hide_banner
This commit is contained in:
parent
ccc2db5aec
commit
1d1581dd42
4 changed files with 8 additions and 11 deletions
|
@ -183,7 +183,7 @@ public VideoInfo GetVideoInfo(string videoPath)
|
|||
VideoInfo videoInfo = new VideoInfo();
|
||||
videoInfo.FilePath = videoPath;
|
||||
|
||||
Run($"-hide_banner -i \"{videoPath}\"");
|
||||
Run($"-i \"{videoPath}\"");
|
||||
string output = Output.ToString();
|
||||
|
||||
Match matchInput = Regex.Match(output, @"Duration: (?<Duration>\d{2}:\d{2}:\d{2}\.\d{2}),.+?start: (?<Start>\d+\.\d+),.+?bitrate: (?<Bitrate>\d+) kb/s",
|
||||
|
@ -225,7 +225,7 @@ public DirectShowDevices GetDirectShowDevices()
|
|||
{
|
||||
DirectShowDevices devices = new DirectShowDevices();
|
||||
|
||||
Run("-hide_banner -list_devices true -f dshow -i dummy");
|
||||
Run("-list_devices true -f dshow -i dummy");
|
||||
|
||||
string output = Output.ToString();
|
||||
string[] lines = output.Lines();
|
||||
|
@ -282,7 +282,7 @@ public void ConcatenateVideos(string[] inputFiles, string outputFile, bool autoD
|
|||
|
||||
try
|
||||
{
|
||||
bool result = Run($"-hide_banner -f concat -safe 0 -i \"{listFile}\" -c copy \"{outputFile}\"");
|
||||
bool result = Run($"-f concat -safe 0 -i \"{listFile}\" -c copy \"{outputFile}\"");
|
||||
|
||||
if (result && autoDeleteInputFiles)
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@ You should have received a copy of the GNU General Public License
|
|||
using ShareX.HelpersLib;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace ShareX.MediaLib
|
||||
|
@ -57,13 +58,13 @@ public string OutputFilePath
|
|||
}
|
||||
}
|
||||
|
||||
private static readonly string[] AnimationOnlyFiles = new string[] { "gif", "webp", "png", "apng" };
|
||||
|
||||
public bool IsInputFileAnimationOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return InputFilePath.EndsWith(".png", StringComparison.OrdinalIgnoreCase) ||
|
||||
InputFilePath.EndsWith(".apng", StringComparison.OrdinalIgnoreCase) ||
|
||||
InputFilePath.EndsWith(".webp", StringComparison.OrdinalIgnoreCase);
|
||||
return AnimationOnlyFiles.Any(x => InputFilePath.EndsWith("." + x, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,9 +95,6 @@ public string GetFFmpegArgs()
|
|||
{
|
||||
StringBuilder args = new StringBuilder();
|
||||
|
||||
// Hide FFmpeg banner
|
||||
args.Append("-hide_banner ");
|
||||
|
||||
// Input file path
|
||||
args.Append($"-i \"{InputFilePath}\" ");
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ public bool FFmpegEncodeAsGIF(string input, string output)
|
|||
ffmpeg.TrackEncodeProgress = true;
|
||||
|
||||
StringBuilder args = new StringBuilder();
|
||||
args.Append("-hide_banner ");
|
||||
|
||||
args.Append($"-i \"{input}\" ");
|
||||
|
||||
// https://ffmpeg.org/ffmpeg-filters.html#palettegen-1
|
||||
|
|
|
@ -91,7 +91,6 @@ public string GetFFmpegArgs(bool isCustom = false)
|
|||
}
|
||||
|
||||
StringBuilder args = new StringBuilder();
|
||||
args.Append("-hide_banner "); // All FFmpeg tools will normally show a copyright notice, build options and library versions. This option can be used to suppress printing this information.
|
||||
|
||||
string framerate = isCustom ? "$fps$" : FPS.ToString();
|
||||
|
||||
|
|
Loading…
Reference in a new issue