comparison DOCS/pl/sound.html @ 9779:6921cceaeacb

race with time translating sound.html starts...
author eyck
date Tue, 01 Apr 2003 09:20:36 +0000
parents a604236b0dd6
children a342705a2ce9
comparison
equal deleted inserted replaced
9778:da63c272425e 9779:6921cceaeacb
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
1 <HTML> 2 <HTML>
2 3
3 <HEAD> 4 <HEAD>
4 <STYLE> 5 <TITLE>Sound - MPlayer - Odtwarzacz filmów</TITLE>
5 .text 6 <LINK REL="stylesheet" TYPE="text/css" HREF="../default.css">
6 {font-family : Verdana, Arial, Helvetica, sans-serif; 7 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">
7 font-size : 14px;}
8 </STYLE>
9 </HEAD> 8 </HEAD>
10 9
11 <BODY BGCOLOR=white> 10 <BODY>
12 11
13 <FONT CLASS="text"> 12
14 13 <H3><A NAME="audio">2.3.2 Urządzenia wyjścia: dźwięk</A></H3>
15 <P><B><A NAME=2.3.2>2.3.2. Audio output devices</A></B></P> 14
16 15 <H4><A NAME="sync">2.3.2.1 Synchronizacja audio/video</A></H4>
17 <P><B>MPlayer</B>'s audio interface is called <I>libao2</I>. It currently 16
18 contains these drivers:</P> 17 <P>Interfejs do dźwięku w MPlayerze nazywa się <I>libao2</I>. Aktualnie
19 18 zawiera następujące sterowniki:</P>
20 <TABLE BORDER=0> 19
21 20 <DL>
22 <TR><TD COLSPAN=4><P><B><FONT CLASS="text">General:</B></P></TD></TR> 21 <DT>oss</DT>
23 22 <DD>sterownik OSS (ioctl) (obsługuje sprzętowe AC3)</DD>
24 <TR><TD>&nbsp;&nbsp;</TD><TD VALIGN=top><FONT CLASS="text">oss</TD><TD>&nbsp;&nbsp;</TD><TD><FONT CLASS="text">OSS (ioctl) driver</TD></TR> 23
25 <TR><TD></TD><TD VALIGN=top><FONT CLASS="text">sdl</TD><TD></TD><TD><FONT CLASS="text">SDL driver (supports up/downsampling, <B>ESD</B>, <B>ARTS</B> etc)</TD></TR> 24 <DT>sdl</DT>
26 <TR><TD></TD><TD VALIGN=top><FONT CLASS="text">nas</TD><TD></TD><TD><FONT CLASS="text">NAS (Network Audio System) driver</TD></TR> 25 <DD>sterownik SDL (obsługuje demony dźwięku takie jak <B>ESD</B> i <B>ARTS</B>)</DD>
27 <TR><TD></TD><TD VALIGN=top><FONT CLASS="text">alsa5</TD><TD></TD><TD><FONT CLASS="text">native ALSA 0.5 driver</TD></TR> 26
28 <TR><TD></TD><TD VALIGN=top><FONT CLASS="text">alsa9</TD><TD></TD><TD><FONT CLASS="text">native ALSA 0.9 driver (works, but has problems -> use OSS)</TD></TR> 27 <DT>nas</DT>
29 <TR><TD></TD><TD VALIGN=top><FONT CLASS="text">sun</TD><TD></TD><TD><FONT CLASS="text">SUN audio driver (/dev/audio) for BSD and Solaris8 users</TD></TR> 28 <DD>sterownik NAS (Network Audio System)</DD>
29
30 <DT>alsa5</DT>
31 <DD>natywny sterownik ALSA 0.5</DD>
32
33 <DT>alsa9</DT>
34 <DD>natywny sterownik ALSA 0.9 (obsługuje sprzętowe AC3)</DD>
35
36 <DT>sun</DT>
37 <DD>sterownik dźwięku SUN (<CODE>/dev/audio</CODE>) dla użytkowników BSD i Solaris8</DD>
38
39 <DT>arts</DT>
40 <DD>natywny sterownik ARTS (głównie dla użytkowników KDE)</DD>
41
42 <DT>esd</DT>
43 <DD>natywny sterownik ESD (głównie dla użytkowników GNOME)</DD>
44 </DL>
45
46 <P>
47 Sterowniki kart dźwiękowych w Linuxie mają problemy z kompatybilnością.
48 Wynika to z tego że MPlayer polega na wbudowanych właściwościach <EM>prawidłowo</EM>
49 napisanych sterowników które pozwalają utrzymać prawidłową synchronizację audio/video.
50 Niestety, niektórzy autorzy sterowników nie wysilają się z zaprogramowaniem tych właściwości,
51 gdyż nie są wymagane do odgrywania plików MP3. </P>
52
53 <P>Other media players like <A HREF="http://avifile.sourceforge.net">aviplay</A>
54 or <A HREF="http://xine.sourceforge.net">xine</A> possibly work
55 out-of-the-box with these drivers because they use "simple" methods with
56 internal timing. Measuring showed that their methods are not as efficient
57 as MPlayer's. </P>
58
59 <P>Using MPlayer with a properly written audio driver will never result
60 in A/V desyncs related to the audio, except only with very badly created
61 files (check the man page for workarounds).</P>
62
63 <P>If you happen to have a bad audio driver, try the <CODE>-autosync</CODE>
64 option, it should sort out your problems. See the man page for detailed
65 information.</P>
66
67 <P>Some notes:</P>
68
69 <UL>
70 <LI>If you have an OSS driver, first try <CODE>-ao oss</CODE> (this is the
71 default). If you experience glitches, halts or anything out of the
72 ordinary, try <CODE>-ao sdl</CODE> (NOTE: You need to have SDL libraries
73 and header files installed). The SDL audio driver helps in a lot of cases
74 and also supports ESD (GNOME) and ARTS (KDE).</LI>
75 <LI>If you have ALSA version 0.5, then you almost always have to use
76 <CODE>-ao alsa5</CODE> , since ALSA 0.5 has buggy OSS emulation code, and
77 will <B>crash MPlayer</B> with a message like this:<BR>
78 <CODE>DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!</CODE></LI>
79 <LI>On Solaris, use the SUN audio driver with the <CODE>-ao sun</CODE> option,
80 otherwise neither video nor audio will work.</LI>
81 <LI>If the sound clicks when playing from CD-ROM, turn on IRQ unmasking, e.g.
82 <CODE>hdparm -u1 /dev/cdrom</CODE> (<CODE>man hdparm</CODE>). This is
83 generally beneficial and described in more detail in the
84 <A HREF="cd-dvd.html#drives">CD-ROM section</A>.</LI>
85 </UL>
86
87
88 <H4><A NAME="experiences">2.3.2.2 Sound Card experiences, recommendations</A></H4>
89
90 <P>On Linux, a 2.4.x kernel is highly recommended. Kernel 2.2 is not tested.</P>
91
92 <P>Linux sound drivers are primarily provided by the free version of OSS. These
93 drivers have been superceded by <A HREF="http://www.alsa-project.org">ALSA</A>
94 (Advanced Linux Sound Architecture) in the 2.5 development series. If your
95 distribution does not already use ALSA you may wish to try their drivers if
96 you experience sound problems. ALSA drivers are generally superior to OSS in
97 compatibility, performance and features. But some sound cards are only
98 supported by the commercial OSS drivers from
99 <A HREF="http://www.opensound.com/">4Front Technologies</A>. They also support
100 several non-Linux systems.</P>
101
102 <TABLE BORDER="1" WIDTH="100%">
103
104 <TR>
105 <TH ROWSPAN="2"><B>SOUND CARD</B></TH>
106 <TH COLSPAN="4"><B>DRIVER</B></TH>
107 <TH ROWSPAN="2"><B>Max kHz</B></TH>
108 <TH ROWSPAN="2"><B>Max Channels</B></TH>
109 <TH ROWSPAN="2"><B>Max Opens<FONT SIZE="-2"><A HREF=#note1>[1]</A></FONT></B></TH>
110 </TR>
111
112 <TR>
113 <TH><B>OSS/Free</B></TH>
114 <TH><B>ALSA</B></TH>
115 <TH><B>OSS/Pro</B></TH>
116 <TH><B>other</B></TH>
117 </TR>
118
119 <TR>
120 <TD><B>VIA onboard (686/A/B, 8233, 8235)</B></TD>
121 <TD><A HREF="http://sourceforge.net/project/showfiles.php?group_id=3242&amp;release_id=59602">via82cxxx_audio</A></TD>
122 <TD>snd-via82xx</TD>
123 <TD>&nbsp;</TD>
124 <TD>&nbsp;</TD>
125 <TD>4-48 kHz or 48 kHz only, depending on the chipset</TD>
126 <TD>&nbsp;</TD>
127 <TD>&nbsp;</TD>
128 </TR>
129
130 <TR>
131 <TD><B>Aureal Vortex 2</B></TD>
132 <TD>none</TD>
133 <TD>none</TD>
134 <TD>OK</TD>
135 <TD><A HREF="http://aureal.sourceforge.net">Linux Aureal Drivers</A><BR>
136 <A HREF="http://makacs.poliod.hu/~pontscho/aureal/au88xx-1.1.3.tar.bz2">buffer size increased to 32k</A></TD>
137 <TD>48</TD>
138 <TD>4.1</TD>
139 <TD>5+</TD>
140 </TR>
141
142 <TR>
143 <TD><B>SB Live!</B></TD>
144 <TD>Analog OK, SP/DIF not working</TD>
145 <TD>Both OK</TD>
146 <TD>Both OK</TD>
147 <TD><A HREF="http://opensource.creative.com">Creative's OSS driver (SP/DIF support)</A></TD>
148 <TD>192</TD>
149 <TD>4.0/5.1</TD>
150 <TD>32</TD>
151 </TR>
152
153 <TR>
154 <TD><B>SB 128 PCI (es1371)</B></TD>
155 <TD>OK</TD>
156 <TD>?</TD>
157 <TD>&nbsp;</TD>
158 <TD>&nbsp;</TD>
159 <TD>48</TD>
160 <TD>stereo</TD>
161 <TD>2</TD>
162 </TR>
163
164 <TR>
165 <TD><B>SB AWE 64</B></TD>
166 <TD>max 44kHz</TD>
167 <TD>48kHz sounds bad</TD>
168 <TD>&nbsp;</TD>
169 <TD>&nbsp;</TD>
170 <TD>48</TD>
171 <TD>&nbsp;</TD>
172 <TD>&nbsp;</TD>
173 </TR>
174
175 <TR>
176 <TD><B>GUS PnP</B></TD>
177 <TD>none</TD>
178 <TD>OK</TD>
179 <TD>OK</TD>
180 <TD>&nbsp;</TD>
181 <TD>48</TD>
182 <TD>&nbsp;</TD>
183 <TD>&nbsp;</TD>
184 </TR>
185
186 <TR>
187 <TD><B>Gravis UltraSound ACE</B></TD>
188 <TD>not OK</TD>
189 <TD>OK</TD>
190 <TD>&nbsp;</TD>
191 <TD>&nbsp;</TD>
192 <TD>44</TD>
193 <TD>&nbsp;</TD>
194 <TD>&nbsp;</TD>
195 </TR>
196
197 <TR>
198 <TD><B>Gravis UltraSound MAX</B></TD>
199 <TD>OK</TD>
200 <TD>OK (?)</TD>
201 <TD>&nbsp;</TD>
202 <TD>&nbsp;</TD>
203 <TD>48</TD>
204 <TD>&nbsp;</TD>
205 <TD>&nbsp;</TD>
206 </TR>
207
208 <TR>
209 <TD><B>ESS 688</B></TD>
210 <TD>OK</TD>
211 <TD>OK (?)</TD>
212 <TD>&nbsp;</TD>
213 <TD>&nbsp;</TD>
214 <TD>48</TD>
215 <TD>&nbsp;</TD>
216 <TD>&nbsp;</TD>
217 </TR>
218
219 <TR>
220 <TD><B>C-Media cards (which ones?)</B></TD>
221 <TD>not OK (hissing) (?)</TD>
222 <TD>OK</TD>
223 <TD>&nbsp;</TD>
224 <TD>&nbsp;</TD>
225 <TD>?</TD>
226 <TD>&nbsp;</TD>
227 <TD>&nbsp;</TD>
228 </TR>
229
230 <TR>
231 <TD><B>Yamaha cards (*ymf*)</B></TD>
232 <TD>not OK (?) (maybe <CODE>-ao sdl</CODE>)</TD>
233 <TD>OK only with ALSA 0.5 with OSS emulation <B>AND</B>
234 <CODE>-ao sdl</CODE> (!) (?)</TD>
235 <TD>&nbsp;</TD>
236 <TD>&nbsp;</TD>
237 <TD>?</TD>
238 <TD>&nbsp;</TD>
239 <TD>&nbsp;</TD>
240 </TR>
241
242 <TR>
243 <TD><B>Cards with envy24 chips (like Terratec EWS88MT)</B></TD>
244 <TD>?</TD>
245 <TD>?</TD>
246 <TD>OK</TD>
247 <TD>&nbsp;</TD>
248 <TD>?</TD>
249 <TD>&nbsp;</TD>
250 <TD>&nbsp;</TD>
251 </TR>
252
253 <TR>
254 <TD><B>PC Speaker or DAC</B></TD>
255 <TD>OK</TD>
256 <TD>none</TD>
257 <TD>&nbsp;</TD>
258 <TD><A HREF="http://www.geocities.com/stssppnn/pcsp.html">Linux PC speaker OSS driver</a></TD>
259 <TD>The driver emulates 44.1, maybe more.</TD>
260 <TD>mono</TD>
261 <TD>1</TD>
262 </TR>
30 263
31 </TABLE> 264 </TABLE>
32 265
33 <P>Fact is, Linux sound card drivers have compatibility problems. 266 <P><A NAME="note1"><B>[1]</B></A>: the number of applications that are able to use the
34 It <B>may</B> take a while to find your optimal settings.</P> 267 device <I>at the same time</I>.</P>
35 268
36 <UL> 269 <P>Feedback to this document is welcome. Please tell us how MPlayer
37 <LI>If you have an OSS driver, first try <CODE>-ao oss</CODE> (this is the default). 270 and your sound card(s) worked together.</P>
38 If you experience glitches, halts or anything out of the ordinary, try 271
39 <CODE>-ao sdl</CODE> (NOTE: you need to have SDL libraries and header files 272
40 installed). The SDL audio driver helps in a lot of cases and also supports ESD, 273 <H4><A NAME="af">2.3.2.3 Audio filters</A></H4>
41 ARTS, and up/downsampling. (ESD is the sound daemon from GNOME, ARTS is from KDE.)</LI> 274
42 <LI>If you have ALSA version 0.5, then you almost always have to use <CODE>-ao alsa5</CODE> , 275 <P>The old audio plugins have been superseded by a new audio filter layer. Audio
43 since ALSA 0.5 has buggy OSS emulation code, and will <B>crash MPlayer</B> with 276 filters are used for changing the properties of the audio data before the
44 a message like this:<BR> 277 sound reaches the sound card. The activation and deactivation of the filters
45 <CODE>DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!</CODE></LI> 278 is normally automated but can be overridden. The filters are activated when
46 <LI>If you have ALSA version 0.9 you may choose between <CODE>-ao oss</CODE> and 279 the properties of the audio data differ from those required by the sound card
47 <CODE>-ao sdl</CODE>. You can also use <CODE>-ao alsa9</CODE>. It works, but 280 and deactivated if unnecessary. The <CODE>-af filter1,filter2,...</CODE>
48 there are problems like lost sync and disappearing audio.</LI> 281 option is used to override the automatic activation of filters or to insert
49 </UL> 282 filters that are not automatically inserted. The filters will be executed as
50 283 they appear in the comma separated list.</P>
51 <P>On <B>Solaris/FreeBSD</B> systems, use the SUN audio driver with the 284
52 <CODE>-ao sun</CODE> option, otherwise neither video nor audio will work.</P> 285 <P>Example:<BR>
53 286 &nbsp;&nbsp;<CODE>mplayer -af resample,pan movie.avi </CODE></P>
54 <P><B><A NAME=2.3.2.1>2.3.2.1. Sound Card experiences, recommendations</A></B></P> 287
55 288 <P>would run the sound through the resampling filter followed by the pan filter.
56 <TABLE BORDER=0 WIDTH="100%"> 289 Observe that the list must not contain any spaces, else it will fail.</P>
57 <TR><TD COLSPAN=3><B><FONT CLASS="text">VIA onboard chipset (via82cxxx) 48kHz only</B></TD><TR> 290
58 <TD></TD><TD><FONT CLASS="text">Driver:</TD><TD><FONT CLASS="text"> from <A HREF="http://sourceforge.net/project/showfiles.php?group_id=3242&amp;release_id=59602">here</A></TD><TR> 291 <P>The filters often have options that change their behavior. These options
59 292 are explained in detail in the sections below. A filter will execute using
60 <TD COLSPAN=3><B><FONT CLASS="text">Aureal Vortex 2</B></TD><TR> 293 default settings if its options are omitted. Here is an example of how to use
61 <TD>&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">no driver</TD><TR> 294 filters in combination with filter specific options:</P>
62 <TD></TD><TD><FONT CLASS="text">OSS/Pro:</TD><TD><FONT CLASS="text">OK</TD><TR> 295
63 <TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">no driver</TD><TR> 296 <P>&nbsp;&nbsp;<CODE>mplayer -af resample=11025,pan=1:0.5:0.5 -channels 1
64 <TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD>48</TD><TR> 297 -srate 11025 media.avi</CODE></P>
65 <TD></TD><TD><FONT CLASS="text">Driver:</TD><TD><FONT CLASS="text"><A HREF="http://aureal.sourceforge.net">aureal.sourceforge.net</A></TD><TR> 298
66 <TD></TD><TD><FONT CLASS="text">Driver2:</TD><TD><FONT CLASS="text"> from <A HREF="http://makacs.poliod.hu/~pontscho/aureal/au88xx-1.1.3.tar.bz2">here</A><BR> 299 <P>would set the output frequency of the resample filter to 11025Hz and downmix
67 (<I>buffer size increased to 32k</I>)</TD><TR> 300 the audio to 1 channel using the pan filter.</P>
68 301
69 <TD COLSPAN=3><B><FONT CLASS="text">GUS PnP</B></TD><TR> 302 <P>The overall execution of the filter layer is controlled using the
70 <TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">no driver</TD><TR> 303 <CODE>-af-adv</CODE> option. This option has two suboptions:</P>
71 <TD></TD><TD><FONT CLASS="text">OSS/Pro:</TD><TD><FONT CLASS="text">OK</TD><TR> 304
72 <TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK</TD><TR> 305 <DL>
73 <TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">48</TD><TR> 306 <DT><CODE>force</CODE><DT>
74 307 <DD>is a Bit field that controls how the filters are inserted and what
75 <TD COLSPAN=3><B><FONT CLASS="text">SB Live!</B></TD><TR> 308 speed/accuracy optimizations they use:
76 <TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">Analog OK, SP/DIF not working</TD><TR> 309 <DL>
77 <TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">Both OK</TD><TR> 310 <DT><CODE>0</CODE></DT>
78 <TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">192</TD><TR> 311 <DD>Use automatic insertion of filters and optimize according to CPU
79 312 speed.</DD>
80 <TD COLSPAN=3><B><FONT CLASS="text">SB AWE 64</B></TD><TR> 313 <DT><CODE>1</CODE></DT>
81 <TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">max 44kHz</TD><TR> 314 <DD>Use automatic insertion of filters and optimize for the highest
82 <TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">48kHz sounds bad</TD><TR> 315 speed.<BR>
83 <TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">48</TD><TR> 316 <EM>Warning:</EM> Some features in the audio filters may silently fail,
84 317 and the sound quality may drop.</DD>
85 <TD COLSPAN=3><B><FONT CLASS="text">Gravis UltraSound ACE</B></TD><TR> 318 <DT><CODE>2</CODE></DT>
86 <TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">not OK</TD><TR> 319 <DD>Use automatic insertion of filters and optimize for quality.</DD>
87 <TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK</TD><TR> 320 <DT><CODE>3</CODE></DT>
88 <TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">44</TD><TR> 321 <DD>Use no automatic insertion of filters and no optimization.<BR>
89 322 <I>Warning:</I> It may be possible to crash MPlayer using this
90 <TD COLSPAN=3><B><FONT CLASS="text">Gravis UltraSound MAX</B></TD><TR> 323 setting.</DD>
91 <TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">OK</TD><TR> 324 <DT><CODE>4</CODE></DT>
92 <TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK (?)</TD><TR> 325 <DD>Use automatic insertion of filters according to 0 above, but use
93 <TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">48</TD><TR> 326 floating point processing when possible.</DD>
94 327 <DT><CODE>5</CODE></DT>
95 <TD COLSPAN=3><B><FONT CLASS="text">ESS 688</B></TD><TR> 328 <DD>Use automatic insertion of filters according to 1 above, but use
96 <TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">OK</TD><TR> 329 floating point processing when possible.</DD>
97 <TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK (?)</TD><TR> 330 <DT><CODE>6</CODE></DT>
98 <TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">48</TD><TR> 331 <DD>Use automatic insertion of filters according to 2 above, but use
99 332 floating point processing when possible.</DD>
100 <TD COLSPAN=3><B><FONT CLASS="text">C-Media cards (which ones?)</B></TD><TR> 333 <DT><CODE>7</CODE></DT>
101 <TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">not OK (hissing) (?)</TD><TR> 334 <DD>Use no automatic insertion of filters according to 3 above, and use
102 <TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK (?)</TD><TR> 335 floating point processing when possible.</DD>
103 <TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">?</TD><TR> 336 </DL>
104 337 </DD>
105 <TD COLSPAN=3><B><FONT CLASS="text">Yamaha cards (*ymf*)</B></TD><TR> 338
106 <TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">not OK (?) (maybe <CODE>-ao sdl</CODE>)</TD><TR> 339 <DT><CODE>list</CODE></DT>
107 <TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK only with ALSA 0.5 with OSS emulation <B>AND</B> <CODE>-ao sdl</CODE> (!) (?)</TD><TR> 340 <DD>is an alias for the -af option.</DD>
108 <TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">?</TD><TR> 341 </DL>
109 342
110 <TD COLSPAN=3><B><FONT CLASS="text">Cards with envy24 chips (like Terratec EWS88MT)</B></TD><TR> 343 <P>The filter layer is also affected by the following generic options:
111 <TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">?</TD><TR> 344
112 <TD></TD><TD><FONT CLASS="text">OSS/Pro:</TD><TD><FONT CLASS="text">OK</TD><TR> 345 <DL>
113 <TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">?</TD><TR> 346 <DT><CODE>-v</CODE></DT>
114 <TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">?</TD><TR> 347 <DD>Increases the verbosity level and makes most filters print out extra
115 348 status messages.</DD>
116 <TD COLSPAN=3><B><FONT CLASS="text">PC Speaker or DAC</B></TD><TR> 349 <DT><CODE>-channels</CODE></DT>
117 <TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">OK (Use the SDL driver: <CODE>-ao sdl</CODE>)</TD><TR> 350 <DD>This option sets the number of output channels you would like your
118 <TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">no driver</TD><TR> 351 sound card to use.
119 <TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">The driver emulates 44.1, maybe more.</TD><TR> 352 It also affects the number of channels that are being decoded from the
120 <TD></TD><TD><FONT CLASS="text">Driver:</TD><TD><FONT CLASS="text"><A HREF="ftp://ftp.infradead.org/pub/pcsp">ftp://ftp.infradead.org/pub/pcsp</A></TD> 353 media. If the media contains less channels than requested the channels
354 filter (see below) will automatically be inserted. The routing will be the
355 default routing for the channels filter.</DD>
356 <DT><CODE>-srate</CODE></DT>
357 <DD>This option selects the sample rate you would like your sound card to
358 use (of course the cards have limits on this). If the sample
359 frequency of your sound card is different from that of the current media,
360 the resample filter (see below) will be inserted into the audio filter layer
361 to compensate for the difference.</DD>
362 <DT><CODE>-format</CODE><DT>
363 <DD>This option sets the sample format between the audio filter layer and the sound
364 card. If the requested sample format of your sound card is different from
365 that of the current media, a format filter (see below) will be inserted to
366 rectify the difference.</DD>
367 </DL>
368
369
370 <H4><A NAME="af_resample">2.3.2.3.1 Up/Down-sampling</A></H4>
371
372 <P>MPlayer fully supports sound up/down-sampling through the
373 <CODE>resample</CODE> filter. It can be used if you
374 have a fixed frequency sound card or if you are stuck with an old sound card
375 that is only capable of max 44.1kHz. This filter is automatically enabled if
376 it is necessary, but it can also be explicitly enabled on the command line. It
377 has three options:</P>
378
379 <DL>
380 <DT><CODE>srate &lt;8000-192000&gt;</CODE></DT>
381 <DD>is an integer used for setting the output sample
382 frequency in Hz. The valid range for this parameter is 8kHz to 192kHz. If
383 the input and output sample frequency are the same or if this parameter is
384 omitted the filter is automatically unloaded. A high sample frequency
385 normally improves the audio quality, especially when used in combination
386 with other filters.</DD>
387
388 <DT><CODE>sloppy</CODE></DT>
389 <DD>is an optional binary parameter that allows the output frequency to differ
390 slightly from the frequency given by <CODE>srate</CODE>. This option can be
391 used if the startup of the playback is extremely slow. It is enabled by
392 default.</DD>
393
394 <DT><CODE>type &lt;0-2&gt;</CODE><DT>
395 <DD>is an optional integer between <CODE>0</CODE> and <CODE>2</CODE> that
396 selects which resampling method to use. Here <CODE>0</CODE> represents
397 linear interpolation as resampling method, <CODE>1</CODE> represents
398 resampling using a poly-phase filter-bank and integer processing and
399 <CODE>2</CODE> represents resampling using a poly-phase filter-bank and
400 floating point processing. Linear interpolation is extremely fast, but
401 suffers from poor sound quality especially when used for up-sampling. The
402 best quality is given by <CODE>2</CODE> but this method also suffers from
403 the highest CPU load.</DD>
404 </DL>
405
406 <P>Example:<BR>
407 &nbsp;&nbsp;<CODE>mplayer -af resample=44100:0:0</CODE></P>
408
409 <P>would set the output frequency of the resample filter to 44100Hz using exact
410 output frequency scaling and linear interpolation.</P>
411
412
413 <H4><A NAME="af_channels">2.3.2.3.2 Changing the number of channels</A></H4>
414
415 <P>The <CODE>channels</CODE> filter can be used for adding and removing
416 channels, it can also be used for routing or copying channels. It is
417 automatically enabled when the output from the audio filter layer differs from
418 the input layer or when it is requested by another filter. This filter unloads
419 itself if not needed. The number of options is dynamic:</P>
420
421 <DL>
422 <DT><CODE>nch &lt;1-6&gt;</CODE></DT>
423 <DD>is an integer between <CODE>1</CODE> and <CODE>6</CODE> that is used for
424 setting the number of output channels. This option is required, leaving it
425 empty results in a runtime error.</DD>
426
427 <DT><CODE>nr &lt;1-6&gt;</CODE></DT>
428 <DD>is an integer between <CODE>1</CODE> and <CODE>6</CODE> that is used for
429 specifying the number of routes. This parameter is optional. If it is
430 omitted the default routing is used.</DD>
431
432 <DT><CODE>from1:to1:from2:to2:from3:to3...</CODE></DT>
433 <DD>are pairs of numbers between <CODE>0</CODE> and <CODE>5</CODE> that define
434 where each channel should be routed.</DD>
435 </DL>
436
437 <P>If only <CODE>nch</CODE> is given the default routing is used, it works as
438 follows: If the number of output channels is bigger than the number of input
439 channels empty channels are inserted (except mixing from mono to stereo, then
440 the mono channel is repeated in both of the output channels). If the number of
441 output channels is smaller than the number of input channels the exceeding
442 channels are truncated.</P>
443
444 <P>Example 1:<BR>
445 &nbsp;&nbsp;<CODE>mplayer -af channels=4:4:0:1:1:0:2:2:3:3 media.avi </CODE></P>
446
447 <P>would change the number of channels to 4 and set up 4 routes that swap
448 channel 0 and channel 1 and leave channel 2 and 3 intact. Observe that if
449 media containing two channels was played back, channels 2 and 3 would contain
450 silence but 0 and 1 would still be swapped.</P>
451
452 <P>Example 2:<BR>
453 &nbsp;&nbsp;<CODE>mplayer -af channels=6:4:0:0:0:1:0:2:0:3 media.avi </CODE></P>
454
455 <P>would change the number of channels to 6 and set up 4 routes that copy
456 channel 0 to channels 0 to 3. Channel 4 and 5 will contain silence.</P>
457
458
459 <H4><A NAME="af_format">2.3.2.3.3 Sample format converter</A></H4>
460
461 <P>The <CODE>format</CODE> filter converts between different sample formats. It
462 is automatically enabled when needed by the sound card or another filter.</P>
463
464 <DL>
465 <DT><CODE>bps &lt;number&gt;</CODE></DT>
466 <DD>can be <CODE>1</CODE>, <CODE>2</CODE> or <CODE>4</CODE> and denotes the
467 number of bytes per sample. This option is required, leaving it empty
468 results in a runtime error.</DD>
469
470 <DT><CODE>f &lt;format&gt;</CODE></DT>
471 <DD>is a text string describing the sample format. The string is a
472 concatenated mix of: <CODE>alaw</CODE>, <CODE>mulaw</CODE> or
473 <CODE>imaadpcm</CODE>, <CODE>float</CODE> or <CODE>int</CODE>,
474 <CODE>unsigned</CODE> or <CODE>signed</CODE>, <CODE>le</CODE> or
475 <CODE>be</CODE> (little or big endian). This option is required, leaving it
476 empty results in a runtime error.</DD>
477 </DL>
478
479 <P>Example:<BR>
480 &nbsp;&nbsp;<CODE>mplayer -af format=4:float media.avi</CODE></P>
481
482 <P>would set the output format to 4 bytes per sample floating point
483 data.</P>
484
485
486 <H4><A NAME="af_delay">2.3.2.3.4 Delay</A></H4>
487
488 <P>The <CODE>delay</CODE> filter delays the sound to the loudspeakers such that
489 the sound from the different channels arrives at the listening position
490 simultaneously.
491 It is only useful if you have more than 2 loudspeakers. This filter has a
492 variable number of parameters:</P>
493
494 <DL>
495 <DT><CODE>d1:d2:d3...</CODE></DT>
496 <DD>are floating point numbers representing the delays in ms that should be
497 imposed on the different channels. The minimum delay is 0ms and the maximum
498 is 1000ms.</DD>
499 </DL>
500
501 <P>To calculate the required delay for the different channels do as follows:</P>
502
503 <OL>
504 <LI>Measure the distance to the loudspeakers in meters in relation to your
505 listening position, giving you the distances s1 to s5 (for a 5.1 system).
506 There is no point in compensating for the sub-woofer (you will not hear the
507 difference anyway).</LI>
508 <LI>Subtract the distances s1 to s5 from the maximum distance i.e.<BR>
509 s[i] = max(s) - s[i]; i = 1...5</LI>
510 <LI>Calculated the required delays in ms as<BR>
511 d[i] = 1000*s[i]/342; i = 1...5 </LI>
512 </OL>
513
514 <P>Example:<BR>
515 &nbsp;&nbsp;<CODE>mplayer -af delay=10.5:10.5:0:0:7:0 media.avi</CODE></P>
516
517 <P>would delay front left and right by 10.5ms, the two rear channels and the sub
518 by 0ms and the center channel by 7ms.</P>
519
520
521 <H4><A NAME="af_volume">2.3.2.3.5 Software volume control</A></H4>
522
523 <P>Software volume control is implemented by the <CODE>volume</CODE> audio
524 filter. Use this filter with caution since
525 it can reduce the signal to noise ratio of the sound. In most cases it is best
526 to set the level for the PCM sound to max, leave this filter out and control
527 the output level to your speakers with the master volume control of the mixer.
528 In case your sound card has a digital PCM mixer instead of an analog one, and
529 you hear distortion, use the MASTER mixer instead.
530 If there is an external amplifier connected to the computer (this is almost
531 always the case), the noise level can be minimized by adjusting the master
532 level and the volume knob on the amplifier until the hissing noise in the
533 background is gone. This filter has two options:</P>
534
535 <DL>
536 <DT><CODE>v &lt;-200 - +60&gt;</CODE></DT>
537 <DD>is a floating point number between <CODE>-200</CODE> and <CODE>+60</CODE>
538 which represents the volume level in dB. The default level is 0dB.</DD>
539
540 <DT><CODE>c</CODE></DT>
541 <DD>is a binary control that turns soft clipping on and off. Soft-clipping can
542 make the sound more smooth if very high volume levels are used. Enable this
543 option if the dynamic range of the loudspeakers is very low. Be aware that
544 this feature creates distortion and should be considered a last resort.</DD>
545 </DL>
546
547 <P>Example:<BR>
548 &nbsp;&nbsp;<CODE>mplayer -af volume=10.1:0 media.avi</CODE></P>
549
550 <P>would amplify the sound by 10.1dB and hard-clip if the sound level is too
551 high.</P>
552
553 <P>This filter has a second feature: It measures the overall maximum sound level
554 and prints out that level when MPlayer exits. This volume estimate can be used
555 for setting the sound level in MEncoder such that the maximum dynamic range is
556 utilized.</P>
557
558
559 <H4><A NAME="af_equalizer">2.3.2.3.6 Equalizer</A></H4>
560
561 <P>The <CODE>equalizer</CODE> filter represents a 10 octave band graphic
562 equalizer, implemented using 10 IIR
563 band pass filters. This means that it works regardless of what type of audio
564 is being played back. The center frequencies for the 10 bands are:</P>
565
566 <TABLE BORDER="0" WIDTH="100%">
567 <TR><TD>Band No.</TD><TD>Center frequency</TD></TR>
568 <TR><TD>0</TD><TD>31.25 Hz</TD></TR>
569 <TR><TD>1</TD><TD>62.50 Hz</TD></TR>
570 <TR><TD>2</TD><TD>125.0 Hz</TD></TR>
571 <TR><TD>3</TD><TD>250.0 Hz</TD></TR>
572 <TR><TD>4</TD><TD>500.0 Hz</TD></TR>
573 <TR><TD>5</TD><TD>1.000 kHz</TD></TR>
574 <TR><TD>6</TD><TD>2.000 kHz</TD></TR>
575 <TR><TD>7</TD><TD>4.000 kHz</TD></TR>
576 <TR><TD>8</TD><TD>8.000 kHz</TD></TR>
577 <TR><TD>9</TD><TD>16.00 kHz</TD></TR>
121 </TABLE> 578 </TABLE>
122 579
123 <UL> 580 <P>If the sample rate of the sound being played back is lower than the center
124 <LI>On Linux, a 2.4.x kernel is highly recommended. Kernel 2.2 is not tested.</LI> 581 frequency for a frequency band, then that band will be disabled. A known bug
125 <LI>If sound clicks when playing from CD-ROM, turn on IRQ unmasking, e.g. 582 with this filter is that the characteristics for the uppermost band are not
126 <CODE>hdparm -u1 /dev/cdrom</CODE> (<CODE>man hdparm</CODE>). This is 583 completely symmetric if the sample rate is close to the center frequency of
127 generally beneficial and described more detailed in the 584 that band. This problem can be worked around by up-sampling the sound using
128 <A HREF="cd-dvd.html#4.1">CD-ROM section</A>.</LI> 585 the resample filter before it reaches this filter. </P>
129 <LI>Sharing your sound card with another application like XMMS is <B>strongly discouraged</B>! 586
130 If the other sound application is using ESD, start <B>MPlayer</B> with the <CODE>-vo sdl:esd</CODE> option 587 <P>This filter has 10 parameters:</P>
131 to combine both sound streams! In fact, the option <CODE>-vo sdl:esd</CODE> could be used with ESD 588
132 even when playing <B>Mplayer</B> alone.</LI> 589 <DL>
133 <LI>Feedback to this document is welcome. Please tell us how <B>MPlayer</B> and 590 <DT><CODE>g1:g2:g3...g10</CODE></DT>
134 your sound card(s) worked together.</LI> 591 <DD>are floating point numbers between <CODE>-12</CODE> and <CODE>+12</CODE>
135 </UL> 592 representing the gain in dB for each frequency band.</DD>
136 593 </DL>
137 594
138 <P><B><A NAME=2.3.2.2>2.3.2.2. Audio plugins</A></B></P> 595 <P>Example:<BR>
139 596 &nbsp;&nbsp;<CODE>mplayer -af equalizer=11:11:10:5:0:-12:0:5:12:12 media.avi</CODE></P>
140 <P><B>MPlayer</B> has support for audio plugins. Audio plugins can be used for 597
141 changing the properties of the audio data before the sound reaches the sound 598 <P>would amplify the sound in the upper and lower frequency region while
142 card. They are enabled using the <CODE>-aop</CODE> switch which takes a 599 canceling it almost completely around 1kHz.</P>
600
601
602 <H4><A NAME="af_panning">2.3.2.3.7 Panning filter</A></H4>
603
604 <P>Use the <CODE>pan</CODE> filter to mix channels arbitrarily. It is basically
605 a combination of the volume control and the channels filter. There are two
606 major uses for this filter:</P>
607
608 <OL>
609 <LI>Down-mixing many channels to only a few, stereo to mono for example.</LI>
610 <LI>Varying the "width" of the center speaker in a surround sound system.</LI>
611 </OL>
612
613 <P>This filter is hard to use, and will require some tinkering before the
614 desired result is obtained. The number of options for this filter depends on
615 the number of output channels:</P>
616
617 <DL>
618 <DT><CODE>nch &lt;1-6&gt;</CODE></DT>
619 <DD>is an integer between <CODE>1</CODE> and <CODE>6</CODE> and is used for
620 setting the number of output channels. This option is required, leaving it
621 empty results in a runtime error.</DD>
622
623 <DT><CODE>l00:l01:l02:..l10:l11:l12:...ln0:ln1:ln2:...</CODE></DT>
624 <DD>are floating point values between <CODE>0</CODE> and <CODE>1</CODE>.
625 <CODE>l[i][j]</CODE> determines how much of input channel j is mixed into
626 output channel i.</DD>
627 </DL>
628
629 <P>Example 1:<BR>
630 &nbsp;&nbsp;<CODE>mplayer -af pan=1:0.5:0.5 -channels 1 media.avi</CODE></P>
631
632 <P>would down-mix from stereo to mono.</P>
633
634 <P>Example 2:<BR>
635 &nbsp;&nbsp;<CODE>mplayer -af pan=3:1:0:1:0.5:0.5 -channels 3 media.avi</CODE></P>
636
637 <P>would give 3 channel output leaving channels 0 and 1 intact, and mix channels
638 0 and 1 into output channel 2 (which could be sent to a sub-woofer for
639 example).</P>
640
641
642 <H4><A NAME="af_sub">2.3.2.3.8 Sub-woofer</A></H4>
643
644 <P>The <CODE>sub</CODE> filter adds a sub woofer channel to the audio stream.
645 The audio data
646 used for creating the sub-woofer channel is an average of the sound in channel
647 0 and channel 1. The resulting sound is then low-pass filtered by a 4th
648 order Butterworth filter with a default cutoff frequency of 60Hz and added to
649 a separate channel in the audio stream. Warning: Disable this filter when you
650 are playing DVDs with Dolby Digital 5.1 sound, otherwise this filter will
651 disrupt the sound to the sub-woofer. This filter has two parameters:</P>
652
653 <DL>
654 <DT><CODE>fc &lt;20-300&gt;</CODE></DT>
655 <DD>is an optional floating point number used for setting the cutoff frequency
656 for the filter in Hz. The valid range is 20Hz to 300Hz. For the best result
657 try setting the cutoff frequency as low as possible. This will improve the
658 stereo or surround sound experience. The default cutoff frequency is
659 60Hz.</DD>
660
661 <DT><CODE>ch &lt;0-5&gt;</CODE></DT>
662 <DD>is an optional integer between <CODE>0</CODE> and <CODE>5</CODE> which
663 determines the channel number in which to insert the sub-channel audio.
664 The default is channel number <CODE>5</CODE>. Observe that the number of
665 channels will automatically be increased to <CODE>ch</CODE> if
666 necessary.</DD>
667 </DL>
668
669 <P>Example:<BR>
670 &nbsp;&nbsp;<CODE>mplayer -af sub=100:4 -channels 5 media.avi</CODE></P>
671
672 <P>would add a sub-woofer channel with a cutoff frequency of 100Hz to output
673 channel 4.</P>
674
675 <H4><A NAME="af_surround">2.3.2.3.9 Surround-sound decoder</A></H4>
676
677 <P>Matrix encoded surround sound can be decoded by the <CODE>surround</CODE>
678 filter. Dolby Surround is
679 an example of a matrix encoded format. Many files with 2 channel audio
680 actually contain matrixed surround sound. To use this feature you need a sound
681 card supporting at least 4 channels. This filter has one parameter:</P>
682
683 <DL>
684 <DT><CODE>d &lt;0-1000&gt;</CODE></DT>
685 <DD>is an optional floating point number between <CODE>0</CODE> and
686 <CODE>1000</CODE> used for setting the delay time in ms for the rear
687 speakers. This delay should be set as follows: if d1 is the distance from
688 the listening position to the front speakers and d2 is the distance from
689 the listening position to the rear speakers, then the delay <CODE>d</CODE>
690 should be set to 15ms if d1 &lt;= d2 and to 15 + 5*(d1-d2) if d1 &gt; d2.
691 The default value for <CODE>d</CODE> is 20ms.</DD>
692 </DL>
693
694 <P>Example:<BR>
695 &nbsp;&nbsp;<CODE>mplayer -af surround=15 -channels 4 media.avi</CODE></P>
696
697 <P>would add surround sound decoding with 15ms delay for the sound to the rear
698 speakers.</P>
699
700
701 <H4><A NAME="plugins">2.3.2.4 Audio plugins (deprecated)</A></H4>
702
703 <H2><STRONG>Note: Audio plugins have been deprecated by audio filters and will be
704 removed soon.</STRONG></H2>
705
706 <P>MPlayer has support for audio plugins. Audio plugins can be used to
707 change the properties of the audio data before it reaches the sound
708 card. They are enabled using the <CODE>-aop</CODE> option which takes a
143 <CODE>list=plugin1,plugin2,...</CODE> argument. The <CODE>list</CODE> argument 709 <CODE>list=plugin1,plugin2,...</CODE> argument. The <CODE>list</CODE> argument
144 is required and determines which plugins should be used and in which order they 710 is required and determines which plugins should be used and in which order they
145 should be executed. Example: 711 should be executed. Example:</P>
146 </P>
147 712
148 <P>&nbsp;&nbsp;<CODE>mplayer media.avi -aop list=resample,format</CODE></P> 713 <P>&nbsp;&nbsp;<CODE>mplayer media.avi -aop list=resample,format</CODE></P>
149 714
150 <P>would run the sound through the resampling plugin followed by the format 715 <P>would run the sound through the resampling plugin followed by the format
151 plugin. 716 plugin.</P>
152 </P> 717
153 718 <P>The plugins can also have options that change their behavior. These
154 <P>The plugins can also have switches that change their behavior. These 719 options are explained in detail in the sections below. A plugin will execute
155 switches are explained in detail in the sections below. A plugin will execute 720 using default settings if its options are omitted. Here is an example of how
156 using default settings if its switches are omitted. Here is an example of how 721 to use plugins in combination with plugin specific options:</P>
157 to use plugins in combination with plugin specific switches:
158 </P>
159 722
160 <P>&nbsp;&nbsp;<CODE>mplayer media.avi -aop 723 <P>&nbsp;&nbsp;<CODE>mplayer media.avi -aop
161 list=resample,format:fout=44100:format=0x8</CODE> 724 list=resample,format:fout=44100:format=0x8</CODE></P>
162 </P>
163 725
164 <P>would set the output frequency of the resample plugin to 44100Hz and the 726 <P>would set the output frequency of the resample plugin to 44100Hz and the
165 output format of the format plugin to AFMT_U8. 727 output format of the format plugin to AFMT_U8.</P>
166 </P> 728
167 729 <P>Currently audio plugins cannot be used in MEncoder.</P>
168 <P>Currently audio plugins can not be used in <B>MEncoder</B>.</P> 730
169 731
170 732 <H4><A NAME="resample">2.3.2.4.1 Up/Downsampling</A></H4>
171 <P><B><A NAME=2.3.2.2.1>2.3.2.2.1. Up/Downsampling</A></B></P> 733
172 734 <P>MPlayer fully supports up/downsampling of the sound. This plugin can
173 <P><B>MPlayer</B> fully supports up/downsampling of the sound. This plugin can
174 be used if you have a fixed frequency sound card or if you are 735 be used if you have a fixed frequency sound card or if you are
175 stuck with an old sound card that is only capable of max 44.1kHz. 736 stuck with an old sound card that is only capable of max 44.1kHz.
176 Limitations in your hardware are not auto detected, so you have to specify 737 MPlayer <EM>autodetects</EM> whether or not usage of this plugin is necessary.
177 the sample frequency explicitly. This plugin has one switch: 738 This plugin has one option, <CODE>fout</CODE>, which is used for setting the
178 <CODE>fout</CODE> which is used for setting the desired output sample 739 desired output sample frequency. The value is given in Hz, and defaults to
179 frequency. It defaults to 48kHz, and is given in 740 48kHz.</P>
180 &lt;Hz&gt;.
181 </P>
182 741
183 <P>Usage:<BR> 742 <P>Usage:<BR>
184 &nbsp;&nbsp;<CODE>mplayer media.avi -aop list=resample:fout=&lt;required 743 &nbsp;&nbsp;<CODE>mplayer media.avi -aop list=resample:fout=&lt;required
185 frequency in Hz, like 44100&gt;</CODE></P> 744 frequency in Hz, like 44100&gt;</CODE></P>
186 745
187 <P>Note that the output frequency should not be scaled up from the default value. 746 <P>Note that the output frequency should not be scaled up from the default value.
188 Scaling up will cause the audio and video streams to be played in slow motion 747 Scaling up will cause the audio and video streams to be played in slow motion
189 in addition to audio distortion.</P> 748 and cause audio distortion.</P>
190 749
191 <P><B><A NAME=2.3.2.2.2>2.3.2.2.2. Surround Sound decoding</A></B></P> 750
192 751 <H4><A NAME="surround_decoding">2.3.2.4.2 Surround Sound decoding</A></H4>
193 <P><B>MPlayer</B> has an audio plugin that can decode matrix encoded 752
194 surround sound. Dolby Surround is an example of a matrix encoded format. 753 <P>MPlayer has an audio plugin that can decode matrix encoded
195 Many files with 2 channel audio actually contain matrixed surround sound. 754 surround sound. Dolby Surround is an example of a matrix encoded format.
196 To use this feature you need a sound card supporting at least 4 channels.</P> 755 Many files with 2 channel audio actually contain matrixed surround sound.
756 To use this feature you need a sound card supporting at least 4 channels.</P>
197 757
198 <P>Usage:<BR> 758 <P>Usage:<BR>
199 &nbsp;&nbsp;<CODE>mplayer media.avi -aop list=surround</CODE></P> 759 &nbsp;&nbsp;<CODE>mplayer media.avi -aop list=surround</CODE></P>
200 760
201 761
202 <P><B><A NAME=2.3.2.2.3>2.3.2.2.3. Sample format converter</A></B></P> 762 <H4><A NAME="format">2.3.2.3.3 Sample format converter</A></H4>
203 763
204 <P>If your sound card driver does not support signed 16bit <CODE>int</CODE> data type, 764 <P>If your sound card driver does not support signed 16bit <CODE>int</CODE> data type,
205 this plugin can 765 this plugin can
206 be used to change the format to one which your sound card can understand. It 766 be used to change the format to one which your sound card can understand. It
207 has one switch, <CODE>format</CODE>, which can be set to one of the numbers 767 has one option, <CODE>format</CODE>, which can be set to one of the numbers
208 found in <CODE>libao2/afmt.h</CODE>. This plugin is hardly ever needed and is 768 found in <CODE>libao2/afmt.h</CODE>. This plugin is hardly ever needed and is
209 intended for advanced users. Keep in mind that this plugin only changes the 769 intended for advanced users. Keep in mind that this plugin only changes the
210 sample format and not the sample frequency or the number of channels. 770 sample format and not the sample frequency or the number of channels.</P>
211 </P>
212 771
213 <P>Usage:<BR> 772 <P>Usage:<BR>
214 &nbsp;&nbsp;<CODE>mplayer media.avi -aop 773 &nbsp;&nbsp;<CODE>mplayer media.avi -aop
215 list=format:format=&lt;required output format&gt;</CODE> 774 list=format:format=&lt;required output format&gt;</CODE></P>
216 </P> 775
217 776
218 777 <H4><A NAME="delay">2.3.2.4.4 Delay</A></H4>
219 <P><B><A NAME=2.3.2.2.4>2.3.2.2.4. Delay</A></B></P>
220 778
221 <P>This plugin delays the sound and is intended as an example of how to develop 779 <P>This plugin delays the sound and is intended as an example of how to develop
222 new plugins. It can not be used for anything useful from a users perspective 780 new plugins. It can not be used for anything useful from a users perspective
223 and is mentioned here for the sake of completeness only. Do not use this 781 and is mentioned here for the sake of completeness only. Do not use this
224 plugin unless you are a developer.</P> 782 plugin unless you are a developer.</P>
225 783
226 <P><B><A NAME=2.3.2.2.5>2.3.2.2.5. Software volume control</A></B></P> 784 <P>If you have a file with a consistent A/V sync fault, use the <CODE>+/-</CODE>
785 keys to adjust timings on-the-fly instead. Usage of the OSD is recommended
786 to make this easier.</P>
787
788
789 <H4><A NAME="volume">2.3.2.4.5 Software volume control</A></H4>
227 790
228 <P>This plugin is a software replacement for the volume control, and 791 <P>This plugin is a software replacement for the volume control, and
229 can be used on machines with a broken mixer device. It can also be 792 can be used on machines with a broken mixer device. It can also be
230 used if one wants to change the output volume of <B>MPlayer</B> 793 used if one wants to change the output volume of MPlayer
231 without changing the PCM volume setting in the mixer. It has one 794 without changing the PCM volume setting in the mixer. It has one
232 switch <CODE>volume</CODE> that is used for setting the initial 795 option <CODE>volume</CODE> that is used for setting the initial
233 sound level. The initial sound level can be set to values between 0 796 sound level. The initial sound level can be set to values between 0
234 and 255 and defaults to 101 which equals 0dB amplification. Use this 797 and 255 and defaults to 101 which equals 0dB amplification. Use this
235 plugin with caution since it can reduce the signal to noise ratio of 798 plugin with caution since it can reduce the signal to noise ratio of
236 the sound. In most cases it is best to set the level for the PCM 799 the sound. In most cases it is best to set the level for the PCM
237 sound to max, leave this plugin out and control the output level to 800 sound to max, leave this plugin out and control the output level to
238 your speakers with the master volume control of the mixer. If there is an 801 your speakers with the MASTER volume control of the mixer.
802 In case your sound card has a digital PCM mixer instead of an analog one, and
803 you hear distortion, use the MASTER mixer instead.
239 external amplifier connected to the computer (this is almost always 804 external amplifier connected to the computer (this is almost always
240 the case), the noise level can be minimized by adjusting the master 805 the case), the noise level can be minimized by adjusting the master
241 level and the volume knob on the amplifier until the hissing noise 806 level and the volume knob on the amplifier until the hissing noise
242 in the background is gone. 807 in the background is gone.</P>
243 </P>
244 808
245 <P>Usage:<BR> 809 <P>Usage:<BR>
246 &nbsp;&nbsp;<CODE>mplayer media.avi -aop 810 &nbsp;&nbsp;<CODE>mplayer media.avi -aop
247 list=volume:volume=&lt;0-255&gt;</CODE> 811 list=volume:volume=&lt;0-255&gt;</CODE></P>
248 </P>
249 812
250 <P>This plugin also has compressor or "soft-clipping" capabilities. 813 <P>This plugin also has compressor or "soft-clipping" capabilities.
251 Compression can be used if the dynamic range of the sound is very 814 Compression can be used if the dynamic range of the sound is very
252 high or if the dynamic range of the loudspeakers is very 815 high or if the dynamic range of the loudspeakers is very
253 low. Be aware that this feature creates distortion and should be 816 low. Be aware that this feature creates distortion and should be
254 considered a last resort. 817 considered a last resort.</P>
255 </P>
256 818
257 <P>Usage:<BR> 819 <P>Usage:<BR>
258 &nbsp;&nbsp;<CODE>mplayer media.avi -aop 820 &nbsp;&nbsp;<CODE>mplayer media.avi -aop
259 list=volume:softclip</CODE> 821 list=volume:softclip</CODE></P>
260 </P> 822
261 823
262 824 <H4><A NAME="extrastereo">2.3.2.4.6 Extrastereo</A></H4>
263 <P><B><A NAME=2.3.2.2.6>2.3.2.2.6. Extrastereo</A></B></P>
264 825
265 <P>This plugin (linearly) increases the difference between left and right 826 <P>This plugin (linearly) increases the difference between left and right
266 channels (like the XMMS extrastereo plugin) which gives some sort of "live" 827 channels (like the XMMS extrastereo plugin) which gives some sort of "live"
267 effect to playback. 828 effect to playback.</P>
268 </P>
269 829
270 <P>Usage:<BR> 830 <P>Usage:<BR>
271 &nbsp;&nbsp;<CODE>mplayer media.avi -aop list=extrastereo</CODE><BR> 831 &nbsp;&nbsp;<CODE>mplayer media.avi -aop list=extrastereo</CODE><BR>
272 &nbsp;&nbsp;<CODE>mplayer media.avi -aop list=extrastereo:mul=3.45</CODE></P> 832 &nbsp;&nbsp;<CODE>mplayer media.avi -aop list=extrastereo:mul=3.45</CODE></P>
273 833
274 <P>The default coefficient (<CODE>mul</CODE>) is a float number that defaults 834 <P>The default coefficient (<CODE>mul</CODE>) is a float number that defaults
275 to 2.5. If you set it to 0.0, you will have mono sound (average of both 835 to 2.5. If you set it to 0.0, you will have mono sound (average of both
276 channels). If you set it to 1.0, sound will be unchanged.</P> 836 channels). If you set it to 1.0, sound will be unchanged, if you set it to
277 837 -1.0, left and right channels will be swapped.</P>
278 838
279 <P><B><A NAME=2.3.2.2.7>2.3.2.2.7. Volume normalizer</A></B></P> 839
840 <H4><A NAME="normalizer">2.3.2.4.7 Volume normalizer</A></H4>
280 841
281 <P>This plugin maximizes the volume without distorting the sound.</P> 842 <P>This plugin maximizes the volume without distorting the sound.</P>
282 843
283 <P>Usage:<BR> 844 <P>Usage:<BR>
284 &nbsp;&nbsp;<CODE>mplayer media.avi -aop list=volnorm</CODE><BR> 845 &nbsp;&nbsp;<CODE>mplayer media.avi -aop list=volnorm</CODE><BR>
285 846
286 847
287 <P><B><A NAME=2.3.2.2.8>2.3.2.2.8. Surround</A></B></P>
288
289 <P>Someone should document something, sometime.</P>
290
291 </BODY> 848 </BODY>
292 </HTML> 849 </HTML>