2008-12-27 14:38:42 +00:00
|
|
|
============================
|
|
|
|
Win32 codecs importing HOWTO
|
|
|
|
============================
|
|
|
|
|
|
|
|
This document describes how to extract the information necessary to hook
|
|
|
|
up Win32 binary codecs in MPlayer from a Windows system. Different methods
|
|
|
|
exist depending on which video API your codec uses and which Windows
|
|
|
|
version you have.
|
|
|
|
|
|
|
|
If you have gathered all the necessary information (fourcc, GUID, codec file,
|
|
|
|
sample file) as described below, notify the mplayer-dev-eng mailing list.
|
|
|
|
If you want to add a codec yourself, read DOCS/tech/codecs.conf.txt.
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-25 21:43:33 +00:00
|
|
|
VfW codecs
|
2008-12-27 14:38:42 +00:00
|
|
|
~~~~~~~~~~
|
|
|
|
|
2009-03-25 21:43:33 +00:00
|
|
|
VfW (Video for Windows) is the old video API for Windows. Its codecs have
|
2008-12-27 14:38:42 +00:00
|
|
|
the '.dll' or (rarely) '.drv' extension. If MPlayer fails at playing your
|
|
|
|
AVI with this kind of message:
|
|
|
|
|
2008-12-27 18:58:36 +00:00
|
|
|
VIDEO: [HFYU] 352x288 24bpp 25.000 fps 4321.0 kbps (527.5 kbyte/s)
|
|
|
|
Cannot find codec matching selected -vo and video format 0x55594648.
|
2008-12-27 14:38:42 +00:00
|
|
|
|
|
|
|
It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU =
|
|
|
|
HuffYUV codec, DIV3 = DivX Low Motion, etc.). Now that you know this, you
|
2009-03-12 11:16:51 +00:00
|
|
|
have to find out which DLL Windows loads in order to play this file.
|
2009-03-25 21:43:33 +00:00
|
|
|
You can find the VfW codec by searching the internet for e.g. VIDC.HFYU.
|
2009-03-12 11:16:51 +00:00
|
|
|
|
|
|
|
In our case, the 'system.ini' also contains this information in a line that reads:
|
2008-12-27 14:38:42 +00:00
|
|
|
|
|
|
|
VIDC.HFYU=huffyuv.dll
|
|
|
|
|
2009-03-12 11:16:51 +00:00
|
|
|
So you need the 'huffyuv.dll' file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ACM Codecs:
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
MPlayer may fail at playing the audio in your file with this message:
|
|
|
|
|
|
|
|
Cannot find codec for audio format 0x55.
|
|
|
|
Audio: no sound
|
|
|
|
|
|
|
|
MPlayer calls this the TwoCC format identifier. From the TwoCC list we find:
|
|
|
|
|
|
|
|
0x0055 MPEG-1 Layer 3 (MP3)
|
|
|
|
|
|
|
|
If you are lucky, you can then just search the internet for "codec acm"
|
|
|
|
e.g. "mp3 acm". Or if the codec is already installed on Windows,
|
|
|
|
it will show up in the system.ini as:
|
2008-12-27 14:38:42 +00:00
|
|
|
|
|
|
|
msacm.l3acm=L3codeca.acm
|
|
|
|
|
2009-03-12 11:16:51 +00:00
|
|
|
Note that the audio codecs are specified by the MSACM prefix:
|
2008-12-27 14:38:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DirectShow codecs:
|
|
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
DirectShow is the newer video API, which is even worse than its predecessor.
|
|
|
|
Things are harder with DirectShow, since 'system.ini' does not contain the
|
|
|
|
needed information, instead it is stored in the registry and we need the
|
|
|
|
GUID of the codec.
|
|
|
|
|
|
|
|
|
|
|
|
New Method:
|
|
|
|
-----------
|
|
|
|
|
|
|
|
Using Microsoft GraphEdit (fast)
|
|
|
|
|
2009-03-09 21:40:20 +00:00
|
|
|
- Get GraphEdit from the Microsoft SDK, DirectX SDK or doom9.
|
2008-12-27 14:38:42 +00:00
|
|
|
- Start 'graphedit.exe'.
|
|
|
|
- From the menu select "Graph -> Insert Filters".
|
|
|
|
- Expand item "DirectShow Filters".
|
|
|
|
- Select the right codec name and expand item.
|
|
|
|
- In the entry "DisplayName" look at the text in winged brackets after the
|
|
|
|
backslash and write it down (five dash-delimited blocks, the GUID).
|
|
|
|
- The codec binary is the file specified in the "Filename" entry.
|
|
|
|
|
|
|
|
If there is no "Filename" and "DisplayName" contains something like
|
|
|
|
'device:dmo', then it is a DMO-Codec.
|
|
|
|
|
|
|
|
|
|
|
|
Old Method:
|
|
|
|
-----------
|
|
|
|
|
|
|
|
Take a deep breath and start searching the registry...
|
|
|
|
|
|
|
|
- Start 'regedit'.
|
|
|
|
- Press "Ctrl-F", disable the first two checkboxes, and enable the third.
|
|
|
|
Type in the fourcc of the codec (e.g. "TM20").
|
|
|
|
- You should see a field which contains the path and the filename (e.g.
|
|
|
|
"C:\WINDOWS\SYSTEM\TM20DEC.AX").
|
|
|
|
- Now that you have the file, we need the GUID. Try searching again, but
|
|
|
|
now search for the codec's name, not the fourcc. Its name can be acquired
|
|
|
|
when Media Player is playing the file, by checking
|
|
|
|
"File -> Properties -> Advanced".
|
|
|
|
If not, you are out of luck. Try guessing (e.g. search for TrueMotion).
|
|
|
|
- If the GUID is found you should see a "FriendlyName" and a "CLSID" field.
|
|
|
|
Write down the 16 byte CLSID, this is the GUID we need.
|
|
|
|
|
|
|
|
If searching fails, try enabling all the checkboxes. You may have
|
|
|
|
false hits, but you may get lucky...
|
2009-03-12 11:16:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tips:
|
|
|
|
~~~~~~~
|
|
|
|
If you get an error loading a new codec, it may need some more files to work.
|
2009-03-25 21:43:33 +00:00
|
|
|
Start the filemon utility before loading MPlayer to find out which DLLs are
|
2009-03-12 11:16:51 +00:00
|
|
|
trying to be loaded.
|
|
|
|
|
2009-03-25 21:43:33 +00:00
|
|
|
Your codec may load some external DLL libraries. If the codec is already
|
2009-03-12 11:16:51 +00:00
|
|
|
installed in Windows, run listdlls wmplayer.exe while Windows Media
|
|
|
|
Player is playing your file to find out which.
|