mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Don't allow >240 FPS when using SVT-AV1 (as this is the highest supported rate)
This commit is contained in:
@@ -40,7 +40,7 @@ namespace Flowframes
|
||||
if (!Utils.CheckAiAvailable(current.ai, current.model)) return; // Check if selected AI pkg is installed
|
||||
if (!AutoEncodeResume.resumeNextRun && !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
|
||||
if (!(await Utils.CheckEncoderValid())) return; // Check NVENC compat
|
||||
if (!(await Utils.CheckEncoderValid(current.outFps.GetFloat()))) return; // Check encoder compat
|
||||
Utils.ShowWarnings(current.interpFactor, current.ai);
|
||||
currentInputFrameCount = await GetFrameCountCached.GetFrameCountAsync(current.inPath);
|
||||
current.stepByStep = false;
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Flowframes.Main
|
||||
|
||||
currentInputFrameCount = await GetFrameCountCached.GetFrameCountAsync(current.inPath);
|
||||
|
||||
if (Config.GetBool(Config.Key.sbsAllowAutoEnc) && !(await InterpolateUtils.CheckEncoderValid())) return;
|
||||
if (Config.GetBool(Config.Key.sbsAllowAutoEnc) && !(await InterpolateUtils.CheckEncoderValid(current.outFps.GetFloat()))) return;
|
||||
|
||||
if (canceled) return;
|
||||
Program.mainForm.SetStatus("Running AI...");
|
||||
@@ -123,7 +123,7 @@ namespace Flowframes.Main
|
||||
}
|
||||
}
|
||||
|
||||
if (!(await InterpolateUtils.CheckEncoderValid())) return;
|
||||
if (!(await InterpolateUtils.CheckEncoderValid(current.outFps.GetFloat()))) return;
|
||||
|
||||
string[] outFrames = IoUtils.GetFilesSorted(current.interpFolder, current.interpExt);
|
||||
|
||||
|
||||
@@ -222,14 +222,20 @@ namespace Flowframes.Main
|
||||
return true;
|
||||
}
|
||||
|
||||
public static async Task<bool> CheckEncoderValid ()
|
||||
public static async Task<bool> CheckEncoderValid (float encodeFps)
|
||||
{
|
||||
string enc = FfmpegUtils.GetEnc(FfmpegUtils.GetCodec(I.current.outMode));
|
||||
|
||||
if (!enc.ToLower().Contains("nvenc"))
|
||||
return true;
|
||||
float maxAv1Fps = 240;
|
||||
|
||||
if (!(await FfmpegCommands.IsEncoderCompatible(enc)))
|
||||
if (enc.ToLower().Contains("av1") && encodeFps > maxAv1Fps)
|
||||
{
|
||||
UiUtils.ShowMessageBox($"The selected encoder only supports up to {maxAv1Fps} FPS!\nPlease use a different encoder or reduce the interpolation factor.", UiUtils.MessageType.Error);
|
||||
I.Cancel();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (enc.ToLower().Contains("nvenc") && !(await FfmpegCommands.IsEncoderCompatible(enc)))
|
||||
{
|
||||
UiUtils.ShowMessageBox("NVENC encoding is not available on your hardware!\nPlease use a different encoder.", UiUtils.MessageType.Error);
|
||||
I.Cancel();
|
||||
|
||||
Reference in New Issue
Block a user