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
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
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
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
48 Video Codecs
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
49 ------------
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
50 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
51
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
52 videocodec indeo5ds
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
53 info "Intel Indeo 5"
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
54 status working
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
55 fourcc IV50,iv50
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
56 driver dshow
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
57 dll "ir50_32.dll"
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
58 guid 0x30355649, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
59 out YV12
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
60 out YUY2
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
61 out BGR32,BGR24,BGR16,BGR15
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 This is a particularly full-featured video codec. The "videocodec" keyword
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
64 identifies the fact that this is the start of a new video
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
65 codec. "indeo5ds" is MPlayer's unique name for the codec.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
66
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
67 The next line has the keyword "info" which specifies a human-readable
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
68 comment accompanies this codec.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
69
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
70 The "status" keyword carries information about the codec's functional
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
71 status. MPlayer currently recognizes 4 status levels: working, buggy,
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
72 crashing, and untested.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
73
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
74 The next line lists 4-character codes (FOURCCs) that are associated with
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
75 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
76 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
77 fourcc lines in the codec.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
78
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
79 The "driver" keyword associates this codec with an internal MPlayer
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
80 decoder module. MPlayer has a module named "dshow" that handles data
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
81 encoded by the codec.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
82
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
83 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
84 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
85 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
86 they all manage communication with binary-only modules.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
87
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
88 The "guid" keyword identifies a 16-byte Microsoft GUID that some media
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
89 files use to identify codecs.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
90
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
91 The "out" keyword identifies which output format that the decoder is known
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
92 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
93 multiple comma-separated output formats on the same line. The output
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
94 formats should be listed in order of preference.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
95
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
96 Audio Codecs
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
97 ------------
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
98 Here is an example a rather full-featured audio codec block:
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
99
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
100 audiocodec mp3
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
101 info "MPEG layer-2, layer-3"
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
102 status working
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
103 comment "Optimized to MMX/SSE/3Dnow!"
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
104 format 0x50
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
105 format 0x55
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
106 format 0x33706d2e ; ".mp3" CBR/VBR MP3 (MOV files)
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
107 format 0x5500736d ; "ms\0\x55" older mp3 fcc (MOV files)
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
108 driver mp3lib
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
109 dll "mp3lib (mpglib)"
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
110 flags seekable
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
111
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
112 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
113 a few that we haven't seen before. The "comment" keyword identifies
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
114 another human-readable note for this codec.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
115
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
116 The "format" keyword performs a similar job as the fourcc line. However,
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
117 since certain media file formats (notably AVI) identify audio formats with
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
118 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
119 convention to accomodate them. However, as shown in this example, FOURCCs
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
120 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
121 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
122 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
123 Apple's "rle " codec).
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
124
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
125 The "flags" keywords identifies any additional abilities of this
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
126 codec. Currently, seekable is the only flag supported.
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
127
96e5f795366d initial commit for codecs.conf.txt documentation
melanson
parents:
diff changeset
128 EOF