Microsoft Media Foundation (MF) was introduced as the successor of DirectShow in Windows Vista. I have mostly ignored it, but it has some features (such as decoding of WMV AC-1 files) which are hard to implement in DirectShow. Media Foundation is also a more modern API so it would seem logical to make the switch.
However, the online teaching resources and official documentation seem greatly lacking. There is only 1 book covering the topic (published by Microsoft) and it is no longer available for normal prices. (People charge $500,- or more for second hand versions.)
As far as I could find there are no other books. While other techniques from Microsoft are usually covered in multiple books by multiple publishers.
The official Media Foundation blog has not been updated in since 2011. In the two years that it was active only 10 technical articles were written, 5 of which covering error logging/tracing instead of actual functionality.
The StackOverflow tag ms-media-foundation is only used with 328 questions, of which 142 are unanswered. In contrast there are 1641 DirectShow questions of which only 496 are unanswered.
So what happened to Microsoft Media Foundation? Will the new API ever take off and replace DirectShow or has even Microsoft forsaken MF in favour of going back to the old and rusty (trusty?) DirectShow. Or is there maybe another, non Microsoft framework, that has taken over?
Media Foundation is the next generation multimedia platform for Windows that enables developers, consumers, and content providers to embrace the new wave of premium content with enhanced robustness, unparalleled quality, and seamless interoperability.
Media Foundation (MF) is a COM-based multimedia framework pipeline and infrastructure platform for digital media in Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, and Windows 11.
To get started with Media Foundation you might want to read this. Media Foundation was first introduced in Windows Vista. Thus, you must have Vista or later versions of Windows to develop Media Foundation apps. If you are targeting Windows XP users then, D-Show might be a better option.
Firstly I don't know the answer and am someone who has spent way too long trying to get even basic Media Foundation scenarios working; at times it feels more like a quest in search of some long lost secret scripture than programming.
My suspicion is that Microsoft does want to make MF the standard media API for the Windows platform and perhaps the best indication is the Windows Universal App Samples where there are 7 instances of "mfapi.h" but zero instances of "dshow.h". Also the relatively new WPF MediaCapture and MediaElement controls do hook into the Media Foundation APIs so it seems safe to say that for all new work Microsoft are using MF instead of DirectShow.
Wow I see what you mean about Polinger's MF book! I have the book (which I'll now shortly be selling at that price) and can assure you it's definitely not worth it. I've never really found it much help despite re-reading it numerous times. It's pretty much the same as the online docs in that it sticks to a small number of specific scenarios (in fact a number of chapters in the book just re-print the SDK samples) and as soon as you need to do something outside those you are on your own.
In regards to the official MF blog there was a thread on the MSDN forums griping about thing and to which one of the Microsoft guys responded saying they have switched blogging platforms (it obviously would be nice if they could put a note indicating that). Apparently a number of the Microsoft MF devs are still blogging. This seems to be the most "active" one.
Update: If anyone happens to get drawn here due to the Polinger book reference note that the companion code can be downloaded from here (the original link quoted in the book is http://go.microsoft.com/FWLink/?Linkid=229072 which at the time of writing redirects to the aforementioned page).
For me, Media Foundation is really a very nice API to do multimedia programming.
What I can blame, is that Media Foundation's releases don't apply to Windows 7, currently the most popular OS in the world.
Media Foundation has a lot of competitors (DirectShow, Ffmpeg, Gstreamer, etc...). So, more choice, less developers, less tutorials and so on...
I try to promote this API as i can, so here is my work on Media Foundation : MFNode
I cover a lot of scenarios, and you have to check source code to learn.
You will find :
EDIT
More MediaFoundation code here : github mofo7777
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With