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