locked
How to set the codecs merit in Media Foundation RRS feed

  • Question

  • Hi again,

    I know that I am asking a lot of questions these days but this one is important (I think) to all Media Foundation developers and those who will be tempted to switch from DirectShow

    As I fear, it is not possible in Media Foundation to change the preferred codecs, as it was with DirectShow filters merit.
    I found this registry key (which is not documented) : HKEY_CLASSES_ROOT\MediaFoundation\Transforms\Preferred
    I guess that it makes the association between media types and the DMO filter to use


    It is writable only by "TrustedInstallers" user, which is the highest level that even installers in admin mode don't have access to.

    I know that this is possible to change the merit for a local process with IMFPluginControl, but what about Media Center and Media Player ?

    For example, how to use another decoder than the integrated mpeg4 decoder ?

    This is really annoying because this means that this is not possible to have subtitles for example with this formats and all the future formats that you will "lock".

    Otherwise is it possible to have a decoder that takes uncompressed stream ?
    This was possible in windows XP (not in Vista) : windows media player interrogated directShow filters for uncompressed media types coming out of the decoder.

    Thank you for your feedback


    Regards,

    Damien BT


    Thursday, March 19, 2009 5:42 PM

Answers

  • Damien,

    Yes, you're correct that Media Foundation does not have a merit system. The in-box codecs are registered as "preferred" codecs, meaning they will be picked by default.

    There are a couple of ways for applications to override the defaults (IMFPluginControl and MFTRegisterLocal). The idea is to give more control to the application, and to minimize situations where installing one application alters the behavior of another application.

    I don't work on Windows Media Player or Media Center, so I don't know if either of them expose any way for the user to select a different set of codecs. But this would be a per-application decision.

    For uncompressed streams: If you mean an MFT that takes, say, uncompressed YUV input from the source and produces RGB or YUV output, that should be registered as an effect or video processor transform, not as a decoder. In any case, I don't think it would be picked up, because the source would connect directly to the EVR. 

    - Mike


    Mike Wasson (SDK Documentation)
    Monday, March 23, 2009 3:42 PM

All replies

  • Any one (from Microsoft if possible) ?

    Thanks

    Regards
    Monday, March 23, 2009 9:54 AM
  • Damien,

    Yes, you're correct that Media Foundation does not have a merit system. The in-box codecs are registered as "preferred" codecs, meaning they will be picked by default.

    There are a couple of ways for applications to override the defaults (IMFPluginControl and MFTRegisterLocal). The idea is to give more control to the application, and to minimize situations where installing one application alters the behavior of another application.

    I don't work on Windows Media Player or Media Center, so I don't know if either of them expose any way for the user to select a different set of codecs. But this would be a per-application decision.

    For uncompressed streams: If you mean an MFT that takes, say, uncompressed YUV input from the source and produces RGB or YUV output, that should be registered as an effect or video processor transform, not as a decoder. In any case, I don't think it would be picked up, because the source would connect directly to the EVR. 

    - Mike


    Mike Wasson (SDK Documentation)
    Monday, March 23, 2009 3:42 PM
  • Hello Mike,

    thank you for your answer.

    I understand that this is possible for a given application to choose its preferred codecs.

    But this is annoying that this is not possible to select alternate codecs or effects for Microsoft applications, which are the most widely used.

    This was understandable for MPEG2 format because of the requirements of TV & DVD modules, but not for the other formats : all containers (avi, mkv, mp4) with mpeg4 and h264 can no longer be used with alternative codecs. No more postprocessing, subtitles,...
    For example CoreAVC is a codec that takes advantage of multicore CPUs and gives the best picture quality (in my opinion).

    It cannot be used anymore, even if the developers release a Media Foundation version.


    I know that this won't be changed because release candidate is approaching, I just want your opinion and maybe some hope for the future ?

    Thank you

    Regards,

    Damien BT
    Monday, March 23, 2009 5:56 PM