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