mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-09-01 19:51:28 +02:00
Check GIF max framerate, minor QOL & logging improvements
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Flowframes
|
||||
public static async Task Start()
|
||||
{
|
||||
canceled = false;
|
||||
if (!Utils.InputIsValid(current.inPath, current.outPath, current.outFps, current.interpFactor, current.tilesize)) return; // General input checks
|
||||
if (!Utils.InputIsValid(current.inPath, current.outPath, current.outFps, current.interpFactor, current.tilesize, current.outMode)) return; // General input checks
|
||||
if (!Utils.CheckAiAvailable(current.ai)) return; // Check if selected AI pkg is installed
|
||||
if (!Utils.CheckDeleteOldTempFolder()) return; // Try to delete temp folder if an old one exists
|
||||
if(!Utils.CheckPathValid(current.inPath)) return; // Check if input path/file is valid
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Flowframes.Main
|
||||
Program.mainForm.SetWorking(true);
|
||||
current = Program.mainForm.GetCurrentSettings();
|
||||
|
||||
if (!InterpolateUtils.InputIsValid(current.inPath, current.outPath, current.outFps, current.interpFactor, current.tilesize)) return; // General input checks
|
||||
if (!InterpolateUtils.InputIsValid(current.inPath, current.outPath, current.outFps, current.interpFactor, current.tilesize, current.outMode)) return; // General input checks
|
||||
|
||||
if (step.Contains("Extract Scene Changes"))
|
||||
{
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace Flowframes.Main
|
||||
return Path.Combine(basePath, Path.GetFileNameWithoutExtension(inPath).StripBadChars().Remove(" ").Trunc(30, false) + "-temp");
|
||||
}
|
||||
|
||||
public static bool InputIsValid(string inDir, string outDir, float fpsOut, int interp, int tilesize)
|
||||
public static bool InputIsValid(string inDir, string outDir, float fpsOut, int interp, int tilesize, Interpolate.OutMode outMode)
|
||||
{
|
||||
bool passes = true;
|
||||
|
||||
@@ -197,9 +197,14 @@ namespace Flowframes.Main
|
||||
ShowMessage("Interpolation factor is not valid!");
|
||||
passes = false;
|
||||
}
|
||||
if (passes && outMode == i.OutMode.VidGif && fpsOut >= 50)
|
||||
{
|
||||
ShowMessage("Invalid output frame rate!\nGIF does not properly support frame rates above 40 FPS.\nPlease use MP4, WEBM or another video format.");
|
||||
passes = false;
|
||||
}
|
||||
if (passes && fpsOut < 1 || fpsOut > 500)
|
||||
{
|
||||
ShowMessage("Invalid target frame rate - Must be 1-500.");
|
||||
ShowMessage("Invalid output frame rate - Must be 1-500.");
|
||||
passes = false;
|
||||
}
|
||||
if (passes && tilesize % 32 != 0 || tilesize < 128)
|
||||
|
||||
Reference in New Issue
Block a user