Mercurial > mplayer.hg
annotate DOCS/xml/en/audio.xml @ 14436:540242c54db5
mention ao dsound
author | faust3 |
---|---|
date | Sun, 09 Jan 2005 10:32:05 +0000 |
parents | f1b1ae282fe5 |
children | 42c9e80127f3 |
rev | line source |
---|---|
9675 | 1 <?xml version="1.0" encoding="iso-8859-1"?> |
10913
49b1a67e7381
Add revision keyword to english xml files, to ease translation synchronization
lumag
parents:
10178
diff
changeset
|
2 <!-- $Revision$ --> |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
3 <sect1 id="audio"> |
9675 | 4 <title>Audio output devices</title> |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
5 <sect2 id="sync"> |
9675 | 6 <title>Audio/Video synchronisation</title> |
7 | |
8 <para> | |
9 <application>MPlayer</application>'s audio interface is called | |
10 <emphasis>libao2</emphasis>. It currently contains these drivers: | |
11 </para> | |
12 | |
13 <informaltable> | |
14 <tgroup cols="2"> | |
15 <thead> | |
16 <row><entry>Driver</entry><entry>Comment</entry></row> | |
17 </thead> | |
18 <tbody> | |
19 <row><entry>oss</entry><entry> | |
20 OSS (ioctl) driver (supports hardware AC3 passthrough) | |
21 </entry></row> | |
22 <row><entry>sdl</entry><entry> | |
23 SDL driver (supports sound daemons like <emphasis role="bold">ESD</emphasis> | |
24 and <emphasis role="bold">ARTS</emphasis>) | |
25 </entry></row> | |
26 <row><entry>nas</entry><entry> | |
27 NAS (Network Audio System) driver | |
28 </entry></row> | |
29 <row><entry>alsa5</entry><entry> | |
30 native ALSA 0.5 driver | |
31 </entry></row> | |
14112 | 32 <row><entry>alsa</entry><entry> |
33 native ALSA 0.9/1.0 driver (supports hardware AC3 passthrough) | |
9675 | 34 </entry></row> |
35 <row><entry>sun</entry><entry> | |
36 SUN audio driver (<filename>/dev/audio</filename>) for BSD and Solaris8 users | |
37 </entry></row> | |
10178 | 38 <row><entry>macosx</entry><entry> |
14112 | 39 native Mac OS X driver |
10178 | 40 </entry></row> |
41 <row><entry>win32</entry><entry> | |
42 native Win32 driver | |
43 </entry></row> | |
14436 | 44 <row><entry>dsound</entry><entry> |
45 Directx DirectSound driver | |
46 </entry></row> | |
9675 | 47 <row><entry>arts</entry><entry> |
48 native ARTS driver (mostly for KDE users) | |
49 </entry></row> | |
50 <row><entry>esd</entry><entry> | |
51 native ESD driver (mostly for GNOME users) | |
52 </entry></row> | |
12662
05d46af5e2bf
JACK audio support through bio2jack by Kamil Strzelecki <esack@o2.pl>
alex
parents:
12369
diff
changeset
|
53 <row><entry>jack</entry><entry> |
05d46af5e2bf
JACK audio support through bio2jack by Kamil Strzelecki <esack@o2.pl>
alex
parents:
12369
diff
changeset
|
54 JACK (Jack Audio Connection Kit) driver |
05d46af5e2bf
JACK audio support through bio2jack by Kamil Strzelecki <esack@o2.pl>
alex
parents:
12369
diff
changeset
|
55 </entry></row> |
14112 | 56 <row><entry>polyp</entry><entry> |
57 polypaudio driver | |
58 </entry></row> | |
9675 | 59 </tbody> |
60 </tgroup> | |
61 </informaltable> | |
62 | |
63 <para> | |
64 Linux sound card drivers have compatibility problems. This is because | |
65 <application>MPlayer</application> relies on an in-built feature of | |
66 <emphasis>properly</emphasis> coded sound drivers that enable them to | |
67 maintain correct audio/video sync. Regrettably, some driver authors | |
68 don't take the care to code this feature since it is not needed for | |
69 playing MP3s or sound effects. | |
70 </para> | |
71 | |
72 <para> | |
13977 | 73 Other media players like <ulink url="http://avifile.sf.net">aviplay</ulink> |
74 or <ulink url="http://xinehq.de">xine</ulink> possibly work | |
9675 | 75 out-of-the-box with these drivers because they use "simple" methods |
76 with internal timing. Measuring showed that their methods are not as | |
77 efficient as <application>MPlayer</application>'s. | |
78 </para> | |
79 | |
80 <para> | |
81 Using <application>MPlayer</application> with a properly written audio | |
82 driver will never result in A/V desyncs related to the audio, except | |
83 only with very badly created files (check the man page for workarounds). | |
84 </para> | |
85 | |
86 <para> | |
87 If you happen to have a bad audio driver, try the <option>-autosync</option> | |
88 option, it should sort out your problems. See the man page for detailed | |
89 information. | |
90 </para> | |
91 | |
92 <itemizedlist> | |
93 <title>Some notes:</title> | |
94 <listitem><para> | |
95 If you have an OSS driver, first try <option>-ao oss</option> (this is | |
96 the default). If you experience glitches, halts or anything out of the | |
97 ordinary, try <option>-ao sdl</option> (NOTE: you need to have SDL libraries | |
98 and header files installed). The SDL audio driver helps in a lot of cases | |
99 and also supports ESD (GNOME) and ARTS (KDE). | |
100 </para></listitem> | |
101 <listitem><para> | |
102 If you have ALSA version 0.5, then you almost always have to use | |
103 <option>-ao alsa5</option>, since ALSA 0.5 has buggy OSS emulation code, | |
104 and will <emphasis role="bold">crash <application>MPlayer</application></emphasis> | |
105 with a message like this: | |
106 <screen> | |
107 DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!<!-- | |
108 --></screen> | |
109 </para></listitem> | |
110 <listitem><para> | |
111 On Solaris, use the SUN audio driver with the <option>-ao sun</option> option, | |
112 otherwise neither video nor audio will work. | |
113 </para></listitem> | |
114 <listitem><para> | |
115 If the sound clicks when playing from CD-ROM, turn on IRQ unmasking, e.g. | |
116 <command>hdparm -u1 /dev/cdrom</command> (<command>man hdparm</command>). | |
117 This is generally beneficial and described in more detail in the | |
11483 | 118 <link linkend="drives">CD-ROM</link> section. |
9675 | 119 </para></listitem> |
120 </itemizedlist> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
121 </sect2> |
9675 | 122 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
123 <sect2 id="experiences"> |
9675 | 124 <title>Soundcard experiences, recommendations</title> |
125 <para> | |
126 On Linux, a 2.4.x kernel is highly recommended. Kernel 2.2 is not tested. | |
127 </para> | |
128 | |
129 <para> | |
130 Linux sound drivers are primarily provided by the free version of OSS. | |
11271
252fb0cf331a
spelling fixes, mostly by <ismail.donmez@boun.edu.tr>
diego
parents:
11106
diff
changeset
|
131 These drivers have been superseded by <ulink url="http://www.alsa-project.org">ALSA</ulink> |
9675 | 132 (Advanced Linux Sound Architecture) in the 2.5 development series. If |
133 your distribution does not already use ALSA you may wish to try their | |
134 drivers if you experience sound problems. ALSA drivers are generally | |
135 superior to OSS in compatibility, performance and features. But some | |
136 sound cards are only supported by the commercial OSS drivers from | |
137 <ulink url="http://www.opensound.com/">4Front Technologies</ulink>. | |
138 They also support several non-Linux systems. | |
139 </para> | |
140 | |
141 <informaltable> | |
142 <tgroup cols="8"> | |
143 <colspec colname="c1"/> | |
144 <colspec colname="c2"/> | |
145 <colspec colname="c3"/> | |
146 <colspec colname="c4"/> | |
147 <colspec colname="c5"/> | |
148 <colspec colname="c6"/> | |
149 <colspec colname="c7"/> | |
150 <colspec colname="c8"/> | |
151 <spanspec spanname="driver" namest="c2" nameend="c5"/> | |
152 <spanspec spanname="ossfree" namest="c2" nameend="c2"/> | |
153 <spanspec spanname="alsa" namest="c3" nameend="c3"/> | |
154 <spanspec spanname="osspro" namest="c4" nameend="c4"/> | |
155 <spanspec spanname="others" namest="c5" nameend="c5"/> | |
156 <thead> | |
157 <row> | |
158 <entry morerows="2" valign="middle">SOUND CARD</entry> | |
159 <entry spanname="driver">DRIVER</entry> | |
160 <entry morerows="2" valign="middle">Max kHz</entry> | |
161 <entry morerows="2" valign="middle">Max Channels</entry> | |
162 <entry morerows="2" valign="middle">Max Opens | |
163 <footnote id="maxopens"> | |
164 <para>the number of applications that are able to use | |
165 the device <emphasis>at the same time</emphasis>.</para> | |
166 </footnote> | |
167 </entry> | |
168 </row> | |
169 | |
170 <row> | |
171 <entry spanname="ossfree">OSS/Free</entry> | |
172 <entry spanname="alsa">ALSA</entry> | |
173 <entry spanname="osspro">OSS/Pro</entry> | |
174 <entry spanname="others">other</entry> | |
175 </row> | |
176 </thead> | |
177 | |
178 <tbody> | |
179 <row> | |
180 <entry>VIA onboard (686/A/B, 8233, 8235)</entry> | |
181 <entry> | |
13977 | 182 <ulink url="http://sf.net/project/showfiles.php?group_id=3242&release_id=59602">via82cxxx_audio</ulink> |
9675 | 183 </entry> |
184 <entry>snd-via82xx</entry> | |
185 <entry></entry> | |
186 <entry></entry> | |
187 <entry>4-48 kHz or 48 kHz only, depending on the chipset</entry> | |
188 <entry></entry> | |
189 <entry></entry> | |
190 </row> | |
191 | |
192 <row> | |
193 <entry>Aureal Vortex 2</entry> | |
194 <entry>none</entry> | |
195 <entry>none</entry> | |
196 <entry>OK</entry> | |
197 <entry> | |
13977 | 198 <ulink url="http://aureal.sf.net">Linux Aureal Drivers</ulink> |
9675 | 199 <ulink url="http://makacs.poliod.hu/~pontscho/aureal/au88xx-1.1.3.tar.bz2">buffer size increased to 32k</ulink> |
200 </entry> | |
201 <entry>48</entry> | |
202 <entry>4.1</entry> | |
203 <entry>5+</entry> | |
204 </row> | |
205 | |
206 <row> | |
207 <entry>SB Live!</entry> | |
12369 | 208 <entry>Analog OK, S/PDIF not working</entry> |
9675 | 209 <entry>Both OK</entry> |
210 <entry>Both OK</entry> | |
211 <entry> | |
12369 | 212 <ulink url="http://opensource.creative.com">Creative's OSS driver (S/PDIF support)</ulink> |
9675 | 213 </entry> |
214 <entry>192</entry> | |
215 <entry>4.0/5.1</entry> | |
216 <entry>32</entry> | |
217 </row> | |
218 | |
219 <row> | |
220 <entry>SB 128 PCI (es1371)</entry> | |
221 <entry>OK</entry> | |
222 <entry>?</entry> | |
223 <entry></entry> | |
224 <entry></entry> | |
225 <entry>48</entry> | |
226 <entry>stereo</entry> | |
227 <entry>2</entry> | |
228 </row> | |
229 | |
230 <row> | |
231 <entry>SB AWE 64</entry> | |
232 <entry>max 44kHz</entry> | |
233 <entry>48kHz sounds bad</entry> | |
234 <entry></entry> | |
235 <entry></entry> | |
236 <entry>48</entry> | |
237 <entry></entry> | |
238 <entry></entry> | |
239 </row> | |
240 | |
241 <row> | |
242 <entry>GUS PnP</entry> | |
243 <entry>none</entry> | |
244 <entry>OK</entry> | |
245 <entry>OK</entry> | |
246 <entry></entry> | |
247 <entry>48</entry> | |
248 <entry></entry> | |
249 <entry></entry> | |
250 </row> | |
251 | |
252 <row> | |
253 <entry>Gravis UltraSound ACE</entry> | |
254 <entry></entry> | |
255 <entry></entry> | |
256 <entry></entry> | |
257 <entry></entry> | |
258 <entry></entry> | |
259 <entry></entry> | |
260 <entry></entry> | |
261 </row> | |
262 | |
263 <row> | |
264 <entry>Gravis UltraSound MAX</entry> | |
265 <entry>OK</entry> | |
266 <entry>OK (?)</entry> | |
267 <entry></entry> | |
268 <entry></entry> | |
269 <entry>48</entry> | |
270 <entry></entry> | |
271 <entry></entry> | |
272 </row> | |
273 | |
274 <row> | |
275 <entry>ESS 688</entry> | |
276 <entry>OK</entry> | |
277 <entry>OK (?)</entry> | |
278 <entry></entry> | |
279 <entry></entry> | |
280 <entry>48</entry> | |
281 <entry></entry> | |
282 <entry></entry> | |
283 </row> | |
284 | |
285 <row> | |
11003
6111db8a76b5
CMIPCI information update by ismail.donmez@boun.edu.tr
diego
parents:
10913
diff
changeset
|
286 <entry>C-Media cards (CMI8338/8738)</entry> |
9675 | 287 <entry>OK</entry> |
12369 | 288 <entry>OK S/PDIF is supported with ALSA 0.9.x</entry> |
9675 | 289 <entry>?</entry> |
290 <entry></entry> | |
11003
6111db8a76b5
CMIPCI information update by ismail.donmez@boun.edu.tr
diego
parents:
10913
diff
changeset
|
291 <entry>44</entry> |
6111db8a76b5
CMIPCI information update by ismail.donmez@boun.edu.tr
diego
parents:
10913
diff
changeset
|
292 <entry>stereo</entry> |
6111db8a76b5
CMIPCI information update by ismail.donmez@boun.edu.tr
diego
parents:
10913
diff
changeset
|
293 <entry>1</entry> |
9675 | 294 </row> |
295 | |
296 <row> | |
297 <entry>Yamaha cards (*ymf*)</entry> | |
298 <entry>not OK (?) (maybe <option>-ao sdl</option>)</entry> | |
299 <entry>OK only with ALSA 0.5 with OSS emulation | |
300 <emphasis role="bold">AND</emphasis> <option>-ao sdl</option> (!) (?)</entry> | |
301 <entry></entry> | |
302 <entry></entry> | |
303 <entry></entry> | |
304 <entry></entry> | |
305 <entry></entry> | |
306 </row> | |
307 | |
308 <row> | |
309 <entry>Cards with envy24 chips (like Terratec EWS88MT)</entry> | |
310 <entry>?</entry> | |
311 <entry>?</entry> | |
312 <entry>OK</entry> | |
313 <entry></entry> | |
314 <entry>?</entry> | |
315 <entry></entry> | |
316 <entry></entry> | |
317 </row> | |
318 | |
319 <row> | |
320 <entry>PC Speaker or DAC</entry> | |
321 <entry>OK</entry> | |
322 <entry>none</entry> | |
323 <entry></entry> | |
324 <entry> | |
325 <ulink url="http://www.geocities.com/stssppnn/pcsp.html">Linux PC speaker OSS driver</ulink> | |
326 </entry> | |
327 <entry>The driver emulates 44.1, maybe more.</entry> | |
328 <entry>mono</entry> | |
329 <entry>1</entry> | |
330 </row> | |
331 | |
332 </tbody> | |
333 </tgroup> | |
334 </informaltable> | |
335 | |
336 <para> | |
337 Feedback to this document is welcome. Please tell us how | |
338 <application>MPlayer</application> and your sound card(s) worked together. | |
339 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
340 </sect2> |
9675 | 341 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
342 <sect2 id="af"> |
9675 | 343 <title>Audio filters</title> |
344 <para> | |
345 The old audio plugins have been superseded by a new audio filter layer. Audio | |
346 filters are used for changing the properties of the audio data before the | |
347 sound reaches the sound card. The activation and deactivation of the filters | |
348 is normally automated but can be overridden. The filters are activated when | |
349 the properties of the audio data differ from those required by the sound card | |
350 and deactivated if unnecessary. The <option>-af filter1,filter2,...</option> | |
351 option is used to override the automatic activation of filters or to insert | |
352 filters that are not automatically inserted. The filters will be executed as | |
353 they appear in the comma separated list. | |
354 </para> | |
355 | |
356 <para> | |
357 Example: | |
11713 | 358 <screen>mplayer -af resample,pan <replaceable>movie.avi</replaceable></screen> |
9675 | 359 would run the sound through the resampling filter followed by the pan filter. |
360 Observe that the list must not contain any spaces, else it will fail. | |
361 </para> | |
362 | |
363 <para> | |
364 The filters often have options that change their behavior. These options | |
365 are explained in detail in the sections below. A filter will execute using | |
366 default settings if its options are omitted. Here is an example of how to use | |
367 filters in combination with filter specific options: | |
11713 | 368 <screen>mplayer -af resample=11025,pan=1:0.5:0.5 -channels 1 -srate 11025 <replaceable>media.avi</replaceable></screen> |
9675 | 369 would set the output frequency of the resample filter to 11025Hz and downmix |
370 the audio to 1 channel using the pan filter. | |
371 </para> | |
372 | |
373 | |
374 <para> | |
375 The overall execution of the filter layer is controlled using the | |
376 <option>-af-adv</option> option. This option has two suboptions: | |
377 </para> | |
378 | |
379 <para> | |
380 <option>force</option> is a bit field that controls how the filters | |
381 are inserted and what speed/accuracy optimizations they use: | |
382 </para> | |
383 | |
384 <variablelist> | |
385 <varlistentry> | |
386 <term><option>0</option></term> | |
387 <listitem><para> | |
388 Use automatic insertion of filters and optimize according to CPU speed. | |
389 </para></listitem> | |
390 </varlistentry> | |
391 | |
392 <varlistentry> | |
393 <term><option>1</option></term> | |
394 <listitem><para> | |
395 Use automatic insertion of filters and optimize for the highest speed. | |
396 <emphasis>Warning:</emphasis> Some features in the audio filters may | |
397 silently fail, and the sound quality may drop. | |
398 </para></listitem> | |
399 </varlistentry> | |
400 | |
401 <varlistentry> | |
402 <term><option>2</option></term> | |
403 <listitem><para> | |
404 Use automatic insertion of filters and optimize for quality. | |
405 </para></listitem> | |
406 </varlistentry> | |
407 | |
408 <varlistentry> | |
409 <term><option>3</option></term> | |
410 <listitem><para> | |
411 Use no automatic insertion of filters and no optimization. | |
11540 | 412 <emphasis>Warning:</emphasis> It may be possible to crash <application>MPlayer</application> |
9675 | 413 using this setting. |
414 </para></listitem> | |
415 </varlistentry> | |
416 | |
417 <varlistentry> | |
418 <term><option>4</option></term> | |
419 <listitem><para> | |
420 Use automatic insertion of filters according to 0 above, | |
421 but use floating point processing when possible. | |
422 </para></listitem> | |
423 </varlistentry> | |
424 | |
425 <varlistentry> | |
426 <term><option>5</option></term> | |
427 <listitem><para> | |
428 Use automatic insertion of filters according to 1 above, | |
429 but use floating point processing when possible. | |
430 </para></listitem> | |
431 </varlistentry> | |
432 | |
433 <varlistentry> | |
434 <term><option>6</option></term> | |
435 <listitem><para> | |
436 Use automatic insertion of filters according to 2 above, | |
437 but use floating point processing when possible. | |
438 </para></listitem> | |
439 </varlistentry> | |
440 | |
441 <varlistentry> | |
442 <term><option>7</option></term> | |
443 <listitem><para> | |
444 Use no automatic insertion of filters according to 3 above, | |
445 and use floating point processing when possible. | |
446 </para></listitem> | |
447 </varlistentry> | |
448 </variablelist> | |
449 | |
450 <para> | |
451 <option>list</option> is an alias for the -af option. | |
452 </para> | |
453 | |
454 <para> | |
455 The filter layer is also affected by the following generic options: | |
456 </para> | |
457 | |
458 <variablelist> | |
459 <varlistentry> | |
460 <term><option>-v</option></term> | |
461 <listitem><para> | |
462 Increases the verbosity level and makes most filters print out extra | |
463 status messages. | |
464 </para></listitem> | |
465 </varlistentry> | |
466 | |
467 <varlistentry> | |
468 <term><option>-channels</option></term> | |
469 <listitem><para> | |
470 This option sets the number of output channels you would like your | |
471 sound card to use. It also affects the number of channels that are | |
472 being decoded from the media. If the media contains less channels | |
473 than requested the channels filter (see below) will automatically | |
474 be inserted. The routing will be the default routing for the channels | |
475 filter. | |
476 </para></listitem> | |
477 </varlistentry> | |
478 | |
479 <varlistentry> | |
480 <term><option>-srate</option></term> | |
481 <listitem><para> | |
482 This option selects the sample rate you would like your sound card | |
483 to use (of course the cards have limits on this). If the sample frequency | |
484 of your sound card is different from that of the current media, the resample | |
485 filter (see below) will be inserted into the audio filter layer to compensate | |
486 for the difference. | |
487 </para></listitem> | |
488 </varlistentry> | |
489 <varlistentry> | |
490 <term><option>-format</option></term> | |
491 <listitem><para> | |
492 This option sets the sample format between the audio filter layer and the | |
493 sound card. If the requested sample format of your sound card is different | |
494 from that of the current media, a format filter (see below) will be inserted | |
495 to rectify the difference. | |
496 </para></listitem> | |
497 </varlistentry> | |
498 </variablelist> | |
499 | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
500 <sect3 id="af_resample"> |
9675 | 501 <title>Up/Downsampling</title> |
502 | |
503 <para> | |
11540 | 504 <application>MPlayer</application> fully supports sound up/down-sampling through the |
11096
15a086bd3dae
All filter names in audio.xml are inside <option> tags. All except
diego
parents:
11003
diff
changeset
|
505 <option>resample</option> filter. It can be used if you |
9675 | 506 have a fixed frequency sound card or if you are stuck with an old sound card |
507 that is only capable of max 44.1kHz. This filter is automatically enabled if | |
508 it is necessary, but it can also be explicitly enabled on the command line. It | |
509 has three options: | |
510 </para> | |
511 | |
512 <variablelist> | |
513 <varlistentry> | |
514 <term><option>srate <8000-192000></option></term> | |
515 <listitem><para> | |
516 is an integer used for setting the output sample | |
517 frequency in Hz. The valid range for this parameter is 8kHz to 192kHz. If | |
518 the input and output sample frequency are the same or if this parameter is | |
519 omitted the filter is automatically unloaded. A high sample frequency | |
520 normally improves the audio quality, especially when used in combination | |
521 with other filters. | |
522 </para></listitem> | |
523 </varlistentry> | |
524 | |
525 <varlistentry> | |
526 <term><option>sloppy</option></term> | |
527 <listitem><para> | |
528 is an optional binary parameter that allows the output frequency to differ | |
529 slightly from the frequency given by <option>srate</option>. This option | |
530 can be used if the startup of the playback is extremely slow. It is enabled | |
531 by default. | |
532 </para></listitem> | |
533 </varlistentry> | |
534 | |
535 <varlistentry> | |
536 <term><option>type <0-2></option></term> | |
537 <listitem><para> | |
538 is an optional integer between <literal>0</literal> and <literal>2</literal> that | |
539 selects which resampling method to use. Here <literal>0</literal> represents | |
540 linear interpolation as resampling method, <literal>1</literal> represents | |
541 resampling using a poly-phase filter-bank and integer processing and | |
542 <literal>2</literal> represents resampling using a poly-phase filter-bank and | |
543 floating point processing. Linear interpolation is extremely fast, but | |
544 suffers from poor sound quality especially when used for up-sampling. The | |
545 best quality is given by <literal>2</literal> but this method also suffers from | |
546 the highest CPU load. | |
547 </para></listitem> | |
548 </varlistentry> | |
549 </variablelist> | |
550 | |
551 <para>Example: | |
552 <screen>mplayer -af resample=44100:0:0</screen> | |
553 would set the output frequency of the resample filter to 44100Hz using exact output | |
554 frequency scaling and linear interpolation. | |
555 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
556 </sect3> |
9675 | 557 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
558 <sect3 id="af_channels"> |
9675 | 559 <title>Changing the number of channels</title> |
560 <para> | |
561 The <option>channels</option> filter can be used for adding and removing | |
562 channels, it can also be used for routing or copying channels. It is | |
563 automatically enabled when the output from the audio filter layer differs from | |
564 the input layer or when it is requested by another filter. This filter unloads | |
565 itself if not needed. The number of options is dynamic: | |
566 </para> | |
567 | |
568 <variablelist> | |
569 <varlistentry> | |
570 <term><option>nch <1-6></option></term> | |
571 <listitem><para> | |
572 is an integer between <literal>1</literal> and <literal>6</literal> that is used | |
573 for setting the number of output channels. This option is required, leaving it | |
574 empty results in a runtime error. | |
575 </para></listitem> | |
576 </varlistentry> | |
577 | |
578 <varlistentry> | |
579 <term><option>nr <1-6></option></term> | |
580 <listitem><para> | |
581 is an integer between <literal>1</literal> and <literal>6</literal> that is used | |
582 for specifying the number of routes. This parameter is optional. If it is | |
583 omitted the default routing is used. | |
584 </para></listitem> | |
585 </varlistentry> | |
586 | |
587 <varlistentry> | |
588 <term><option>from1:to1:from2:to2:from3:to3...</option></term> | |
589 <listitem><para> | |
590 are pairs of numbers between <literal>0</literal> and <literal>5</literal> | |
591 that define where each channel should be routed. | |
592 </para></listitem> | |
593 </varlistentry> | |
594 </variablelist> | |
595 | |
596 <para> | |
597 If only <option>nch</option> is given the default routing is used, it works | |
598 as follows: If the number of output channels is bigger than the number of input | |
599 channels empty channels are inserted (except mixing from mono to stereo, then | |
600 the mono channel is repeated in both of the output channels). If the number of | |
601 output channels is smaller than the number of input channels the exceeding | |
602 channels are truncated. | |
603 </para> | |
604 | |
605 <para> | |
606 Example 1: | |
11713 | 607 <screen>mplayer -af channels=4:4:0:1:1:0:2:2:3:3 <replaceable>media.avi</replaceable></screen> |
9675 | 608 would change the number of channels to 4 and set up 4 routes that swap |
609 channel 0 and channel 1 and leave channel 2 and 3 intact. Observe that | |
610 if media containing two channels was played back, channels 2 and 3 would | |
611 contain silence but 0 and 1 would still be swapped. | |
612 </para> | |
613 | |
614 <para> | |
10111 | 615 Example 2: |
11713 | 616 <screen>mplayer -af channels=6:4:0:0:0:1:0:2:0:3 <replaceable>media.avi</replaceable></screen> |
9675 | 617 would change the number of channels to 6 and set up 4 routes that copy |
618 channel 0 to channels 0 to 3. Channel 4 and 5 will contain silence. | |
619 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
620 </sect3> |
9675 | 621 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
622 <sect3 id="af_format"> |
9675 | 623 <title>Sample format converter</title> |
624 <para> | |
625 The <option>format</option> filter converts between different sample formats. It | |
626 is automatically enabled when needed by the sound card or another filter. | |
627 </para> | |
628 | |
629 <variablelist> | |
630 <varlistentry> | |
631 <term><option>bps <number></option></term> | |
632 <listitem><para> | |
633 can be <literal>1</literal>, <literal>2</literal> or <literal>4</literal> and | |
634 denotes the number of bytes per sample. This option is required, leaving it empty | |
635 results in a runtime error. | |
636 </para></listitem> | |
637 </varlistentry> | |
638 | |
639 <varlistentry> | |
640 <term><option>f <format></option></term> | |
641 <listitem><para> | |
642 is a text string describing the sample format. The string is a | |
643 concatenated mix of: <option>alaw</option>, <option>mulaw</option> or | |
644 <option>imaadpcm</option>, <option>float</option> or <option>int</option>, | |
645 <option>unsigned</option> or <option>signed</option>, <option>le</option> or | |
13047 | 646 <option>be</option> (little- or big-endian). This option is required, |
9675 | 647 leaving it empty results in a runtime error. |
648 </para></listitem> | |
649 </varlistentry> | |
650 </variablelist> | |
651 | |
652 <para> | |
653 Example: | |
11713 | 654 <screen>mplayer -af format=4:float <replaceable>media.avi</replaceable></screen> |
9675 | 655 would set the output format to 4 bytes per sample floating point data. |
656 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
657 </sect3> |
9675 | 658 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
659 <sect3 id="af_delay"> |
9675 | 660 <title>Delay</title> |
661 <para> | |
10111 | 662 The <option>delay</option> filter delays the sound to the loudspeakers such that |
9675 | 663 the sound from the different channels arrives at the listening position |
664 simultaneously. | |
665 It is only useful if you have more than 2 loudspeakers. This filter has a | |
666 variable number of parameters: | |
667 </para> | |
668 | |
669 <variablelist> | |
670 <varlistentry> | |
671 <term><option>d1:d2:d3...</option></term> | |
672 <listitem><para> | |
673 are floating point numbers representing the delays in ms that should be | |
674 imposed on the different channels. The minimum delay is 0ms and the maximum | |
675 is 1000ms. | |
676 </para></listitem> | |
677 </varlistentry> | |
678 </variablelist> | |
679 | |
680 <para> | |
681 To calculate the required delay for the different channels do as follows: | |
682 </para> | |
683 | |
684 <orderedlist> | |
685 <listitem><para> | |
686 Measure the distance to the loudspeakers in meters in relation to your | |
687 listening position, giving you the distances s1 to s5 (for a 5.1 system). | |
688 There is no point in compensating for the sub-woofer (you will not hear the | |
689 difference anyway). | |
690 </para></listitem> | |
691 <listitem><para> | |
692 Subtract the distances s1 to s5 from the maximum distance i.e. | |
693 s[i] = max(s) - s[i]; i = 1...5 | |
694 </para></listitem> | |
695 <listitem><para> | |
11106
e9cbf3249f04
Stray duplicated line spotted by Torinthiel plus a typo.
diego
parents:
11096
diff
changeset
|
696 Calculate the required delays in ms as |
9675 | 697 d[i] = 1000*s[i]/342; i = 1...5 |
698 </para></listitem> | |
699 </orderedlist> | |
700 | |
701 <para> | |
702 Example: | |
11713 | 703 <screen>mplayer -af delay=10.5:10.5:0:0:7:0 <replaceable>media.avi</replaceable></screen> |
9675 | 704 would delay front left and right by 10.5ms, the two rear channels and the sub |
705 by 0ms and the center channel by 7ms. | |
706 </para> | |
707 | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
708 </sect3> |
9675 | 709 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
710 <sect3 id="af_volume"> |
9675 | 711 <title>Software volume control</title> |
712 <para>Software volume control is implemented by the <option>volume</option> | |
713 audio filter. Use this filter with caution since it can reduce the signal to | |
714 noise ratio of the sound. In most cases it is best to set the level for the | |
715 PCM sound to max, leave this filter out and control the output level to your | |
716 speakers with the master volume control of the mixer. In case your sound card | |
717 has a digital PCM mixer instead of an analog one, and you hear distortion, | |
718 use the MASTER mixer instead. If there is an external amplifier connected to | |
719 the computer (this is almost always the case), the noise level can be minimized | |
720 by adjusting the master level and the volume knob on the amplifier until the | |
721 hissing noise in the background is gone. This filter has two options: | |
722 </para> | |
723 | |
724 <variablelist> | |
725 <varlistentry> | |
726 <term><option>v <-200 - +60></option></term> | |
727 <listitem><para> | |
728 is a floating point number between <literal>-200</literal> and <literal>+60</literal> | |
729 which represents the volume level in dB. The default level is 0dB. | |
730 </para></listitem> | |
731 </varlistentry> | |
732 | |
733 <varlistentry> | |
734 <term><option>c</option></term> | |
735 <listitem><para> | |
736 is a binary control that turns soft clipping on and off. Soft-clipping can | |
737 make the sound more smooth if very high volume levels are used. Enable this | |
738 option if the dynamic range of the loudspeakers is very low. Be aware that | |
739 this feature creates distortion and should be considered a last resort. | |
740 </para></listitem> | |
741 </varlistentry> | |
742 </variablelist> | |
743 | |
744 <para> | |
745 Example: | |
11713 | 746 <screen>mplayer -af volume=10.1:0 <replaceable>media.avi</replaceable></screen> |
9675 | 747 would amplify the sound by 10.1dB and hard-clip if the sound level is too high. |
748 </para> | |
749 | |
750 <para> | |
751 This filter has a second feature: It measures the overall maximum sound level | |
11540 | 752 and prints out that level when <application>MPlayer</application> exits. |
753 This volume estimate can be used for setting the sound level in | |
754 <application>MEncoder</application> such that the maximum dynamic range is utilized. | |
9675 | 755 </para> |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
756 </sect3> |
9675 | 757 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
758 <sect3 id="af_equalizer"> |
9675 | 759 <title>Equalizer</title> |
760 <para> | |
761 The <option>equalizer</option> filter represents a 10 octave band graphic | |
762 equalizer, implemented using 10 IIR band pass filters. This means that | |
763 it works regardless of what type of audio is being played back. The center | |
764 frequencies for the 10 bands are: | |
765 </para> | |
766 | |
767 <informaltable> | |
768 <tgroup cols="2"> | |
769 <thead> | |
770 <row> | |
771 <entry>Band No.</entry><entry>Center frequency</entry> | |
772 </row> | |
773 </thead> | |
774 <tbody> | |
775 <row><entry>0</entry><entry>31.25 Hz</entry></row> | |
776 <row><entry>1</entry><entry>62.50 Hz</entry></row> | |
777 <row><entry>2</entry><entry>125.0 Hz</entry></row> | |
778 <row><entry>3</entry><entry>250.0 Hz</entry></row> | |
779 <row><entry>4</entry><entry>500.0 Hz</entry></row> | |
780 <row><entry>5</entry><entry>1.000 kHz</entry></row> | |
781 <row><entry>6</entry><entry>2.000 kHz</entry></row> | |
782 <row><entry>7</entry><entry>4.000 kHz</entry></row> | |
783 <row><entry>8</entry><entry>8.000 kHz</entry></row> | |
784 <row><entry>9</entry><entry>16.00 kHz</entry></row> | |
785 </tbody> | |
786 </tgroup> | |
787 </informaltable> | |
788 | |
789 <para> | |
790 If the sample rate of the sound being played back is lower than the center | |
791 frequency for a frequency band, then that band will be disabled. A known | |
792 bug with this filter is that the characteristics for the uppermost band | |
793 are not completely symmetric if the sample rate is close to the center | |
794 frequency of that band. This problem can be worked around by up-sampling | |
795 the sound using the resample filter before it reaches this filter. | |
796 </para> | |
797 | |
798 <para> | |
799 This filter has 10 parameters: | |
800 </para> | |
801 | |
802 <variablelist> | |
803 <varlistentry> | |
804 <term><option>g1:g2:g3...g10</option></term> | |
805 <listitem><para> | |
806 are floating point numbers between <literal>-12</literal> and <literal>+12</literal> | |
807 representing the gain in dB for each frequency band. | |
808 </para></listitem> | |
809 </varlistentry> | |
810 </variablelist> | |
811 | |
812 <para> | |
813 Example: | |
11713 | 814 <screen>mplayer -af equalizer=11:11:10:5:0:-12:0:5:12:12 <replaceable>media.avi</replaceable></screen> |
9675 | 815 would amplify the sound in the upper and lower frequency region while |
816 canceling it almost completely around 1kHz. | |
817 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
818 </sect3> |
9675 | 819 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
820 <sect3 id="af_panning"> |
9675 | 821 <title>Panning filter</title> |
822 <para> | |
823 Use the <option>pan</option> filter to mix channels arbitrarily. It is | |
824 basically a combination of the volume control and the channels filter. | |
825 There are two major uses for this filter: | |
826 </para> | |
827 | |
828 <orderedlist> | |
829 <listitem><para> | |
830 Down-mixing many channels to only a few, stereo to mono for example. | |
831 </para></listitem> | |
832 <listitem><para> | |
833 Varying the "width" of the center speaker in a surround sound system. | |
834 </para></listitem> | |
835 </orderedlist> | |
836 | |
837 <para> | |
838 This filter is hard to use, and will require some tinkering before the | |
839 desired result is obtained. The number of options for this filter | |
840 depends on the number of output channels: | |
841 </para> | |
842 | |
843 <variablelist> | |
844 <varlistentry> | |
845 <term><option>nch <1-6></option></term> | |
846 <listitem><para> | |
847 is an integer between <literal>1</literal> and <literal>6</literal> and is used | |
13264
f9985b9f4436
pan filter needs number of _input_ channels, ported from the man page.
diego
parents:
13047
diff
changeset
|
848 for setting the number of input channels. This option is required, leaving it |
9675 | 849 empty results in a runtime error. |
850 </para></listitem> | |
851 </varlistentry> | |
852 | |
853 <varlistentry> | |
854 <term><option>l00:l01:l02:..l10:l11:l12:...ln0:ln1:ln2:...</option></term> | |
855 <listitem><para> | |
856 are floating point values between <literal>0</literal> and <literal>1</literal>. | |
857 <option>l[i][j]</option> determines how much of input channel j is mixed into | |
858 output channel i. | |
859 </para></listitem> | |
860 </varlistentry> | |
861 </variablelist> | |
862 | |
863 <para> | |
864 Example 1: | |
11713 | 865 <screen>mplayer -af pan=1:0.5:0.5 -channels 1 <replaceable>media.avi</replaceable></screen> |
9675 | 866 would down-mix from stereo to mono. |
867 </para> | |
868 | |
869 <para> | |
870 Example 2: | |
11713 | 871 <screen>mplayer -af pan=3:1:0:1:0.5:0.5 -channels 3 <replaceable>media.avi</replaceable></screen> |
9675 | 872 would give 3 channel output leaving channels 0 and 1 intact, and mix |
873 channels 0 and 1 into output channel 2 (which could be sent to a | |
874 sub-woofer for example). | |
875 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
876 </sect3> |
9675 | 877 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
878 <sect3 id="af_sub"> |
9675 | 879 <title>Sub-woofer</title> |
880 <para> | |
10111 | 881 The <option>sub</option> filter adds a sub woofer channel to the audio |
9675 | 882 stream. The audio data used for creating the sub-woofer channel is an |
883 average of the sound in channel 0 and channel 1. The resulting sound is | |
884 then low-pass filtered by a 4th order Butterworth filter with a default | |
885 cutoff frequency of 60Hz and added to a separate channel in the audio | |
886 stream. Warning: Disable this filter when you are playing DVDs with Dolby | |
887 Digital 5.1 sound, otherwise this filter will disrupt the sound to the | |
888 sub-woofer. This filter has two parameters: | |
889 </para> | |
890 | |
891 <variablelist> | |
892 <varlistentry> | |
893 <term><option>fc <20-300></option></term> | |
894 <listitem><para> | |
895 is an optional floating point number used for setting the cutoff frequency | |
896 for the filter in Hz. The valid range is 20Hz to 300Hz. For the best result | |
897 try setting the cutoff frequency as low as possible. This will improve the | |
898 stereo or surround sound experience. The default cutoff frequency is 60Hz. | |
899 </para></listitem> | |
900 </varlistentry> | |
901 | |
902 <varlistentry> | |
903 <term><option>ch <0-5></option></term> | |
904 <listitem><para> | |
905 is an optional integer between <literal>0</literal> and <literal>5</literal> | |
906 which determines the channel number in which to insert the sub-channel audio. | |
907 The default is channel number <literal>5</literal>. Observe that the number of | |
908 channels will automatically be increased to <replaceable>ch</replaceable> if | |
909 necessary. | |
910 </para></listitem> | |
911 </varlistentry> | |
912 </variablelist> | |
913 | |
914 <para> | |
915 Example: | |
11713 | 916 <screen>mplayer -af sub=100:4 -channels 5 <replaceable>media.avi</replaceable></screen> |
9675 | 917 would add a sub-woofer channel with a cutoff frequency of |
918 100Hz to output channel 4. | |
919 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
920 </sect3> |
9675 | 921 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
922 <sect3 id="af_surround"> |
9675 | 923 <title>Surround-sound decoder</title> |
924 <para> | |
925 Matrix encoded surround sound can be decoded by the <option>surround</option> | |
926 filter. Dolby Surround is an example of a matrix encoded format. Many files | |
927 with 2 channel audio actually contain matrixed surround sound. To use this | |
928 feature you need a sound card supporting at least 4 channels. This filter has | |
929 one parameter: | |
930 </para> | |
931 | |
932 <variablelist> | |
933 <varlistentry> | |
934 <term><option>d <0-1000></option></term> | |
935 <listitem><para> | |
936 is an optional floating point number between <literal>0</literal> and | |
937 <literal>1000</literal> used for setting the delay time in ms for the | |
938 rear speakers. This delay should be set as follows: if d1 is the distance | |
939 from the listening position to the front speakers and d2 is the distance | |
940 from the listening position to the rear speakers, then the delay d should | |
941 be set to 15ms if d1 <= d2 and to 15 + 5*(d1-d2) if d1 > d2. The default | |
942 value for d is 20ms. | |
943 </para></listitem> | |
944 </varlistentry> | |
945 </variablelist> | |
946 | |
947 <para> | |
948 Example: | |
11713 | 949 <screen>mplayer -af surround=15 -channels 4 <replaceable>media.avi</replaceable></screen> |
9675 | 950 would add surround sound decoding with 15ms delay for the sound to the |
951 rear speakers. | |
952 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
953 </sect3> |
11366
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
954 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
955 <sect3 id="af_export"> |
11366
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
956 <title>Audio Exporter</title> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
957 <para> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
958 This audio filter exports the incoming signal to other processes using memory |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
959 mapping (<literal>mmap()</literal>). Memory mapped areas contain a header: |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
960 |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
961 <programlisting> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
962 int nch /*number of channels*/ |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
963 int size /*buffer size*/ |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
964 unsigned long long counter /*Used to keep sync, it's updated |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
965 every time new data is exported.*/ |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
966 </programlisting> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
967 |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
968 The rest is payload (non-interleaved) 16bit data. |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
969 </para> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
970 |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
971 <variablelist> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
972 <varlistentry> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
973 <term><option>mmapped_file</option></term> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
974 <listitem><para> |
12815 | 975 The file you want this filter to export to. The default is to map to |
11366
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
976 <filename>~/.mplayer/mplayer-af_export</filename>. |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
977 </para></listitem> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
978 </varlistentry> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
979 |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
980 <varlistentry> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
981 <term><option>nsamples</option></term> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
982 <listitem><para> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
983 Number of samples per channel. The default is <literal>512</literal> samples. |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
984 </para></listitem> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
985 </varlistentry> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
986 </variablelist> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
987 |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
988 <para> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
989 Example: |
11713 | 990 <screen>mplayer -af export=/tmp/mplayer-af_export:1024 <replaceable>media.avi</replaceable></screen> |
11366
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
991 would export 1024 samples per channel to <filename>/tmp/mplayer-af_export</filename>. |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
992 </para> |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
993 </sect3> |
11366
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
994 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
995 <sect3 id="af_extrastereo"> |
13590 | 996 <title>Extrastereo</title> |
997 | |
998 <para> | |
999 This audio filter (linearly) increases the difference between left and | |
1000 right channels (like the <application>XMMS</application> extrastereo | |
1001 plugin) which adds some sort of "live" effect to playback. | |
1002 This filter has one parameter:</para> | |
1003 | |
1004 <variablelist> | |
1005 <varlistentry> | |
1006 <term><option>mul</option></term> | |
1007 <listitem><para> | |
1008 is the difference coefficient, an optional floating point number that defaults | |
1009 to <literal>2.5</literal>. If you set it to <literal>0.0</literal>, you will | |
1010 have mono sound (average of both channels). If you set it to | |
1011 <literal>1.0</literal>, sound will be unchanged, if you set it to | |
1012 <literal>-1.0</literal>, left and right channels will be swapped. | |
1013 </para></listitem> | |
1014 </varlistentry> | |
1015 </variablelist> | |
1016 | |
1017 <para> | |
1018 Usage: | |
1019 <screen> | |
1020 mplayer -af extrastereo <replaceable>media.avi</replaceable> | |
1021 mplayer -af extrastereo=3.45 <replaceable>media.avi</replaceable><!-- | |
1022 --></screen> | |
1023 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1024 </sect3> |
13590 | 1025 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1026 <sect3 id="af_volnorm"> |
13590 | 1027 <title>Volume normalizer</title> |
1028 | |
1029 <para> | |
1030 This audio filter maximizes the volume without distorting the sound. | |
1031 </para> | |
1032 | |
1033 <para> | |
1034 Usage: | |
1035 <screen>mplayer -af volnorm <replaceable>media.avi</replaceable></screen> | |
1036 </para> | |
9675 | 1037 </sect3> |
1038 | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1039 </sect2> |
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1040 |
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1041 <sect2 id="audio-plugins"> |
9675 | 1042 <title>Audio plugins (deprecated)</title> |
1043 <note><para><emphasis role="bold">Audio plugins have been deprecated by audio filters and will | |
1044 be removed soon.</emphasis></para></note> | |
1045 | |
1046 <para> | |
1047 <application>MPlayer</application> has support for audio plugins. Audio | |
1048 plugins can be used for changing the properties of the audio data before | |
1049 the sound reaches the sound card. They are enabled using the | |
1050 <option>-aop</option> switch which takes a | |
1051 <option>list=plugin1,plugin2,...</option> argument. The | |
1052 <option>list</option> argument is required and determines which plugins | |
1053 should be used and in which order they should be executed. Example: | |
1054 | |
11713 | 1055 <screen>mplayer <replaceable>media.avi</replaceable> -aop list=resample,format</screen> |
9675 | 1056 |
1057 would run the sound through the resampling plugin followed by the format | |
1058 plugin. | |
1059 </para> | |
1060 | |
1061 <para> | |
1062 The plugins can also have switches that change their behavior. These | |
1063 switches are explained in detail in the sections below. A plugin will | |
1064 execute using default settings if its switches are omitted. Here is an | |
1065 example of how to use plugins in combination with plugin specific switches: | |
1066 | |
11713 | 1067 <screen>mplayer <replaceable>media.avi</replaceable> -aop list=resample,format:fout=44100:format=0x8</screen> |
9675 | 1068 |
1069 would set the output frequency of the resample plugin to 44100 Hz and the | |
1070 output format of the format plugin to AFMT_U8. | |
1071 </para> | |
1072 | |
1073 <para> | |
1074 Currently audio plugins can not be used in | |
1075 <application>MEncoder</application>. | |
1076 </para> | |
1077 | |
1078 | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1079 <sect3 id="updn-sampling"> |
9675 | 1080 <title>Up/Downsampling</title> |
1081 | |
1082 <para> | |
1083 <application>MPlayer</application> fully supports up/downsampling of the sound. This plugin can be | |
1084 used if you have a fixed frequency sound card or if you are stuck with an | |
1085 old sound card that is only capable of max 44.1 kHz. Limitations in your | |
1086 hardware are not auto detected, so you have to specify the sample frequency | |
1087 explicitly. This plugin has one switch: <option>fout</option> which is used for setting the | |
1088 desired output sample frequency. It defaults to 48 kHz, and is given in | |
1089 Hz. | |
1090 </para> | |
1091 | |
1092 <para> | |
1093 Usage: | |
1094 | |
1095 <screen> | |
1096 mplayer <replaceable>media.avi</replaceable> -aop list=resample:fout=<replaceable>freq</replaceable></screen> | |
1097 | |
1098 where <literal><replaceable>freq</replaceable></literal> is the frequency | |
1099 in Hz, like <literal>44100</literal>. | |
1100 </para> | |
1101 | |
1102 <note> | |
1103 <para> | |
1104 The output frequency should not be scaled up from the default value. | |
1105 Scaling up will cause the audio and video streams to be played in slow | |
1106 motion in addition to audio distortion. | |
1107 </para> | |
1108 </note> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1109 </sect3> |
9675 | 1110 |
1111 | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1112 <sect3 id="surround-decode"> |
9675 | 1113 <title>Surround Sound decoding</title> |
1114 | |
1115 <para> | |
1116 <application>MPlayer</application> has an audio plugin that can decode | |
1117 matrix encoded surround sound. Dolby Surround is an example of a matrix | |
1118 encoded format. Many files with 2 channel audio actually contain matrixed | |
1119 surround sound. To use this feature you need a sound card supporting at | |
1120 least 4 channels. | |
1121 </para> | |
1122 | |
1123 <para> | |
1124 Usage: | |
1125 <screen>mplayer <replaceable>media.avi</replaceable> -aop list=surround</screen> | |
1126 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1127 </sect3> |
9675 | 1128 |
1129 | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1130 <sect3 id="sample-format-conv"> |
9675 | 1131 <title>Sample format converter</title> |
1132 | |
1133 <para> | |
1134 If your sound card driver does not support signed 16-bit int data type, | |
1135 this plugin can be used to change the format to one which your sound card | |
1136 can understand. It has one switch, <option>format</option>, which can be | |
1137 set to one of the numbers found in <filename>libao2/afmt.h</filename>. This | |
1138 plugin is hardly ever needed and is intended for advanced users. Keep in | |
1139 mind that this plugin only changes the sample format and not the sample | |
1140 frequency or the number of channels. | |
1141 </para> | |
1142 | |
1143 <para> | |
1144 Usage: | |
1145 | |
1146 <screen> | |
1147 mplayer <replaceable>media.avi</replaceable> -aop list=format:format=<replaceable>outfmt</replaceable></screen> | |
1148 | |
12815 | 1149 where <literal><replaceable>outfmt</replaceable></literal> is the |
9675 | 1150 required output format. |
1151 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1152 </sect3> |
9675 | 1153 |
1154 | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1155 <sect3 id="audio-delay"> |
9675 | 1156 <title>Delay</title> |
1157 <para> | |
1158 This plugin delays the sound and is intended as an example of how to | |
1159 develop new plugins. It can not be used for anything useful from a users | |
1160 perspective and is mentioned here for the sake of completeness only. Do not | |
1161 use this plugin unless you are a developer. | |
1162 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1163 </sect3> |
9675 | 1164 |
1165 | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1166 <sect3 id="sw-volume"> |
9675 | 1167 <title>Software volume control</title> |
1168 | |
1169 <para> | |
1170 This plugin is a software replacement for the volume control, and can be | |
1171 used on machines with a broken mixer device. It can also be used if one | |
1172 wants to change the output volume of <application>MPlayer</application> | |
1173 without changing the PCM volume setting in the mixer. It has one switch | |
1174 <option>volume</option> that is used for setting the initial sound level. | |
1175 The initial sound level can be set to values between 0 and 255 and defaults | |
1176 to 101 which equals 0dB amplification. Use this plugin with caution since | |
1177 it can reduce the signal to noise ratio of the sound. In most cases it is | |
1178 best to set the level for the PCM sound to max, leave this plugin out and | |
1179 control the output level to your speakers with the master volume control of | |
1180 the mixer. If there is an external amplifier connected to the computer | |
1181 (this is almost always the case), the noise level can be minimized by | |
1182 adjusting the master level and the volume knob on the amplifier until the | |
1183 hissing noise in the background is gone. | |
1184 </para> | |
1185 | |
1186 <para> | |
1187 Usage: | |
1188 <screen> | |
1189 mplayer <replaceable>media.avi</replaceable> -aop list=volume:volume=<replaceable>0-255</replaceable></screen> | |
1190 </para> | |
1191 | |
1192 <para> | |
1193 This plugin also has compressor or "soft-clipping" capabilities. | |
1194 Compression can be used if the dynamic range of the sound is very high or | |
1195 if the dynamic range of the loudspeakers is very low. Be aware that this | |
1196 feature creates distortion and should be considered a last resort. | |
1197 </para> | |
1198 | |
1199 <para> | |
1200 Usage: | |
1201 <screen> | |
1202 mplayer <replaceable>media.avi</replaceable> -aop list=volume:softclip</screen> | |
1203 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1204 </sect3> |
9675 | 1205 |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1206 <sect3 id="extrastereo"> |
9675 | 1207 <title>Extrastereo</title> |
1208 | |
1209 <para> | |
1210 This plugin (linearly) increases the difference between left and right | |
10111 | 1211 channels (like the <application>XMMS</application> extrastereo plugin) which gives some |
1212 sort of "live" effect to playback. | |
9675 | 1213 </para> |
1214 | |
1215 <para> | |
1216 Usage: | |
1217 <screen> | |
1218 mplayer <replaceable>media.avi</replaceable> -aop list=extrastereo | |
1219 mplayer <replaceable>media.avi</replaceable> -aop list=extrastereo:mul=3.45<!-- | |
1220 --></screen> | |
1221 | |
1222 The default coefficient (<option>mul</option>) is a float number that | |
1223 defaults to 2.5. If you set it to <literal>0.0</literal>, you will have | |
1224 mono sound (average of both channels). If you set it to | |
1225 <literal>1.0</literal>, sound will be unchanged, if you set it to | |
1226 <literal>-1.0</literal>, left and right channels will be swapped. | |
1227 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1228 </sect3> |
9675 | 1229 |
1230 | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1231 <sect3 id="volnorm"> |
9675 | 1232 <title>Volume normalizer</title> |
1233 | |
1234 <para> | |
1235 This plugin maximizes the volume without distorting the sound. | |
1236 </para> | |
1237 | |
1238 <para> | |
1239 Usage: | |
1240 <screen>mplayer <replaceable>media.avi</replaceable> -aop list=volnorm</screen> | |
1241 </para> | |
1242 </sect3> | |
1243 </sect2> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
1244 </sect1> |