mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-30 23:09:31 -06:00
improving logging for video nodes
This commit is contained in:
@@ -158,6 +158,8 @@ namespace FileFlows.VideoNodes
|
||||
}
|
||||
else
|
||||
{
|
||||
if (e.Data.Contains("Skipping NAL unit"))
|
||||
return; // just slighlty ignore these
|
||||
if (rgxTime.IsMatch(e.Data))
|
||||
{
|
||||
var timeString = rgxTime.Match(e.Data).Value;
|
||||
|
||||
@@ -142,10 +142,14 @@ namespace FileFlows.VideoNodes
|
||||
if (rgxBps.IsMatch(info) && float.TryParse(rgxBps.Match(info).Value, out float bps))
|
||||
vs.Bitrate = bps;
|
||||
|
||||
if (rgxDuration.IsMatch(info) && TimeSpan.TryParse(rgxDuration.Match(info).Value, out TimeSpan duration))
|
||||
if (rgxDuration.IsMatch(info) && TimeSpan.TryParse(rgxDuration.Match(info).Value, out TimeSpan duration) && duration.TotalSeconds > 0)
|
||||
vs.Duration = duration;
|
||||
else if (rgxDuration2.IsMatch(fullOutput) && TimeSpan.TryParse(rgxDuration2.Match(fullOutput).Value, out TimeSpan duration2))
|
||||
else if (rgxDuration2.IsMatch(fullOutput) && TimeSpan.TryParse(rgxDuration2.Match(fullOutput).Value, out TimeSpan duration2) && duration2.TotalSeconds > 0)
|
||||
vs.Duration = duration2;
|
||||
else
|
||||
{
|
||||
Logger?.ILog("Failed to read duration for VideoStream: " + info);
|
||||
}
|
||||
|
||||
return vs;
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user