Mercurial > mplayer.hg
annotate DOCS/tech/win32-codec-howto.txt @ 36456:514b38743990
Fix small bug with GUI_SET_STREAM.
In case we've selected a playlist,
we should "ignore" the passed data.
author | ib |
---|---|
date | Tue, 17 Dec 2013 22:27:13 +0000 |
parents | 8ee2eb34a851 |
children |
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 |
29025 | 16 VfW codecs |
28168
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 |
29025 | 19 VfW (Video for Windows) is the old video API for Windows. Its codecs have |
28168
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. |
29025 | 29 You can find the VfW codec by searching the internet for e.g. VIDC.HFYU. |
28902 | 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 Audio: no sound | |
45 | |
46 MPlayer calls this the TwoCC format identifier. From the TwoCC list we find: | |
47 | |
48 0x0055 MPEG-1 Layer 3 (MP3) | |
49 | |
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: | |
28168
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
53 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
54 msacm.l3acm=L3codeca.acm |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
55 |
28902 | 56 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
|
57 |
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 DirectShow codecs: |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
61 ~~~~~~~~~~~~~~~~~~ |
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 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
|
64 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
|
65 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
|
66 GUID of the codec. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
67 |
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 New Method: |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
70 ----------- |
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 Using Microsoft GraphEdit (fast) |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
73 |
28889
3ec026797553
GraphEdit is also available in the Microsoft SDK nowadays.
diego
parents:
28170
diff
changeset
|
74 - 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
|
75 - Start 'graphedit.exe'. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
76 - 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
|
77 - Expand item "DirectShow Filters". |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
78 - 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
|
79 - 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
|
80 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
|
81 - 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
|
82 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
83 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
|
84 '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
|
85 |
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 Old Method: |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
88 ----------- |
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 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
|
91 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
92 - Start 'regedit'. |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
93 - 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
|
94 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
|
95 - 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
|
96 "C:\WINDOWS\SYSTEM\TM20DEC.AX"). |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
97 - 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
|
98 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
|
99 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
|
100 "File -> Properties -> Advanced". |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
101 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
|
102 - 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
|
103 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
|
104 |
d093bee92b15
Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff
changeset
|
105 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
|
106 false hits, but you may get lucky... |
28902 | 107 |
108 | |
109 | |
110 Tips: | |
111 ~~~~~~~ | |
112 If you get an error loading a new codec, it may need some more files to work. | |
29025 | 113 Start the filemon utility before loading MPlayer to find out which DLLs are |
28902 | 114 trying to be loaded. |
115 | |
29025 | 116 Your codec may load some external DLL libraries. If the codec is already |
28902 | 117 installed in Windows, run listdlls wmplayer.exe while Windows Media |
118 Player is playing your file to find out which. |