[MPlayer-dev-eng] More On Automatic Codec Downloader

Mike Melanson melanson at pcisys.net
Sun Mar 10 17:58:53 CET 2002


Hi team,
	Thanks for all the responses about the automatic codec downloader
scheme. The reason I chose Perl and LWP is that, per my understanding, LWP
is a standard part of the Perl distribution (apparently with v5.6.0 and
up, at least), so there's a good chance that the necessary components
would already be on a user's system without having to install more stuff
first. This might (if you can stomach the prospect) help new users with
their initial out-of-the-box experience

	pl, thanks for the sample code. It worked. However, I can't
figure out how to make a POST request. There are bits of documentation
here and there, but none of them seem to agree with each other and some
obviously weren't even tested (code snippets missing semicolons). Par for
the course for Perl documentation, in my experience.

	Anyway, I thought I would post what I figured out about the codec
protocol, and if anyone else wants to work on it, using Perl or something
else, they can have at it. First, connect to activex.microsoft.com and
make a POST request for the /objects/ocget.dll object. There is one
key/value pair to send in the POST:
  CLSID={<GUID>}
where <GUID> is a Microsoft codec GUID as documented here:
  http://www.jmcgowan.com/avitech.html#FOURCCGUID
For example, when I requested the codec for WMV1:
  CLSID={31564D57-0000-0010-8000-00AA00389B71}
(31564D57 = 1VMW) The server will reply with a 302 Object Moved response
and reveal the location of the CAB file with the codec, e.g.:
  Location: http://codecs.microsoft.com/codecs/i386/wmvax.cab
After fetching the CAB file, use this GPL'd utility:
  http://www.kyz.uklinux.net/cabextract.php3
to extract the codec file.

	I think what I like best about this scheme is the fact that
Microsoft can't modify the protocol because they have to be compatible
with a legacy of media playing applications. And if they do change the
protocol, well, it only took about 2 minutes to figure out the last one.

	Thanks...
-- 
	-Mike Melanson




More information about the MPlayer-dev-eng mailing list