From 3e41b05b28ef638c6c2187dc561ab03cf4c918e6 Mon Sep 17 00:00:00 2001 From: n00mkrad Date: Fri, 22 Apr 2022 09:22:23 +0200 Subject: [PATCH] Better ffmpeg log formatting for pass 1 of 2 --- Code/MiscUtils/FormatUtils.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Code/MiscUtils/FormatUtils.cs b/Code/MiscUtils/FormatUtils.cs index b7c1ae9..d83ee07 100644 --- a/Code/MiscUtils/FormatUtils.cs +++ b/Code/MiscUtils/FormatUtils.cs @@ -174,9 +174,14 @@ namespace Flowframes.MiscUtils public static string BeautifyFfmpegStats (string line) { - return line.Remove("q=-0.0").Remove("q=-1.0").Remove("size=N/A").Remove("bitrate=N/A").Replace("frame=", "Frame: ") + line = line.Remove("q=-0.0").Remove("q=-1.0").Remove("size=N/A").Remove("bitrate=N/A").Replace("frame=", "Frame: ") .Replace("fps=", "FPS: ").Replace("q=", "QP: ").Replace("time=", "Time: ").Replace("speed=", "Relative Speed: ") .Replace("bitrate=", "Bitrate: ").Replace("Lsize=", "Size: ").Replace("size=", "Size: ").TrimWhitespaces(); + + if(!line.Contains("Bitrate: ") && line.Contains(" 0x")) + line = line.Split(" QP: ").FirstOrDefault().Trim() + " (Analysing...)"; + + return line; } } }