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