From 2f37b68db7af4437f42ffd4d41e60e66b7743a7b Mon Sep 17 00:00:00 2001 From: reven Date: Wed, 22 Dec 2021 21:25:57 +1300 Subject: [PATCH] fixing detect black bars, again --- VideoNodes/LogicalNodes/DetectBlackBars.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/VideoNodes/LogicalNodes/DetectBlackBars.cs b/VideoNodes/LogicalNodes/DetectBlackBars.cs index 2b3882c8..37a57c02 100644 --- a/VideoNodes/LogicalNodes/DetectBlackBars.cs +++ b/VideoNodes/LogicalNodes/DetectBlackBars.cs @@ -56,12 +56,15 @@ namespace FileFlows.VideoNodes string error = process.StandardError.ReadToEnd(); process.WaitForExit(); - var dimMatch = Regex.Match(output, @"Stream #[\d]+:[\d]+: Video:(.*?)([\d]+)x([\d]+)", RegexOptions.Multiline); + var dimMatch = Regex.Match(output, @"Stream #[\d]+:[\d]+(.*?)Video:(.*?)([\d]+)x([\d]+)", RegexOptions.Multiline); if (dimMatch.Success == false) + { + args.Logger?.WLog("Can't find dimensions for video"); return String.Empty; // cant find dimensions + } - int vidWidth = int.Parse(dimMatch.Groups[2].Value); - int vidHeight = int.Parse(dimMatch.Groups[3].Value); + int vidWidth = int.Parse(dimMatch.Groups[3].Value); + int vidHeight = int.Parse(dimMatch.Groups[4].Value); args.Logger?.DLog($"Video dimensions: {vidWidth}x{vidHeight}");