You may have heard that Moonlight, the free software Silverlight plugin for GNU/Linux distributions, allows users to view certain audio and video encoded with Microsoft codecs. What may be confusing, though, is how you can do this if Moonlight is free software since the Microsoft codecs are patented (see “The codec dilemma” for details). I dug into this a bit and here’s what I found:
The initial download of Moonlight from the Moonlight Downloads page is easy enough. You can install the Firefox add-on as you would any other add-on. Of particular interest is that the installation does not require the user to agree to a EULA. This suggests that the Moonlight add-on does not include any codecs.
Once Moonlight is installed, visiting a page with Silverlight content that requires codecs (such as the video player demos at Silverlight Demos) will bring up a “Moonlight Codecs Installer” window as Ars Technica describes. What Ars Technica doesn’t mention is the EULA screen that appears next:
I have made the full text of the license available at the following page: Microsoft Media Pack 1.0 End-User License Agreement (EULA).
I wanted to see what happened when I agreed, but I didn’t want to agree to the license so I examined the source code available at the bottom of Moonlight Downloads instead (I have mirrored it on my website as well: moon-1.0.tar.bz2). Fortunately, I had been running ngrep during the installation so I had noticed that Moonlight downloaded a license agreement from http://go.microsoft.com/fwlink/?LinkId=133817. This is referred to by the EULA_URL
constant in src/pipeline-ui.cpp
and used at line 248 to download the EULA. Just a little further down in src/pipeline-ui.cpp
, at line 265, we see that Moonlight downloads a file from CODEC_URL
. Searching the code again shows us that this is defined in src/codec-url.h
. There are two URLs in there: http://go.microsoft.com/fwlink/?LinkId=133186 for i386 and http://go.microsoft.com/fwlink/?LinkId=133816 for x86-64.
Downloading from the i386 URL will give you a 2 MB binary named silverlight-media-pack-linux-x86-5-1.so
. Searching the code again, we see that configure
sets CODEC_LIBRARY_NAME
to that filename (on line 24260).
Looking for CODEC_LIBRARY_NAME
in the source code shows that it is expected in $HOME/.mozilla/plugins/moonlight
(see line 195 of src/pipeline.cpp
) and is dynamically loaded into Firefox (at line 203).
So the mystery was solved. Moonlight can play Microsoft audio and video codecs, but it requires the user to agree to a Microsoft EULA and download some proprietary software (the Microsoft Media Pack) from their web site. The Moonlight player itself is free software (all the relevant source code is licensed under the LGPLv2, Microsoft Public License, or MIT license); it relies on proprietary software to play the codecs.
Note: Even though the Microsoft Media Pack files are easy to download directly, I would not recommend using them for anything other than playing Silverlight videos and only if you’ve agreed to the Microsoft Media Pack EULA. Because the codecs are patented, you do not have the right to use them unless you have received a license to do so, which Microsoft grants (to a very limited extent) when you agree to that EULA.
Thanks for the heads up. I’m looking at all these type of technologies at the moment. I can’t use flash cause it’s proprietary, same withh silverlight. that left me with JavaFX…..but codecs as well as the licence on scenegraph is still anyone’s guess
What are you trying to create? A video hosting service? Or is this just for you as a user that wants to use exclusively free software?
If you’re creating some sort of service, then embedding Dirac or Theora video with Vorbis sound in an object or video element would work, though you’d have to show Mac OS X and Windows users how to download the codecs.
Why not just use the codecs, already available under free software licenses?.
Unless you also pay a licensing fee to the codec patent holders, that would be technically illegal. Many codecs cannot be implemented without violating a patent so even the “free software” implementations require users to pay a licensing fee. See http://ossguy.com/?p=252 (“Evaluating codec freedom”) for more details.
This is why Debian and many other distributions cannot include free software implementations of certain codecs in their “main” repositories. They have been threatened with legal action by the patent holders for doing so.
Practically speaking, the codecs are still available to people if they look hard enough. But using them without a license (and usually payment) is violating the patent holders’ rights.
For a more detailed list of problems with patented codecs, see http://ossguy.com/?p=233 (“The codec dilemma”).
Using this description I found a solution for my problem: installing codecs in firefox 6 under kubuntu fails on access rights. Using a console I manually created the “moonlight” folder under .mozilla/plugins changing access rights (chown 777) and manually downloading the codecs there.