diff --git a/Source/CLI/Global.cpp b/Source/CLI/Global.cpp index a4d60913..6db73062 100644 --- a/Source/CLI/Global.cpp +++ b/Source/CLI/Global.cpp @@ -321,6 +321,18 @@ int global::SetOption(const char* argv[], int& i, int argc) License.Encoder(encoder::FFV1); return 0; } + if (!strncmp(argv[i], "ffv1_vulkan", 11) && (!argv[i][11] || (argv[i][11] == ':' && argv[i][12] >= '0' && argv[i][12] <= '9' && !argv[i][13]))) + { + OutputOptions["c:v"] = "ffv1_vulkan"; + if (argv[i][11]) + OutputOptions["init_hw_device"] = "\"vulkan=vk" + string(argv[i] + 11) + '\"'; + else + OutputOptions["init_hw_device"] = "\"vulkan=vk:0\""; + OutputOptions["vf"] = "hwupload"; + License.Encoder(encoder::FFV1); + License.Feature(feature::HwAccel); + return 0; + } return Error_NotTested(argv[i - 1], argv[i]); } if (!strcmp(argv[i], "-coder")) diff --git a/Source/Lib/License/License.h b/Source/Lib/License/License.h index cdf625a6..d8f0d69f 100644 --- a/Source/Lib/License/License.h +++ b/Source/Lib/License/License.h @@ -24,6 +24,7 @@ ENUM_BEGIN(feature) EncodingOptions, MultipleTracks, SubLicense, + HwAccel, ENUM_END(feature) //--------------------------------------------------------------------------- diff --git a/Source/Lib/License/License_Internal.h b/Source/Lib/License/License_Internal.h index 0f57f7f1..806341fd 100644 --- a/Source/Lib/License/License_Internal.h +++ b/Source/Lib/License/License_Internal.h @@ -51,6 +51,7 @@ const feature_info FeatureInfos[] = { "Encoding options" }, { "More than 2 tracks" }, { "Sub-licensing" }, + { "Hardware acceleration" }, }; static_assert(sizeof(FeatureInfos) / sizeof(feature_info) == feature_Max, "feature_info issue");