Mercurial > mplayer.hg
annotate DOCS/tech/manpage.txt @ 24628:51fabe21759f
sync w/r24646
author | gpoirier |
---|---|
date | Fri, 28 Sep 2007 19:32:18 +0000 |
parents | 02de8bb9bbba |
children | 8991d3bc5742 |
rev | line source |
---|---|
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
1 ======================================== |
7286 | 2 A documentation about MPlayer's man page |
3 ======================================== | |
4 | |
5 | |
6 About the documentation | |
7 ----------------------- | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
8 |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
9 Yes it's true: This is the documentation of the documentation (man page). |
7286 | 10 This guide should be used as a reference for questions about the man page |
11 structure. It's not a strict guide but we recommend following it to get a | |
12 uniform man page. | |
13 | |
14 | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
15 |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
16 What belongs in the man page? |
7286 | 17 ----------------------------- |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
18 |
19920 | 19 - option descriptions (all) |
20 - usage (options, configuration files, controls) | |
21 - basic examples | |
7286 | 22 |
23 | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
24 |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
25 What doesn't belong in the man page? |
7286 | 26 ------------------------------------ |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
27 |
19920 | 28 - instructions for installation, encoding and similar processes |
29 - detailed evaluations or hints | |
30 - tutorials, guides | |
7286 | 31 |
32 | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
33 |
7286 | 34 How should patches look like? |
35 ----------------------------- | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
36 |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
37 Follow the rules in patches.txt, they apply to the man page, too. |
7286 | 38 Exceptions are: |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
39 |
19920 | 40 - Cosmetic patches are allowed but should be done separately from the real |
41 changes, be marked as cosmetic changes and shouldn't change the general | |
42 style without reasons/permissions. | |
43 - The same applies to spell checking. | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
44 |
7286 | 45 |
46 | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
47 How do I create an HTML, text or other version of the man page? |
7741 | 48 --------------------------------------------------------------- |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
49 |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
50 The man page was more or less designed for groff as it is the main tool for |
7286 | 51 it. Therefore only groff produces acceptable results without changes. |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
52 Additionally, the SS variable should be set to either very low or very high |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
53 values to produce a better groff HTML output (Due to a bug of groff2html?). |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
54 A setting of 4 should look readable. Here's an overview again: |
7289 | 55 |
20568 | 56 - groff: |
57 groff is the "official" tool to convert man pages. To get good results you | |
58 need a recent version (1.18.2). | |
59 groff -mman -Thtml mplayer.1 > mplayer.1.html | |
20569
02de8bb9bbba
The col utility eats non-ASCII characters without the -p option it seems.
diego
parents:
20568
diff
changeset
|
60 groff -mman -Tlatin1 -rLL=78n mplayer.1 | col -bxp > mplayer.1.txt |
20568 | 61 The groff man page lists other output formats to use with -T. |
11561 | 62 |
20568 | 63 Unfortunately groff is not able to handle UTF-8 input as of version 1.19.2. |
64 groff-utf8 is a wrapper that works around these deficiencies: | |
65 http://www.haible.de/bruno/packages-groff-utf8.html | |
20567 | 66 |
20568 | 67 - man2html: |
68 You can view it through a CGI script: | |
69 http://localhost/cgi-bin/man2html?mplayer | |
70 The output is unusable as the script doesn't seem to support the macro | |
71 definitions. Maybe manually changing all leads to acceptable results. | |
11561 | 72 |
20568 | 73 - rman: |
74 rman -f html mplayer.1 > man_page.rman.html | |
75 The output is ugly as rman doesn't understand many of the macros used. | |
11561 | 76 |
20568 | 77 - troffcvt: |
78 troff2html -man mplayer.1 > man_page.tcvt.html | |
79 The (good) output is similar to groff but simplified... | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
80 |
7286 | 81 |
82 | |
83 The structure | |
84 ------------- | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
85 |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
86 The option descriptions are divided into sections. Inside a section options are |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
87 alphabetically sorted. The sections are: |
7286 | 88 |
89 (Header) | |
19920 | 90 not visible, copyright and author information |
7286 | 91 (Macro definitions) |
19920 | 92 not visible, some macro definitions |
7286 | 93 NAME |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
94 The man page is used for both mplayer and mencoder. |
7286 | 95 SYNOPSIS |
19920 | 96 a description of MPlayer's playtree |
7286 | 97 DESCRIPTION |
19920 | 98 a general description of MPlayer, MEncoder, GMPlayer and their features |
16688
ad9c4e9ca5bd
Keyboard control section renamed to interactive control, small structure change.
diego
parents:
15703
diff
changeset
|
99 INTERACTIVE CONTROL |
19920 | 100 description of MPlayer's input system and interactive controls |
11944 | 101 USAGE |
19920 | 102 some general notes about usage |
17310 | 103 CONFIGURATION FILES |
19920 | 104 description of the configuration file format |
11944 | 105 GENERAL OPTIONS |
106 General options that are common to both MPlayer and MEncoder. | |
7286 | 107 PLAYER OPTIONS (MPLAYER ONLY) |
19920 | 108 user interface option descriptions (MPlayer only) |
7286 | 109 DEMUXER/STREAM OPTIONS |
19920 | 110 demuxer and stream layer option descriptions |
19047 | 111 OSD/SUBTITLE OPTIONS |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
112 This section is special in that it contains all subtitle and OSD option |
19920 | 113 descriptions even if they might belong to one of the other sections. It |
114 was created because of its size. | |
7286 | 115 AUDIO OUTPUT OPTIONS (MPLAYER ONLY) |
19920 | 116 audio output layer (ao) option descriptions (MPlayer only) |
12468 | 117 AUDIO OUTPUT DRIVERS (MPLAYER ONLY) |
19920 | 118 audio output driver description (ao) |
7286 | 119 VIDEO OUTPUT OPTIONS (MPLAYER ONLY) |
19920 | 120 video output layer (vo) option descriptions (MPlayer only) |
12716
296b1f6f6bf7
VIDEO OUTPUT DRIVERS moved right after VIDEO OUTPUT OPTIONS.
diego
parents:
12468
diff
changeset
|
121 VIDEO OUTPUT DRIVERS (MPLAYER ONLY) |
19920 | 122 video output driver description (vo) |
7286 | 123 DECODING/FILTERING OPTIONS |
19920 | 124 decoding/filtering layer options (ad, vd, pl) |
10218
f82646fc1431
Moved video filters to a separate section, moved slave mode section to the
jonas
parents:
8699
diff
changeset
|
125 VIDEO FILTERS |
19920 | 126 video filter description (vf) |
10380
8627ec205af8
moved -af options to the filter section (should work with mencoder), split encoding options in general and codec specific part, some small (cosmetic) changes
jonas
parents:
10227
diff
changeset
|
127 GENERAL ENCODING OPTIONS (MENCODER ONLY) |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
128 Encoding option descriptions (ve) (MEncoder only). |
10380
8627ec205af8
moved -af options to the filter section (should work with mencoder), split encoding options in general and codec specific part, some small (cosmetic) changes
jonas
parents:
10227
diff
changeset
|
129 CODEC SPECIFIC ENCODING OPTIONS (MENCODER ONLY) |
8627ec205af8
moved -af options to the filter section (should work with mencoder), split encoding options in general and codec specific part, some small (cosmetic) changes
jonas
parents:
10227
diff
changeset
|
130 Codec specific option descriptions (lavc,divx4,xvid,lame) (MEncoder only). |
7286 | 131 FILES |
19920 | 132 a list and description of all installed/used files/directories |
17062
007826f61f58
Sync man page structure description with actual man page structure.
diego
parents:
16688
diff
changeset
|
133 EXAMPLES OF MPLAYER USAGE |
19920 | 134 basic examples, again: no long descriptions/processes |
17062
007826f61f58
Sync man page structure description with actual man page structure.
diego
parents:
16688
diff
changeset
|
135 EXAMPLES OF MENCODER USAGE |
19920 | 136 basic examples, again: no long descriptions/processes |
7286 | 137 BUGS |
138 AUTHORS | |
139 | |
140 | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
141 |
7286 | 142 The man page/groff format |
143 ------------------------- | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
144 |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
145 Just read this and RTFS: |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
146 |
11561 | 147 man 7 roff |
7286 | 148 http://www.tldp.org/HOWTO/mini/Man-Page.html |
149 man 7 man | |
150 man 7 groff | |
151 | |
152 | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
153 |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
154 "Style" guidelines |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
155 ------------------ |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
156 |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
157 This section was kept simple but there are certain guidelines/rules to get a |
7286 | 158 uniform man page. The best way is to read (and understand) the source. |
159 | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
160 |
7286 | 161 General: |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
162 |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
163 - No line should contain more than 79 characters. |
19920 | 164 - used commands: .TH, .SH, .TP, .IP, .PP, .[R]B, .I, .br, .RS, .RE, .na, |
7744
6d41f5e905e2
reversed some changes as they produced ugly html output
jonas
parents:
7742
diff
changeset
|
165 .nh, .ad, .hy, macro definitions, comments and some more |
11099 | 166 - Don't forget the quotation marks around expressions, etc... |
167 - Each new sentence should start on a line of its own. | |
168 - Put a backslash before a '-' if it denotes a range (1\-10), an option | |
11116 | 169 (\-fs), stdin (\-) or a dash (mplayer \- Movie Player for Linux). |
170 Use just '-' if it is a hyphen (A-V) or a minus (-1). Please note that | |
171 it should be \-dvd-device and not \-dvd\-device. | |
12864 | 172 - Don't start a line with "'" or ".", nroff treats them specially. |
19879
def3e3fbb458
Add hint about how to check man pages for markup errors.
diego
parents:
19047
diff
changeset
|
173 - To quickly check a manual page for markup errors, just run |
def3e3fbb458
Add hint about how to check man pages for markup errors.
diego
parents:
19047
diff
changeset
|
174 man DOCS/man/XX/mplayer.1 > /dev/null |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
175 |
19920 | 176 |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
177 Option descriptions: |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
178 |
11303 | 179 - Options should be in alphabetical order. |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
180 - Option and/or suboption parameters should be short, descriptive and put |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
181 in angular brackets (e.g. \-vo <driver>). |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
182 - If the option has a parameter in a certain range, specify it right after |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
183 the option (e.g. \-subpos <0\-100>). |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
184 - Optional things should be put in square brackets ([]). |
7286 | 185 - Obsolete options are followed by (OBSOLETE), beta options by |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
186 (BETA CODE), etc. |
19920 | 187 - MPlayer-only options in a section which isn't marked this way |
12744 | 188 are followed by (MPlayer only). |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
189 - Add references to other options if they belong to each other, e.g. |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
190 '(\-vo zr only)' or '(also see \-alang)' or are commonly used together. |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
191 - If a nontrivial default parameter exists, mention it, e.g. (default: 24). |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
192 - Put examples and notes at the end of the description (before suboptions). |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
193 - The end of the suboptions _always_ has to be followed by a paragraph |
7289 | 194 (BUG). |
11303 | 195 - For flag options just document the non-default one of -XXX and -noXXX, if |
196 the option is not a flag, describe both, one below the other (this is an | |
197 exception to the alphabetical order). | |
7286 | 198 |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
199 |
7286 | 200 Macro definitions (see beginning of man page): |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
201 |
19920 | 202 - .SS starting value of the suboption column |
7286 | 203 - .IPs Add new suboption (we use .TP for normal options and .IP for |
19920 | 204 the rest). |
205 - .RSs begin of suboptions, end with .RE | |
206 - .RSss begin of suboptions in a suboption | |
207 - .REss end of suboptions in a suboption | |
7286 | 208 |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
209 |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
210 Options, suboptions, examples structure: |
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
211 |
7286 | 212 - Normal options (note the '<' and '>'): |
213 | |
214 [...] | |
215 .TP | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
216 .B \-option <parameter> |
7286 | 217 description |
218 [...] | |
219 | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
220 - Long suboptions: |
7286 | 221 |
222 [...] | |
223 description. Available options are: | |
224 . | |
225 .RSs | |
226 .IPs "subopt1=<value>" | |
227 description1 | |
228 .IPs "subopt2=<value>" | |
229 description2 | |
230 [...] | |
231 .IPs "last subopt=<value>" | |
232 last description | |
233 .RE | |
234 . | |
235 [...] | |
236 | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
237 - Short suboptions: |
7289 | 238 |
239 [...] | |
240 description. Available options are: | |
241 | |
10702 | 242 .PD 0 |
7289 | 243 .RSs |
244 .IPs "subopt1=<value>" | |
245 description1 | |
246 .IPs "subopt2=<value>" | |
247 description2 | |
248 [...] | |
249 .IPs "last subopt=<value>" | |
250 last description | |
251 .RE | |
10702 | 252 .PD 1 |
7289 | 253 . |
254 [...] | |
255 | |
8699
b3e78d22cae0
Spell checking, parts reworded for greater clarity, layout now uses
diego
parents:
8217
diff
changeset
|
256 - Suboptions in suboptions: |
7286 | 257 |
258 [...] | |
259 .IPs "subopt1=<value>" | |
260 description1 | |
261 .RSss | |
262 subsubopt1: description1 | |
263 .br | |
264 subsubopt2: description2 | |
265 [...] | |
266 .REss | |
267 [...] | |
268 | |
7741 | 269 - Examples: |
7286 | 270 |
271 [...] | |
12744 | 272 |
7286 | 273 .I EXAMPLE: |
274 .PD 0 | |
275 .RSs | |
276 .IP "-option used parameters" | |
277 description | |
278 [...] | |
279 .RE | |
280 .PD 1 | |
7289 | 281 . |
7286 | 282 [...] |