Mercurial > mplayer.hg
annotate DOCS/tech/win32-codec-howto.txt @ 28965:97d48d2944f7
remove trailing whitespaces
author | Gabrov |
---|---|
date | Thu, 19 Mar 2009 11:21:54 +0000 |
parents | c950f0c545f6 |
children | 22d4bb6bf629 |
rev | line source |
---|---|
28168
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
1 ============================ |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
2 Win32 codecs importing HOWTO |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
3 ============================ |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
4 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
5 This document describes how to extract the information necessary to hook |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
6 up Win32 binary codecs in MPlayer from a Windows system. Different methods |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
7 exist depending on which video API your codec uses and which Windows |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
8 version you have. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
9 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
10 If you have gathered all the necessary information (fourcc, GUID, codec file, |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
11 sample file) as described below, notify the mplayer-dev-eng mailing list. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
12 If you want to add a codec yourself, read DOCS/tech/codecs.conf.txt. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
13 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
14 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
15 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
16 VFW codecs |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
17 ~~~~~~~~~~ |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
18 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
19 VFW (Video for Windows) is the old video API for Windows. Its codecs have |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
20 the '.dll' or (rarely) '.drv' extension. If MPlayer fails at playing your |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
21 AVI with this kind of message: |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
22 |
28170 | 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. | |
28168
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
25 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
26 It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU = |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
27 HuffYUV codec, DIV3 = DivX Low Motion, etc.). Now that you know this, you |
28902 | 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. | |
30 | |
31 In our case, the 'system.ini' also contains this information in a line that reads: | |
28168
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
32 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
33 VIDC.HFYU=huffyuv.dll |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
34 |
28902 | 35 So you need the 'huffyuv.dll' file. |
36 | |
37 | |
38 | |
39 ACM Codecs: | |
40 ~~~~~~~~~~~~ | |
41 MPlayer may fail at playing the audio in your file with this message: | |
42 | |
43 Cannot find codec for audio format 0x55. | |
44 Read DOCS/HTML/en/codecs.html! | |
45 Audio: no sound | |
46 | |
47 MPlayer calls this the TwoCC format identifier. From the TwoCC list we find: | |
48 | |
49 0x0055 MPEG-1 Layer 3 (MP3) | |
50 | |
51 If you are lucky, you can then just search the internet for "codec acm" | |
52 e.g. "mp3 acm". Or if the codec is already installed on Windows, | |
53 it will show up in the system.ini as: | |
28168
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
54 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
55 msacm.l3acm=L3codeca.acm |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
56 |
28902 | 57 Note that the audio codecs are specified by the MSACM prefix: |
28168
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
58 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
59 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
60 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
61 DirectShow codecs: |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
62 ~~~~~~~~~~~~~~~~~~ |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
63 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
64 DirectShow is the newer video API, which is even worse than its predecessor. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
65 Things are harder with DirectShow, since 'system.ini' does not contain the |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
66 needed information, instead it is stored in the registry and we need the |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
67 GUID of the codec. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
68 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
69 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
70 New Method: |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
71 ----------- |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
72 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
73 Using Microsoft GraphEdit (fast) |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
74 |
28889
3ec026797553
GraphEdit is also available in the Microsoft SDK nowadays.
diego
parents:
28170
diff
changeset
|
75 - Get GraphEdit from the Microsoft SDK, DirectX SDK or doom9. |
28168
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
76 - Start 'graphedit.exe'. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
77 - From the menu select "Graph -> Insert Filters". |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
78 - Expand item "DirectShow Filters". |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
79 - Select the right codec name and expand item. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
80 - In the entry "DisplayName" look at the text in winged brackets after the |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
81 backslash and write it down (five dash-delimited blocks, the GUID). |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
82 - The codec binary is the file specified in the "Filename" entry. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
83 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
84 If there is no "Filename" and "DisplayName" contains something like |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
85 'device:dmo', then it is a DMO-Codec. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
86 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
87 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
88 Old Method: |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
89 ----------- |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
90 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
91 Take a deep breath and start searching the registry... |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
92 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
93 - Start 'regedit'. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
94 - Press "Ctrl-F", disable the first two checkboxes, and enable the third. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
95 Type in the fourcc of the codec (e.g. "TM20"). |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
96 - You should see a field which contains the path and the filename (e.g. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
97 "C:\WINDOWS\SYSTEM\TM20DEC.AX"). |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
98 - Now that you have the file, we need the GUID. Try searching again, but |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
99 now search for the codec's name, not the fourcc. Its name can be acquired |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
100 when Media Player is playing the file, by checking |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
101 "File -> Properties -> Advanced". |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
102 If not, you are out of luck. Try guessing (e.g. search for TrueMotion). |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
103 - If the GUID is found you should see a "FriendlyName" and a "CLSID" field. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
104 Write down the 16 byte CLSID, this is the GUID we need. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
105 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
106 If searching fails, try enabling all the checkboxes. You may have |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
107 false hits, but you may get lucky... |
28902 | 108 |
109 | |
110 | |
111 Tips: | |
112 ~~~~~~~ | |
113 If you get an error loading a new codec, it may need some more files to work. | |
114 Start the filemon utility before loading MPlayer to find out which dlls are | |
115 trying to be loaded. | |
116 | |
117 Your codec may load some external .dll libraries. If the codec is already | |
118 installed in Windows, run listdlls wmplayer.exe while Windows Media | |
119 Player is playing your file to find out which. |