mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Fix missing QSV hardwar encoding support detection, add CloseMdlDownloaderWhenDone arg
This commit is contained in:
@@ -17,6 +17,7 @@ namespace Flowframes
|
||||
public static bool ShowConsole = false;
|
||||
public static bool DisablePython = true;
|
||||
public static bool ShowMdlDownloader = false;
|
||||
public static bool CloseMdlDownloaderWhenDone = false;
|
||||
public static bool DontSaveConfig = false;
|
||||
public static bool AutoRun = false;
|
||||
public static float InterpFactor = -1f;
|
||||
@@ -58,6 +59,10 @@ namespace Flowframes
|
||||
"md|open_model_downloader", "Open model downloader GUI on startup",
|
||||
v => ShowMdlDownloader = v != null
|
||||
},
|
||||
{
|
||||
"mdc|close_model_downloader", "Close model downloader GUI after downloads have finished",
|
||||
v => CloseMdlDownloaderWhenDone = v != null
|
||||
},
|
||||
{
|
||||
"nc|no_config_save", "Do not save anything in config during this session",
|
||||
v => DontSaveConfig = v != null
|
||||
|
||||
@@ -41,6 +41,11 @@ namespace Flowframes.MiscUtils
|
||||
form.SetWorking(false);
|
||||
form.SetStatus($"Done.");
|
||||
form.SetDownloadBtnEnabled(false);
|
||||
|
||||
if (Cli.CloseMdlDownloaderWhenDone)
|
||||
{
|
||||
form.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task DownloadForAi(AiInfo ai)
|
||||
|
||||
@@ -6,7 +6,9 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Flowframes.IO;
|
||||
using Flowframes.MiscUtils;
|
||||
using Flowframes.Ui;
|
||||
using Enc = Flowframes.Data.Enums.Encoding.Encoder;
|
||||
|
||||
namespace Flowframes.Os
|
||||
{
|
||||
@@ -130,10 +132,11 @@ namespace Flowframes.Os
|
||||
return;
|
||||
|
||||
Logger.Log($"Detecting hardare encoding support...");
|
||||
var encoders = new[] { "h264_nvenc", "hevc_nvenc", "av1_nvenc", "h264_amf", "hevc_amf" };
|
||||
var encoders = new[] { Enc.Nvenc264, Enc.Nvenc265, Enc.NvencAv1, Enc.Qsv264, Enc.Qsv265, Enc.Amf264, Enc.Amf265 };
|
||||
var encoderNames = encoders.Select(x => OutputUtils.GetEncoderInfoVideo(x).Name);
|
||||
var compatEncoders = new List<string>();
|
||||
|
||||
foreach(string e in encoders)
|
||||
foreach(string e in encoderNames)
|
||||
{
|
||||
bool compat = await FfmpegCommands.IsEncoderCompatible(e);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user