Skip to main content

Topic: Is there a Media Foundation Codec for ALAC ? (Read 6647 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • andrewfg
  • [*][*]
Is there a Media Foundation Codec for ALAC ?
There exist already several DirectShow codecs that support playing of ALAC (Apple Lossless) media in Windows Media Player.

We know that Windows Media Player makes use of third party DirectShow codecs to enable it to Play otherwise unsupported media formats on the local PC's audio speakers. But it seems that Windows Media Player does not to use such third party DirectShow codecs to stream these same additional media formats to an external music player via its UPnP/DLNA "Play To" command. => I don't know the reason for this, but it seems that Windows Media Player can only use Media Foundation codecs for extending its UPnP/DLNA "Play To" capability to additional media formats.

So my question is simple: has anyone written a Media Foundation codec for ALAC (Apple Lossless)?
AndrewFG (Whitebear -- http://www.whitebear.ch/mediaserver )

  • Tim De Baets
  • [*][*][*][*]
  • Developer
Is there a Media Foundation Codec for ALAC ?
Reply #1
Repeating for the folks in this forum what I already said at Microsoft Answers, since the DC-Bass DirectShow filter is open source, someone with basic knowledge of Media Foundation could port the filter from DirectShow to Media Foundation pretty easily. It should definitely make an interesting project

Perhaps you can also ask the developer of the MFFLAC codec. That's the only Media Foundation codec I know of at the moment. It's weird though that the codec is hosted on Sourceforge while it isn't open source at all. If you had its source code, it would probably be even easier to take its Media Foundation skeleton and put DC-Bass into it.

  • andrewfg
  • [*][*]
Is there a Media Foundation Codec for ALAC ?
Reply #2
Perhaps you can also ask the developer of the MFFLAC codec. That's the only Media Foundation codec I know of at the moment. It's weird though that the codec is hosted on Sourceforge while it isn't open source at all. If you had its source code, it would probably be even easier to take its Media Foundation skeleton and put DC-Bass into it.


I did contact him, but got no answer. Also in the meantime, he has now posted some source code, but frankly I can't get my head round it. It looks like source code for a completely different application.
AndrewFG (Whitebear -- http://www.whitebear.ch/mediaserver )

  • Tim De Baets
  • [*][*][*][*]
  • Developer
Is there a Media Foundation Codec for ALAC ?
Reply #3
Indeed, I have noticed that as well. Intentionally or not, he did definitely leave out all Media Foundation and FLAC parsing code, which renders the source code pretty useless.

However, MFFLAC's source code might not be necessary after all. One could also use the WavSource and MPEG1Source Media Foundation SDK samples as a starting point. These are part of the Windows SDK but can also be downloaded separately here.

  • andrewfg
  • [*][*]
Is there a Media Foundation Codec for ALAC ?
Reply #4
However, MFFLAC's source code might not be necessary after all. One could also use the WavSource and MPEG1Source Media Foundation SDK samples as a starting point. These are part of the Windows SDK but can also be downloaded separately here.


Yeah I know. I already looked as those too. I think my main issue is a motivational one: do I really want to start another project at this time ???
AndrewFG (Whitebear -- http://www.whitebear.ch/mediaserver )

Is there a Media Foundation Codec for ALAC ?
Reply #5
However, MFFLAC's source code might not be necessary after all. One could also use the WavSource and MPEG1Source Media Foundation SDK samples as a starting point. These are part of the Windows SDK but can also be downloaded separately here.


Yeah I know. I already looked as those too. I think my main issue is a motivational one: do I really want to start another project at this time ???

As the person who came up with the original idea that resulted in the DC Bass Apple Lossless directshow filter (and I believe all the other supposed variants are merely codec packs repackaging it), I too would like to see a Media Foundation successor. (As an aside for anyone else reading this thread, the existing directshow filter works fine for playing Apple Lossless in WMP and Media Center but not for streaming.)

If someone is interested in taking this up, apart from the source to the DC Bass directshow filter which was based on the original revrse engineering of Apple Lossless, Apple have since released their own Apple Lossless source code as open source. Apple's code is not as it stands in the form of a directshow or media foundation codec and would need to be wrapped up in to a media foundation form. See http://alac.macosforge.org/

Is there a Media Foundation Codec for ALAC ?
Reply #6
Bringing this thread up-to-date.

Windows 10 now includes as standard support for Apple Lossless in addition to the previously supported AAC. This is in the form of a Media Foundation codec, so the answer is now - yes there is a Media Foundation codec for ALAC.

See -

C:\Windows\System32\MSAlacDecoder.dll
C:\Windows\SysWOW64\MSAlacDecoder.dll

there are also matching encoder versions although I have not seen a means of utilising them

C:\Windows\System32\MSAlacEncoder.dll
C:\Windows\SysWOW64\MSAlacEncoder.dll

In theory it might be possible to copy these to earlier versions of Windows, however this is beyond my knowledge. Would anyone else be able to find a way of doing this? In particular I would like to use them in Windows 7.

PS. Windows 10 build 10122 also now correctly routes Apple Lossless files to the music section in WMP which was deliberately crippled in Windows 7, 8, and 8.1, it also correctly reads meta-tags from these files including embedded Album Artwork. There is therefore no need to install any extra plugins or hacks to fully utilise Apple Lossless in Windows 10 build 10122. (Earlier Windows 10 builds still routed Apple Lossless to the 'other' section.)