locked
H.264 decoder with MFT RRS feed

  • Question

  • I have a topology that renders an MP4 file. I create a source and sink node and an H.264 decoder is inserted correctly and everything works fine in my application and also in TopEdit (Render File...).  Once I try to insert a basic MFT into the topology I no longer get any video.  The same MFT works with WMV files.  Looking at the output from MFTrace (when trying the MP4) I can see that all the nodes are connected correctly.  The output subtype from the H.264 decoder is NV12, which works fine with the other file types, but the topology can't be resolved.  Do I need to force the prefered input type on the MFT or manually construct the topology? 
    Friday, May 3, 2013 5:56 AM

Answers

  • Turns out I needed to copy an attribute from the input samples to the output. MFTrace gave the clue that the stream was interlaced_progressive.

    From MSDN:

    MFSampleExtension_Interlaced attribute

    "For video content that contains mixed progressive and interlaced frames, set the media type to interlaced and use this attribute on each frame to indicate whether the frame is progressive or interlaced."

    atelyshev, thanks for your help.

    • Marked as answer by bear n dog Wednesday, May 22, 2013 6:55 AM
    Wednesday, May 22, 2013 6:55 AM

All replies

  • When you doing nodes connections do you perform "negotiation" or just specify types that you expect ?
    Monday, May 6, 2013 8:58 PM
  • Hi atelyshev,

    Thanks for the reply.

    The connections are being negotiated.  I run the application through MFTrace and I can see that all the required nodes are created. Various attempts are made with UYVY, I420 and NV12.  Various different attributes are tried for each format, but I end up getting a "failed HrStatus=C00D36B4 MF_E_INVALIDMEDIATYPE" message. 

    If I remove the MFT everything works as expected.  I create the source and sink nodes and the H.264 decoder is inserted and the video and audio is fine.

    If I put the MFT back in, create the source, MFT and sink nodes and try it with a WMV file instead, again everything work.  This led me to think that the H.264 decoder and the MFT can't agree on a subtype or on a particular attribute?  Should I specify all the attributes in the MFT?  Any ideas appreciated!

    Tuesday, May 7, 2013 6:52 AM
  • What I remember about h.264 it is has quite strange initialization procedure. Out should be created first , etc etc. Look at documentation. but MF_E_INVALIDMEDIATYPE usually happened when negotiation was not right.
    Wednesday, May 8, 2013 3:23 PM
  • Turns out I needed to copy an attribute from the input samples to the output. MFTrace gave the clue that the stream was interlaced_progressive.

    From MSDN:

    MFSampleExtension_Interlaced attribute

    "For video content that contains mixed progressive and interlaced frames, set the media type to interlaced and use this attribute on each frame to indicate whether the frame is progressive or interlaced."

    atelyshev, thanks for your help.

    • Marked as answer by bear n dog Wednesday, May 22, 2013 6:55 AM
    Wednesday, May 22, 2013 6:55 AM