annotate DOCS/tech/codecs.conf.txt @ 5249:eafaa705a354

query flag added
author arpi
date Thu, 21 Mar 2002 19:53:31 +0000
parents 96e5f795366d
children 6ce9c6231bdd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3860
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
1 Understanding MPlayer's etc/codecs.conf File
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
2
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
3 Introduction
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
4 ------------
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
5 MPlayer features a very flexible codec architecture which allows it to
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
6 use its own open source codecs, as well as open source libraries, Win32
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
7 codec DLLs, and XAnim binary codec modules. To the MPlayer user, the
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
8 most visible piece of this architecture is the etc/codecs.conf file. This
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
9 is a text-based configuration file that controls which MPlayer components
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
10 are in charge of handling particular compressed data formats.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
11
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
12 The codecs.conf file is stored either in a shared directory for all system
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
13 users to access, or in the .mplayer directory in a user's home
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
14 directory. When MPlayer starts, it first looks for a codecs.conf file in a
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
15 user's home directory. Failing that, it searches for the shared file. If
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
16 it can't find a codecs.conf file, MPlayer will refuse to run.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
17
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
18 The codecs.conf file is really quite simple. It is simply a collection of
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
19 codec definition blocks that define how different media types should be
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
20 handled. There are a number of keywords that can occur in a block. Not all
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
21 of them are required and there is no particular order enforced.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
22
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
23 Editing codecs.conf
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
24 -------------------
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
25 You can edit codecs.conf using your favorite text editor. Anything that
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
26 comes after a semicolon (;) on a line is regarded as a comment. For
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
27 example:
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
28 ; this is a comment
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
29 format 0x34616d69 ; "ima4" (MOV files)
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
30
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
31 The codec blocks can be in any order; the file parser doesn't
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
32 care. However, they are organized in a particular order for the benefit of
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
33 human readers. For example, all of the open source decoders that MPlayer
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
34 implements natively are grouped in one section.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
35
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
36 Video Codecs
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
37 ------------
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
38 Let's jump right in with an example. Here is an example video codec block:
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
39
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
40 videocodec indeo5ds
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
41 info "Intel Indeo 5"
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
42 status working
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
43 fourcc IV50,iv50
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
44 driver dshow
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
45 dll "ir50_32.dll"
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
46 guid 0x30355649, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
47 out YV12
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
48 out YUY2
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
49 out BGR32,BGR24,BGR16,BGR15
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
50 cpuflags mmx
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
51
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
52 This is a particularly full-featured video codec. The "videocodec" keyword
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
53 identifies the fact that this is the start of a new video
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
54 codec. "indeo5ds" is MPlayer's unique name for the codec.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
55
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
56 The next line has the keyword "info" which specifies a human-readable
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
57 comment accompanies this codec.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
58
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
59 The "status" keyword carries information about the codec's functional
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
60 status. MPlayer currently recognizes 4 status levels: working, buggy,
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
61 crashing, and untested.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
62
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
63 The next line lists 4-character codes (FOURCCs) that are associated with
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
64 this codec. There can be more than one FOURCC specified on a fourcc line
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
65 as long as they're separated with a comma. There can also be multiple
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
66 fourcc lines in the codec.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
67
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
68 The "driver" keyword associates this codec with an internal MPlayer
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
69 decoder module. MPlayer has a module named "dshow" that handles data
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
70 encoded by the codec.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
71
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
72 The "dll" keyword specifies which Win32 or XAnim binary module needs to be
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
73 loaded in order to handle the specific media type. This keyword is usually
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
74 only used in conjunction with the dshow, vfw, acm, and xanim drivers since
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
75 they all manage communication with binary-only modules.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
76
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
77 The "guid" keyword identifies a 16-byte Microsoft GUID that some media
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
78 files use to identify codecs.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
79
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
80 The "out" keyword identifies which output format that the decoder is known
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
81 to output. Just like the fourcc line, there can be multiple out lines or
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
82 multiple comma-separated output formats on the same line. The output
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
83 formats should be listed in order of preference.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
84
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
85 The "cpuflags" identifies special operating parameters that this codec
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
86 requires. For example, this video codec is known to use MMX
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
87 instructions. Currently, valid strings for this keyword include mmx, sse,
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
88 and 3dnow.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
89
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
90 Audio Codecs
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
91 ------------
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
92 Here is an example a rather full-featured audio codec block:
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
93
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
94 audiocodec mp3
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
95 info "MPEG layer-2, layer-3"
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
96 status working
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
97 comment "Optimized to MMX/SSE/3Dnow!"
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
98 format 0x50
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
99 format 0x55
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
100 format 0x33706d2e ; ".mp3" CBR/VBR MP3 (MOV files)
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
101 format 0x5500736d ; "ms\0\x55" older mp3 fcc (MOV files)
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
102 driver mp3lib
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
103 dll "mp3lib (mpglib)"
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
104 flags seekable
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
105
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
106 Many of the keywords are the same as a video codec block. However, we see
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
107 a few that we haven't seen before. The "comment" keyword identifies
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
108 another human-readable note for this codec.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
109
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
110 The "format" keyword performs a similar job as the fourcc line. However,
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
111 since certain media file formats (notably AVI) identify audio formats with
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
112 16-bit numbers rather than 32-bit FOURCCs, it's necessary to use this
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
113 convention to accomodate them. However, as shown in this example, FOURCCs
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
114 can also be specified with the format keyword as long as they're converted
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
115 to their hex representation. It's important to note that this can be
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
116 useful for video codecs as well if a FOURCC contains a space (such as
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
117 Apple's "rle " codec).
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
118
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
119 The "flags" keywords identifies any additional abilities of this
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
120 codec. Currently, seekable is the only flag supported.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
121
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
122 EOF