Skip to main content

Where is the CLSID for Media Foundation H264 Encoder?

The Media Foundation H264 Encoder MFT documentation does not mention a CLSID for the encoder. Other Encoder class IDs, and the H264 Decoder MFT class ID are defined at

\Program Files (x86)\Microsoft SDKs\7.1\Include\wmcodecdsp.h or
\Program Files (x86)\Windows Kits\8.x\Include\am\wmcodecdsp.h 

I see this codec when I enumerate the devices, and can obtain the CLSID, which is {6ca50344-051a-4ded-9779-a43305165e35}, from the enumerated list, but I cannot find a named GUID, which I would expect to be something like: CLSID_CH264MediaEncObject

I would like to use the GUID (rather than the enumerated name) to make decisions when building my topology based on which encoder the user has selected. I can define_guid this, but it just seems odd.

So: Why is there not a named guid for the H264 Encoder MFT?

Solved

This looks intentional as Media Foundation API suggests that you let the API choose appropriate encoder for you. Your role there is to build a suitable profile and let transcoding API to create the topology using requested parameters.

I suppose you know the MSDN leads, but for the record: Tutorial: Encoding an MP4 File - Create the Transcode Profile.

In particular, they seem to want to retain control over encoder choice in order to use hardware encoder automatically where applicable:

Certified Hardware Encoder

If a certified hardware encoder is present, it will generally be used instead of the inbox system encoder for Media Foundation related scenarios.

One of the problems with compressors in DirectShow was the common list and competition between compressors. For many reasons, an application would rather hardcode specific compressor rather than use the best choice for given format. Here in MF the approach is different: a profile defines what you want to eventually get on the output, then API takes responsibility to supply the encoder.


On Windows SDK 8.1, the name is CLSID_CMSH264EncoderMFT (wmcodecdsp.h).


Comments

Popular posts from this blog

Can't find variable Page_ClientValidate in Safari

I have a ASP.NET 2.0 webpage with 3 server controls: RequiredFieldValidator , textbox , and button .` Button uses OnClientClick to call a JavaScript function for validation using Page_ClientValidate() . This page works fine with Chrome, IE, Firefox, Safari (5.1.7 on Windows). It has stopped working with modern Safari versions - 8.0 in Yosemite and Mobile Safari on iOS 8. I see this exception in the Inspect Element area: "ReferenceError: Can't find variable: Page_ClientValidate" How can this be fixed? Solved This sounds like a duplicate of this problem: iOS 8 / Safari 8 not working with ASP.NET AJAX-Extensions Another solution that modifies the web.config instead of the mozill: ReferenceError: Can't find variable: ValidatorEnable in Safari

Why does C++ allow a function and a class have a same name?

#include using namespace std; struct A { A() { cout The output is: void A() Why does C++ allow a function and a class have a same name? Solved I believe this comes down to backwards compatibility with C. In C, when you declare a struct like you did, you then have to refer to it as struct A , not just A . For example: void A() {} struct A {}; void f() { A(); struct A x; // works fine A y; // does not compile } In this context, it makes sense to allow A to mean two different things, because it's always clear which one you mean, depending on whether you used struct or not. In C++, struct s (and class es) can be referenced directly, without the need to use the struct keyword. This introduces the ambiguity you're concerned about, but the alternative is that valid C code like the one above would not be valid C++ code, which is even worse. Why? Because that's the way the language is! The A::A()...

Difficulty grasping Functional Dependency concepts with MySQL

I can write queries fairly well, but basic Database Design concepts continue to frustrate me :/ I'm working through an old book to try and brush up on the material, but functional dependencies are really making my head spin. For instance, the following question: Assume that Marcia keeps a table of data about her customers. Consider just the following part of that table: CUSTOMER(Phone, FirstName, LastName) Explain the conditions under which each of the following are true: Phone --> (FirstName, LastName) (Phone, FirstName) --> LastName (Phone, LastName) --> First Name (LastName, FirstName) --> Phone Phone --> --> LastName Phone --> --> FirstName Phone --> --> (FirstName, LastName) I don't even understand how to go about answering the question!.. Solved I'm not an expert on Db design, but from what I understand: And assuming that Phone is unique. True. Because a Client's's FirstName and Last Name can be uniquely de...