diff --git a/Code/AudioVideo/FFmpegCommands.cs b/Code/AudioVideo/FFmpegCommands.cs index a79d345..0f7ccbf 100644 --- a/Code/AudioVideo/FFmpegCommands.cs +++ b/Code/AudioVideo/FFmpegCommands.cs @@ -46,6 +46,7 @@ namespace Flowframes string args = $"-i {inputFile.Wrap()} {pngComprArg} -vsync 0 -pix_fmt rgb24 {timecodeStr} {vf} {sizeStr} \"{frameFolderPath}/%{pad}d.png\""; AvProcess.LogMode logMode = Interpolate.currentInputFrameCount > 50 ? AvProcess.LogMode.OnlyLastLine : AvProcess.LogMode.Hidden; await AvProcess.RunFfmpeg(args, logMode); + if (!sceneDetect) Logger.Log($"Extracted {IOUtils.GetAmountOfFiles(frameFolderPath, false, "*.png")} frames from input.", false, true); await Task.Delay(1); if (delSrc) DeleteSource(inputFile); diff --git a/Code/Main/InterpolateUtils.cs b/Code/Main/InterpolateUtils.cs index 4c6bb8c..00b5413 100644 --- a/Code/Main/InterpolateUtils.cs +++ b/Code/Main/InterpolateUtils.cs @@ -285,7 +285,7 @@ namespace Flowframes.Main Logger.Log("Message: " + msg, true); } - public static Size GetOutputResolution (string inputPath) + public static Size GetOutputResolution (string inputPath, bool print = true) { Size resolution = IOUtils.GetVideoRes(inputPath); int maxHeight = RoundDiv2(Config.GetInt("maxVidHeight")); @@ -294,7 +294,8 @@ namespace Flowframes.Main float factor = (float)maxHeight / resolution.Height; Logger.Log($"Un-rounded downscaled size: {(resolution.Width * factor).ToString("0.00")}x{Config.GetInt("maxVidHeight")}", true); int width = RoundDiv2((resolution.Width * factor).RoundToInt()); - Logger.Log($"Video is bigger than the maximum - Downscaling to {width}x{maxHeight}."); + if(print) + Logger.Log($"Video is bigger than the maximum - Downscaling to {width}x{maxHeight}."); return new Size(width, maxHeight); } else diff --git a/Code/OS/AiProcess.cs b/Code/OS/AiProcess.cs index 1028393..c967c62 100644 --- a/Code/OS/AiProcess.cs +++ b/Code/OS/AiProcess.cs @@ -150,7 +150,7 @@ namespace Flowframes { string rifeDir = Path.Combine(Paths.GetPkgPath(), Path.GetFileNameWithoutExtension(Packages.rifeCuda.fileName)); string script = "inference_video.py"; - bool uhd = InterpolateUtils.GetOutputResolution(Interpolate.current.inPath).Height >= Config.GetInt("uhdThresh"); + bool uhd = InterpolateUtils.GetOutputResolution(Interpolate.current.inPath, false).Height >= Config.GetInt("uhdThresh"); string uhdStr = uhd ? "--UHD" : ""; string args = $" --img {framesPath.Wrap()} --exp {(int)Math.Log(interpFactor, 2)} {uhdStr} --imgformat {InterpolateUtils.GetOutExt()} --output {Paths.interpDir}";