annotate DOCS/tech/win32-codec-howto.txt @ 28499:5d76e0dbe16e

Port check for 10 assembler operands support from FFmpeg.
author diego
date Wed, 11 Feb 2009 23:11:06 +0000
parents cc5cd29646a5
children 3ec026797553
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
cc5cd29646a5 fix error message example
compn
parents: 28168
diff changeset
23 VIDEO: [HFYU] 352x288 24bpp 25.000 fps 4321.0 kbps (527.5 kbyte/s)
cc5cd29646a5 fix error message example
compn
parents: 28168
diff changeset
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
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
28 have to find out which DLL Windows loads in order to play this file. In our
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
29 case, the 'system.ini' contains this information in a line that reads:
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
30
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
31 VIDC.HFYU=huffyuv.dll
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 So you need the 'huffyuv.dll' file. Note that the audio codecs are
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
34 specified by the MSACM prefix:
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
35
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
36 msacm.l3acm=L3codeca.acm
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
37
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
38 This is the MP3 codec.
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
39
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
40
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
41
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
42 DirectShow codecs:
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
43 ~~~~~~~~~~~~~~~~~~
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
44
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
45 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
46 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
47 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
48 GUID of the codec.
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
49
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
50
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
51 New Method:
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
52 -----------
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 Using Microsoft GraphEdit (fast)
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
55
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
56 - Get GraphEdit from either DirectX SDK or doom9.
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
57 - Start 'graphedit.exe'.
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
58 - 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
59 - Expand item "DirectShow Filters".
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
60 - 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
61 - 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
62 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
63 - 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
64
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
65 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
66 '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
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 Old 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 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
73
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
74 - Start 'regedit'.
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
75 - 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
76 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
77 - 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
78 "C:\WINDOWS\SYSTEM\TM20DEC.AX").
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
79 - 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
80 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
81 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
82 "File -> Properties -> Advanced".
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
83 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
84 - 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
85 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
86
d093bee92b15 Convert Win32 codec importing HOWTO into a text document in the tech section.
diego
parents:
diff changeset
87 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
88 false hits, but you may get lucky...