the performance between transcode and source reader+sink writer in media foundation RRS feed

  • Question

  • hi all

     I found a interesting thing when I wrote a media converter app. I found the performance of Transcode API or


    class is better than source reader+sinkwriter. What's the different between this two architecture.


    • Edited by Hans567 Wednesday, November 7, 2012 4:43 AM
    Wednesday, November 7, 2012 4:42 AM

All replies

  • Hello,

    The MediaTranscoder uses the MF Transcode APIs these in turn use the Media Session. The Source Reader and Sink Writer do not use the Media Session.

    Make sure that you are passing the "MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS" flag to your Sink Writer.

    I hope this helps,


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Thursday, November 8, 2012 1:00 AM
  • Yes, I set this flag and IMFDXGIDeviceManager to source reader and sink writer. And I compared software transcoding that set HardwareAccelerationEnabled  to false, it's better too. I used a 30 seconds video and didn't use hardware acceleration, the MediaTranscoder class consume 16 sec. while the source reader + sink writer consume 27 sec.
    • Edited by Hans567 Thursday, November 8, 2012 1:35 AM
    Thursday, November 8, 2012 1:27 AM