view DOCS/tech/win32-codec-howto.txt @ 28698:c7a1f29c98c2

r27390 Fix a misleading section in the libavcodec options manual r27407 Add video driver for Nintendo Wii/GameCube. r27454 Mention IVTV, S3 and SH_VEU drivers within VIDIX section of manpage. r27466 Document -lavcopts o, aka libavcodec AVOption. r27542 'mp3lame' audio output codec was wrongly listed as 'lame'. r27606 Make -heartbeat-cmd and -stop-xscreensaver sections reference each other. r27638 add lavfopts matroska suboption r27639 document lavc/lavf avoption o suboption r27650 add outdir sub-option to vo png r27690 whitespace cosmetics r27691 vo_fbdev now supports -geometry. r27768 update x264's section with r999 of x264 r27800 improve documentation of latest x264's options r27801 Clarify screenw/screenh options
author kraymer
date Wed, 25 Feb 2009 14:23:07 +0000
parents cc5cd29646a5
children 3ec026797553
line wrap: on
line source

============================
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.



VFW codecs
~~~~~~~~~~

VFW (Video for Windows) is the old video API for Windows. Its codecs have
the '.dll' or (rarely) '.drv' extension.  If MPlayer fails at playing your
AVI with this kind of message:

VIDEO:  [HFYU]  352x288  24bpp  25.000 fps  4321.0 kbps (527.5 kbyte/s)
Cannot find codec matching selected -vo and video format 0x55594648.

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
have to find out which DLL Windows loads in order to play this file. In our
case, the 'system.ini' contains this information in a line that reads:

VIDC.HFYU=huffyuv.dll

So you need the 'huffyuv.dll' file. Note that the audio codecs are
specified by the MSACM prefix:

msacm.l3acm=L3codeca.acm

This is the MP3 codec.



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)

- Get GraphEdit from either DirectX SDK or doom9.
- 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...