I can get the name of an MFT with MFT_FRIENDLY_NAME_Attribute
and check if it is hardware or software with MFT_ENUM_FLAG_HARDWARE
, how can I check whether the encoder is CPU or GPU based?
i.e. Intel QuickSync is CPU, NVIDIA H.264 Encoder MFT is GPU, etc
The encoders are fetched via MFTEnumEx(MFT_CATEGORY_VIDEO_ENCODER, ...);
which provides an array of IMFActivate
and from there I can get MFT flags and the encoder's GUID.
CodePudding user response:
how can I check whether the encoder is CPU or GPU based
MFTs don't indicate whether they are CPU or GPU based. They don't have to and then it does not make a lot of sense either.
MFT_ENUM_FLAG_HARDWARE
flag you already discovered is already telling you the information you want.
The MFT performs hardware-based data processing, using either the AVStream driver or a GPU-based proxy MFT. MFTs in this category always process data asynchronously.
This flag tells that there is no CPU implementation behind this encoder and it's some hardware which handles the encoding. What hardware exactly? Normally, it's GPU.
There is no AMD, Intel or NVIDIA Media Foundation encoder with MFT_ENUM_FLAG_HARDWARE
and in the same time "CPU based" (If H.264/AVC or H.265/HEVC is in question, there is no CPU/software encoder in Media Foundation form factor from the mentioned vendors at all).