locked
Media Foundation functionality vs. DirectShow - video crossfading, playback rates RRS feed

  • Question

  • I'm researching the possibility of upgrading some software from DirectShow to Media Foundation, enticed by the possibilities of h.264 support and improved performance via hardware acceleration. I'm also worried that Microsoft has deprecated DirectShow Editing Services, which is an integral part of the current implementation, and I don't want to get caught in a situation where a new version of Windows gets released that breaks the software.

    However, I'm having trouble determining whether or not all the features in our DirectShow video implementation are actually attainable in Media Foundation. I obviously don't want a situation in which a video "upgrade" actually results in reduced functionality. Though video's not a major component of this software, it has some basic video editing capabilities that I'd need to be able to replicate in a Media Foundation conversion. Here are the base requirements:

    1) play multiple video streams in a single session
    2) crossfade between overlapping video streams
    3) not stop playback when there's a gap between video streams or a gap between the last video stream and the actual end of the timeline (related to #7 below)
    4) set playback rate of each video stream independently 
    5) ability to crop beginning and end of each video stream independently (i.e., have one video start two seconds in instead of at the beginning, chop 3 seconds off the end of another video, etc.)
    6) playback using a master clock provided by our software rather than by MF
    7) receive each frame before it gets displayed so that I can add effects, still images, and text (currently done via a transform filter in DS)
    8) rendering the above to a video file
    9) ability to work in both 32-bit and 64-bit apps

    (2) and (4) appear to be where the difficulties arise in Media Foundation. I've read forum discussions at https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/b7323e9b-0adf-457c-8345-7c3cb8b190c8/howto-mix-two-videoaudio-streams?forum=mediafoundationdevelopment and https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/9a4390f7-d99e-44bd-9106-dd58344f850c/how-to-mix-two-streams-in-evr?forum=mediafoundationdevelopment that seem to indicate that these tasks are extremely complex, if possible at all, in Media Foundation. 

    These posts are several years old, though, and I'm not sure whether or not this is the current state of the art in Media Foundation. Are there MF experts or insiders out there who can weigh in on whether or not the above functionality can realistically be achieved with Media Foundation, and whether or not the techniques described in these posts are still the best available methods? If matters are still the same, can we expect support for this functionality in future versions of MF, and if so, when? If MF isn't a viable solution, what tools are people using to actually implement high-performance video editing on Windows? 

    Thanks for your help.


    • Edited by russplusplus Monday, June 22, 2015 10:57 PM insert line breaks
    Monday, June 22, 2015 10:19 PM