moar logging stuff & print "... - HDR" if input is HDR

This commit is contained in:
n00mkrad
2025-12-24 02:19:26 +01:00
parent d9a6798211
commit ff7d6a9f75
2 changed files with 6 additions and 9 deletions

View File

@@ -243,14 +243,14 @@ namespace Flowframes
if (maxDeviationPercent > 20f)
{
Logger.Log($"Max timestamp deviation is {maxDeviationPercent.ToString("0.##")}% or {maxDeviationMs} ms - Assuming VFR input!", hidden: true);
Logger.Log($"[VFR Check] Max timestamp deviation is {maxDeviationPercent.ToString("0.##")}% or {maxDeviationMs} ms - Assuming VFR input!", hidden: true);
mediaFile.IsVfr = true;
}
}
public static async Task<Fraction> GetFramerate(string inputFile, bool preferFfmpeg = false)
{
Logger.Log($"GetFramerate(inputFile = '{inputFile}', preferFfmpeg = {preferFfmpeg})", true, false, "ffmpeg");
Logger.Log($"Getting FPS from '{inputFile}', preferFfmpeg = {preferFfmpeg}", true, false, "ffmpeg");
Fraction ffprobeFps = new Fraction(0, 1);
Fraction ffmpegFps = new Fraction(0, 1);

View File

@@ -50,14 +50,14 @@ namespace Flowframes.Ui
string fpsStr = fps.Float > 0 ? FormatUtils.Fraction(fps) : "Not Found";
Program.mainForm.currInFpsDetected = fps;
fpsInTbox.Text = fps.GetString();
Logger.Log($"Video FPS: {fpsStr} - Total Number Of Frames: {Interpolate.currentMediaFile.FrameCount}", false, true);
Logger.Log($"Video FPS: {fpsStr} - Total Number Of Frames: {Interpolate.currentMediaFile.FrameCount}{(Interpolate.currentMediaFile.VideoExtraData.IsHdr ? " - HDR" : "")}", false, true);
Program.mainForm.GetInputFpsTextbox().ReadOnly = (fps.Float > 0 && !Config.GetBool("allowCustomInputRate", false));
Program.mainForm.currInFps = fps;
Program.mainForm.currInFrames = Interpolate.currentMediaFile.FrameCount;
Program.mainForm.UpdateInputInfo();
CheckExistingFolder(path, outputTbox.Text.Trim());
// await Task.Delay(10);
await PrintResolution(path);
await UpdateRes(path);
// await Task.Delay(10);
// InterpolationProgress.SetPreviewImg(await GetThumbnail(path));
@@ -125,18 +125,15 @@ namespace Flowframes.Ui
}
}
static async Task PrintResolution (string path)
static async Task UpdateRes (string path)
{
Size res = new Size();
var res = new Size();
if(path == Interpolate.currentSettings?.inPath)
res = Interpolate.currentSettings.InputResolution;
else
res = await GetMediaResolutionCached.GetSizeAsync(path);
if (res.Width > 1 && res.Height > 1)
Logger.Log($"Input Resolution: {res.Width}x{res.Height}");
Program.mainForm.currInRes = res;
Program.mainForm.UpdateInputInfo();
}