From 75db94d70de502dc0254e7e8dd0f9f2502342954 Mon Sep 17 00:00:00 2001 From: n00mkrad <61149547+n00mkrad@users.noreply.github.com> Date: Sat, 18 Apr 2026 02:09:07 +0200 Subject: [PATCH] Fix bad ffprobe parsing due to loglevel, add missing return in vfr check --- CodeLegacy/Media/FfmpegCommands.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CodeLegacy/Media/FfmpegCommands.cs b/CodeLegacy/Media/FfmpegCommands.cs index 7c578b7..0532139 100644 --- a/CodeLegacy/Media/FfmpegCommands.cs +++ b/CodeLegacy/Media/FfmpegCommands.cs @@ -157,7 +157,7 @@ namespace Flowframes else { Logger.Log($"[{nameof(GetDurationMs)}] Reading duration using packet timestamps", true, false, "ffmpeg"); - string argsPackets = $"ffprobe -v error -select_streams v:0 -show_packets -show_entries packet=pts_time -of csv=p=0 {inputFile.Wrap()}"; + string argsPackets = $"ffprobe -v fatal -select_streams v:0 -show_packets -show_entries packet=pts_time -of csv=p=0 {inputFile.Wrap()}"; var outputLinesPackets = NUtilsTemp.OsUtils.RunCommand($"cd /D {GetAvDir().Wrap()} && {argsPackets}").SplitIntoLines().Where(l => l.IsNotEmpty()).ToList(); if (outputLinesPackets == null || outputLinesPackets.Count == 0) @@ -178,7 +178,7 @@ namespace Flowframes if (outputLinesPackets == null) { - string argsPackets = $"ffprobe -v error -select_streams v:0 -show_packets -show_entries packet=pts_time -read_intervals \"%+120\" -of csv=p=0 {inputFile.Wrap()}"; + string argsPackets = $"ffprobe -v fatal -select_streams v:0 -show_packets -show_entries packet=pts_time -read_intervals \"%+120\" -of csv=p=0 {inputFile.Wrap()}"; outputLinesPackets = NUtilsTemp.OsUtils.RunCommand($"cd /D {GetAvDir().Wrap()} && {argsPackets}").SplitIntoLines().Where(l => l.IsNotEmpty()).ToList(); } @@ -247,6 +247,7 @@ namespace Flowframes { Logger.Log($"[VFR Check] Max timestamp deviation is {maxDevPercentStr} ({maxDevMsStr}) - Assuming VFR input!", hidden: true); mediaFile.IsVfr = true; + return; } Logger.Log($"[VFR Check] Max timestamp deviation is only {maxDevPercentStr} ({maxDevMsStr}) - Assuming CFR input.", hidden: true); @@ -342,7 +343,7 @@ namespace Flowframes public static async Task ReadFrameCountFfprobePacketCount(string filePath) { - string args = $"ffprobe -v error -select_streams v:0 -count_packets -show_entries stream=nb_read_packets -of csv=p=0 {filePath.Wrap()}"; + string args = $"ffprobe -v fatal -select_streams v:0 -count_packets -show_entries stream=nb_read_packets -of csv=p=0 {filePath.Wrap()}"; var outputLines = (await Task.Run(() => NUtilsTemp.OsUtils.RunCommand($"cd /D {GetAvDir().Wrap()} && {args}"))).SplitIntoLines().Where(l => l.IsNotEmpty()); if (outputLines == null || !outputLines.Any())