Mercurial > mplayer.hg
annotate DOCS/xml/en/audio.xml @ 14654:ca1f3ca346b3
Add Reimar's hint for building 32 bit MPlayer on Athlon64.
author | diego |
---|---|
date | Sat, 05 Feb 2005 14:19:42 +0000 |
parents | 5eb0f60a6962 |
children | 346ace66cdb4 |
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"> |
14443 | 6 <title>Audio/Video synchronization</title> |
9675 | 7 |
8 <para> | |
9 Linux sound card drivers have compatibility problems. This is because | |
10 <application>MPlayer</application> relies on an in-built feature of | |
11 <emphasis>properly</emphasis> coded sound drivers that enable them to | |
12 maintain correct audio/video sync. Regrettably, some driver authors | |
13 don't take the care to code this feature since it is not needed for | |
14 playing MP3s or sound effects. | |
15 </para> | |
16 | |
17 <para> | |
13977 | 18 Other media players like <ulink url="http://avifile.sf.net">aviplay</ulink> |
19 or <ulink url="http://xinehq.de">xine</ulink> possibly work | |
9675 | 20 out-of-the-box with these drivers because they use "simple" methods |
21 with internal timing. Measuring showed that their methods are not as | |
22 efficient as <application>MPlayer</application>'s. | |
23 </para> | |
24 | |
25 <para> | |
26 Using <application>MPlayer</application> with a properly written audio | |
27 driver will never result in A/V desyncs related to the audio, except | |
28 only with very badly created files (check the man page for workarounds). | |
29 </para> | |
30 | |
31 <para> | |
32 If you happen to have a bad audio driver, try the <option>-autosync</option> | |
33 option, it should sort out your problems. See the man page for detailed | |
34 information. | |
35 </para> | |
14632 | 36 </sect2> |
9675 | 37 |
14632 | 38 <sect2 id="troubleshooting"> |
39 <title>Troubleshooting</title> | |
40 | |
41 <para>Some notes:</para> | |
42 | |
43 <para> | |
9675 | 44 If you have ALSA version 0.5, then you almost always have to use |
45 <option>-ao alsa5</option>, since ALSA 0.5 has buggy OSS emulation code, | |
46 and will <emphasis role="bold">crash <application>MPlayer</application></emphasis> | |
47 with a message like this: | |
48 <screen> | |
49 DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!<!-- | |
50 --></screen> | |
14632 | 51 </para> |
52 <para> | |
53 If the sound clicks when playing from CD-ROM, turn on IRQ unmasking as | |
54 described in the <link linkend="drives">CD-ROM</link> section. | |
55 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
56 </sect2> |
9675 | 57 |
58 | |
14442 | 59 </sect1> |
60 | |
61 <sect1 id="af"> | |
9675 | 62 <title>Audio filters</title> |
63 <para> | |
14443 | 64 Audio filters allow changing the properties of the audio data before the |
9675 | 65 sound reaches the sound card. The activation and deactivation of the filters |
66 is normally automated but can be overridden. The filters are activated when | |
67 the properties of the audio data differ from those required by the sound card | |
68 and deactivated if unnecessary. The <option>-af filter1,filter2,...</option> | |
69 option is used to override the automatic activation of filters or to insert | |
70 filters that are not automatically inserted. The filters will be executed as | |
71 they appear in the comma separated list. | |
72 </para> | |
73 | |
74 <para> | |
75 Example: | |
11713 | 76 <screen>mplayer -af resample,pan <replaceable>movie.avi</replaceable></screen> |
9675 | 77 would run the sound through the resampling filter followed by the pan filter. |
78 Observe that the list must not contain any spaces, else it will fail. | |
79 </para> | |
80 | |
81 <para> | |
82 The filters often have options that change their behavior. These options | |
83 are explained in detail in the sections below. A filter will execute using | |
84 default settings if its options are omitted. Here is an example of how to use | |
85 filters in combination with filter specific options: | |
11713 | 86 <screen>mplayer -af resample=11025,pan=1:0.5:0.5 -channels 1 -srate 11025 <replaceable>media.avi</replaceable></screen> |
9675 | 87 would set the output frequency of the resample filter to 11025Hz and downmix |
88 the audio to 1 channel using the pan filter. | |
89 </para> | |
90 | |
91 | |
92 <para> | |
93 The overall execution of the filter layer is controlled using the | |
94 <option>-af-adv</option> option. This option has two suboptions: | |
95 </para> | |
96 | |
97 <para> | |
98 <option>force</option> is a bit field that controls how the filters | |
99 are inserted and what speed/accuracy optimizations they use: | |
100 </para> | |
101 | |
102 <variablelist> | |
103 <varlistentry> | |
104 <term><option>0</option></term> | |
105 <listitem><para> | |
106 Use automatic insertion of filters and optimize according to CPU speed. | |
107 </para></listitem> | |
108 </varlistentry> | |
109 | |
110 <varlistentry> | |
111 <term><option>1</option></term> | |
112 <listitem><para> | |
113 Use automatic insertion of filters and optimize for the highest speed. | |
114 <emphasis>Warning:</emphasis> Some features in the audio filters may | |
115 silently fail, and the sound quality may drop. | |
116 </para></listitem> | |
117 </varlistentry> | |
118 | |
119 <varlistentry> | |
120 <term><option>2</option></term> | |
121 <listitem><para> | |
122 Use automatic insertion of filters and optimize for quality. | |
123 </para></listitem> | |
124 </varlistentry> | |
125 | |
126 <varlistentry> | |
127 <term><option>3</option></term> | |
128 <listitem><para> | |
129 Use no automatic insertion of filters and no optimization. | |
11540 | 130 <emphasis>Warning:</emphasis> It may be possible to crash <application>MPlayer</application> |
9675 | 131 using this setting. |
132 </para></listitem> | |
133 </varlistentry> | |
134 | |
135 <varlistentry> | |
136 <term><option>4</option></term> | |
137 <listitem><para> | |
138 Use automatic insertion of filters according to 0 above, | |
139 but use floating point processing when possible. | |
140 </para></listitem> | |
141 </varlistentry> | |
142 | |
143 <varlistentry> | |
144 <term><option>5</option></term> | |
145 <listitem><para> | |
146 Use automatic insertion of filters according to 1 above, | |
147 but use floating point processing when possible. | |
148 </para></listitem> | |
149 </varlistentry> | |
150 | |
151 <varlistentry> | |
152 <term><option>6</option></term> | |
153 <listitem><para> | |
154 Use automatic insertion of filters according to 2 above, | |
155 but use floating point processing when possible. | |
156 </para></listitem> | |
157 </varlistentry> | |
158 | |
159 <varlistentry> | |
160 <term><option>7</option></term> | |
161 <listitem><para> | |
162 Use no automatic insertion of filters according to 3 above, | |
163 and use floating point processing when possible. | |
164 </para></listitem> | |
165 </varlistentry> | |
166 </variablelist> | |
167 | |
168 <para> | |
169 <option>list</option> is an alias for the -af option. | |
170 </para> | |
171 | |
172 <para> | |
173 The filter layer is also affected by the following generic options: | |
174 </para> | |
175 | |
176 <variablelist> | |
177 <varlistentry> | |
178 <term><option>-v</option></term> | |
179 <listitem><para> | |
180 Increases the verbosity level and makes most filters print out extra | |
181 status messages. | |
182 </para></listitem> | |
183 </varlistentry> | |
184 | |
185 <varlistentry> | |
186 <term><option>-channels</option></term> | |
187 <listitem><para> | |
188 This option sets the number of output channels you would like your | |
189 sound card to use. It also affects the number of channels that are | |
190 being decoded from the media. If the media contains less channels | |
191 than requested the channels filter (see below) will automatically | |
192 be inserted. The routing will be the default routing for the channels | |
193 filter. | |
194 </para></listitem> | |
195 </varlistentry> | |
196 | |
197 <varlistentry> | |
198 <term><option>-srate</option></term> | |
199 <listitem><para> | |
200 This option selects the sample rate you would like your sound card | |
201 to use (of course the cards have limits on this). If the sample frequency | |
202 of your sound card is different from that of the current media, the resample | |
203 filter (see below) will be inserted into the audio filter layer to compensate | |
204 for the difference. | |
205 </para></listitem> | |
206 </varlistentry> | |
207 <varlistentry> | |
208 <term><option>-format</option></term> | |
209 <listitem><para> | |
210 This option sets the sample format between the audio filter layer and the | |
211 sound card. If the requested sample format of your sound card is different | |
212 from that of the current media, a format filter (see below) will be inserted | |
213 to rectify the difference. | |
214 </para></listitem> | |
215 </varlistentry> | |
216 </variablelist> | |
217 | |
14442 | 218 <sect2 id="af_resample"> |
9675 | 219 <title>Up/Downsampling</title> |
220 | |
221 <para> | |
11540 | 222 <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
|
223 <option>resample</option> filter. It can be used if you |
9675 | 224 have a fixed frequency sound card or if you are stuck with an old sound card |
225 that is only capable of max 44.1kHz. This filter is automatically enabled if | |
226 it is necessary, but it can also be explicitly enabled on the command line. It | |
227 has three options: | |
228 </para> | |
229 | |
230 <variablelist> | |
231 <varlistentry> | |
232 <term><option>srate <8000-192000></option></term> | |
233 <listitem><para> | |
234 is an integer used for setting the output sample | |
235 frequency in Hz. The valid range for this parameter is 8kHz to 192kHz. If | |
236 the input and output sample frequency are the same or if this parameter is | |
237 omitted the filter is automatically unloaded. A high sample frequency | |
238 normally improves the audio quality, especially when used in combination | |
239 with other filters. | |
240 </para></listitem> | |
241 </varlistentry> | |
242 | |
243 <varlistentry> | |
244 <term><option>sloppy</option></term> | |
245 <listitem><para> | |
246 is an optional binary parameter that allows the output frequency to differ | |
247 slightly from the frequency given by <option>srate</option>. This option | |
248 can be used if the startup of the playback is extremely slow. It is enabled | |
249 by default. | |
250 </para></listitem> | |
251 </varlistentry> | |
252 | |
253 <varlistentry> | |
254 <term><option>type <0-2></option></term> | |
255 <listitem><para> | |
256 is an optional integer between <literal>0</literal> and <literal>2</literal> that | |
257 selects which resampling method to use. Here <literal>0</literal> represents | |
258 linear interpolation as resampling method, <literal>1</literal> represents | |
259 resampling using a poly-phase filter-bank and integer processing and | |
260 <literal>2</literal> represents resampling using a poly-phase filter-bank and | |
261 floating point processing. Linear interpolation is extremely fast, but | |
262 suffers from poor sound quality especially when used for up-sampling. The | |
263 best quality is given by <literal>2</literal> but this method also suffers from | |
264 the highest CPU load. | |
265 </para></listitem> | |
266 </varlistentry> | |
267 </variablelist> | |
268 | |
269 <para>Example: | |
270 <screen>mplayer -af resample=44100:0:0</screen> | |
271 would set the output frequency of the resample filter to 44100Hz using exact output | |
272 frequency scaling and linear interpolation. | |
273 </para> | |
14442 | 274 </sect2> |
9675 | 275 |
14442 | 276 <sect2 id="af_channels"> |
9675 | 277 <title>Changing the number of channels</title> |
278 <para> | |
279 The <option>channels</option> filter can be used for adding and removing | |
280 channels, it can also be used for routing or copying channels. It is | |
281 automatically enabled when the output from the audio filter layer differs from | |
282 the input layer or when it is requested by another filter. This filter unloads | |
283 itself if not needed. The number of options is dynamic: | |
284 </para> | |
285 | |
286 <variablelist> | |
287 <varlistentry> | |
288 <term><option>nch <1-6></option></term> | |
289 <listitem><para> | |
290 is an integer between <literal>1</literal> and <literal>6</literal> that is used | |
291 for setting the number of output channels. This option is required, leaving it | |
292 empty results in a runtime error. | |
293 </para></listitem> | |
294 </varlistentry> | |
295 | |
296 <varlistentry> | |
297 <term><option>nr <1-6></option></term> | |
298 <listitem><para> | |
299 is an integer between <literal>1</literal> and <literal>6</literal> that is used | |
300 for specifying the number of routes. This parameter is optional. If it is | |
301 omitted the default routing is used. | |
302 </para></listitem> | |
303 </varlistentry> | |
304 | |
305 <varlistentry> | |
306 <term><option>from1:to1:from2:to2:from3:to3...</option></term> | |
307 <listitem><para> | |
308 are pairs of numbers between <literal>0</literal> and <literal>5</literal> | |
309 that define where each channel should be routed. | |
310 </para></listitem> | |
311 </varlistentry> | |
312 </variablelist> | |
313 | |
314 <para> | |
315 If only <option>nch</option> is given the default routing is used, it works | |
316 as follows: If the number of output channels is bigger than the number of input | |
317 channels empty channels are inserted (except mixing from mono to stereo, then | |
318 the mono channel is repeated in both of the output channels). If the number of | |
319 output channels is smaller than the number of input channels the exceeding | |
320 channels are truncated. | |
321 </para> | |
322 | |
323 <para> | |
324 Example 1: | |
11713 | 325 <screen>mplayer -af channels=4:4:0:1:1:0:2:2:3:3 <replaceable>media.avi</replaceable></screen> |
9675 | 326 would change the number of channels to 4 and set up 4 routes that swap |
327 channel 0 and channel 1 and leave channel 2 and 3 intact. Observe that | |
328 if media containing two channels was played back, channels 2 and 3 would | |
329 contain silence but 0 and 1 would still be swapped. | |
330 </para> | |
331 | |
332 <para> | |
10111 | 333 Example 2: |
11713 | 334 <screen>mplayer -af channels=6:4:0:0:0:1:0:2:0:3 <replaceable>media.avi</replaceable></screen> |
9675 | 335 would change the number of channels to 6 and set up 4 routes that copy |
336 channel 0 to channels 0 to 3. Channel 4 and 5 will contain silence. | |
337 </para> | |
14442 | 338 </sect2> |
9675 | 339 |
14442 | 340 <sect2 id="af_format"> |
9675 | 341 <title>Sample format converter</title> |
342 <para> | |
343 The <option>format</option> filter converts between different sample formats. It | |
344 is automatically enabled when needed by the sound card or another filter. | |
345 </para> | |
346 | |
347 <variablelist> | |
348 <varlistentry> | |
349 <term><option>bps <number></option></term> | |
350 <listitem><para> | |
351 can be <literal>1</literal>, <literal>2</literal> or <literal>4</literal> and | |
352 denotes the number of bytes per sample. This option is required, leaving it empty | |
353 results in a runtime error. | |
354 </para></listitem> | |
355 </varlistentry> | |
356 | |
357 <varlistentry> | |
358 <term><option>f <format></option></term> | |
359 <listitem><para> | |
360 is a text string describing the sample format. The string is a | |
361 concatenated mix of: <option>alaw</option>, <option>mulaw</option> or | |
362 <option>imaadpcm</option>, <option>float</option> or <option>int</option>, | |
363 <option>unsigned</option> or <option>signed</option>, <option>le</option> or | |
13047 | 364 <option>be</option> (little- or big-endian). This option is required, |
9675 | 365 leaving it empty results in a runtime error. |
366 </para></listitem> | |
367 </varlistentry> | |
368 </variablelist> | |
369 | |
370 <para> | |
371 Example: | |
11713 | 372 <screen>mplayer -af format=4:float <replaceable>media.avi</replaceable></screen> |
9675 | 373 would set the output format to 4 bytes per sample floating point data. |
374 </para> | |
14442 | 375 </sect2> |
9675 | 376 |
14442 | 377 <sect2 id="af_delay"> |
9675 | 378 <title>Delay</title> |
379 <para> | |
10111 | 380 The <option>delay</option> filter delays the sound to the loudspeakers such that |
9675 | 381 the sound from the different channels arrives at the listening position |
382 simultaneously. | |
383 It is only useful if you have more than 2 loudspeakers. This filter has a | |
384 variable number of parameters: | |
385 </para> | |
386 | |
387 <variablelist> | |
388 <varlistentry> | |
389 <term><option>d1:d2:d3...</option></term> | |
390 <listitem><para> | |
391 are floating point numbers representing the delays in ms that should be | |
392 imposed on the different channels. The minimum delay is 0ms and the maximum | |
393 is 1000ms. | |
394 </para></listitem> | |
395 </varlistentry> | |
396 </variablelist> | |
397 | |
398 <para> | |
399 To calculate the required delay for the different channels do as follows: | |
400 </para> | |
401 | |
402 <orderedlist> | |
403 <listitem><para> | |
404 Measure the distance to the loudspeakers in meters in relation to your | |
405 listening position, giving you the distances s1 to s5 (for a 5.1 system). | |
406 There is no point in compensating for the sub-woofer (you will not hear the | |
407 difference anyway). | |
408 </para></listitem> | |
409 <listitem><para> | |
410 Subtract the distances s1 to s5 from the maximum distance i.e. | |
411 s[i] = max(s) - s[i]; i = 1...5 | |
412 </para></listitem> | |
413 <listitem><para> | |
11106
e9cbf3249f04
Stray duplicated line spotted by Torinthiel plus a typo.
diego
parents:
11096
diff
changeset
|
414 Calculate the required delays in ms as |
9675 | 415 d[i] = 1000*s[i]/342; i = 1...5 |
416 </para></listitem> | |
417 </orderedlist> | |
418 | |
419 <para> | |
420 Example: | |
11713 | 421 <screen>mplayer -af delay=10.5:10.5:0:0:7:0 <replaceable>media.avi</replaceable></screen> |
9675 | 422 would delay front left and right by 10.5ms, the two rear channels and the sub |
423 by 0ms and the center channel by 7ms. | |
424 </para> | |
425 | |
14442 | 426 </sect2> |
9675 | 427 |
14442 | 428 <sect2 id="af_volume"> |
9675 | 429 <title>Software volume control</title> |
430 <para>Software volume control is implemented by the <option>volume</option> | |
431 audio filter. Use this filter with caution since it can reduce the signal to | |
432 noise ratio of the sound. In most cases it is best to set the level for the | |
433 PCM sound to max, leave this filter out and control the output level to your | |
434 speakers with the master volume control of the mixer. In case your sound card | |
435 has a digital PCM mixer instead of an analog one, and you hear distortion, | |
436 use the MASTER mixer instead. If there is an external amplifier connected to | |
437 the computer (this is almost always the case), the noise level can be minimized | |
438 by adjusting the master level and the volume knob on the amplifier until the | |
439 hissing noise in the background is gone. This filter has two options: | |
440 </para> | |
441 | |
442 <variablelist> | |
443 <varlistentry> | |
444 <term><option>v <-200 - +60></option></term> | |
445 <listitem><para> | |
446 is a floating point number between <literal>-200</literal> and <literal>+60</literal> | |
447 which represents the volume level in dB. The default level is 0dB. | |
448 </para></listitem> | |
449 </varlistentry> | |
450 | |
451 <varlistentry> | |
452 <term><option>c</option></term> | |
453 <listitem><para> | |
454 is a binary control that turns soft clipping on and off. Soft-clipping can | |
455 make the sound more smooth if very high volume levels are used. Enable this | |
456 option if the dynamic range of the loudspeakers is very low. Be aware that | |
457 this feature creates distortion and should be considered a last resort. | |
458 </para></listitem> | |
459 </varlistentry> | |
460 </variablelist> | |
461 | |
462 <para> | |
463 Example: | |
11713 | 464 <screen>mplayer -af volume=10.1:0 <replaceable>media.avi</replaceable></screen> |
9675 | 465 would amplify the sound by 10.1dB and hard-clip if the sound level is too high. |
466 </para> | |
467 | |
468 <para> | |
469 This filter has a second feature: It measures the overall maximum sound level | |
11540 | 470 and prints out that level when <application>MPlayer</application> exits. |
471 This volume estimate can be used for setting the sound level in | |
472 <application>MEncoder</application> such that the maximum dynamic range is utilized. | |
9675 | 473 </para> |
14442 | 474 </sect2> |
9675 | 475 |
14442 | 476 <sect2 id="af_equalizer"> |
9675 | 477 <title>Equalizer</title> |
478 <para> | |
479 The <option>equalizer</option> filter represents a 10 octave band graphic | |
480 equalizer, implemented using 10 IIR band pass filters. This means that | |
481 it works regardless of what type of audio is being played back. The center | |
482 frequencies for the 10 bands are: | |
483 </para> | |
484 | |
485 <informaltable> | |
486 <tgroup cols="2"> | |
487 <thead> | |
488 <row> | |
489 <entry>Band No.</entry><entry>Center frequency</entry> | |
490 </row> | |
491 </thead> | |
492 <tbody> | |
493 <row><entry>0</entry><entry>31.25 Hz</entry></row> | |
494 <row><entry>1</entry><entry>62.50 Hz</entry></row> | |
495 <row><entry>2</entry><entry>125.0 Hz</entry></row> | |
496 <row><entry>3</entry><entry>250.0 Hz</entry></row> | |
497 <row><entry>4</entry><entry>500.0 Hz</entry></row> | |
498 <row><entry>5</entry><entry>1.000 kHz</entry></row> | |
499 <row><entry>6</entry><entry>2.000 kHz</entry></row> | |
500 <row><entry>7</entry><entry>4.000 kHz</entry></row> | |
501 <row><entry>8</entry><entry>8.000 kHz</entry></row> | |
502 <row><entry>9</entry><entry>16.00 kHz</entry></row> | |
503 </tbody> | |
504 </tgroup> | |
505 </informaltable> | |
506 | |
507 <para> | |
508 If the sample rate of the sound being played back is lower than the center | |
509 frequency for a frequency band, then that band will be disabled. A known | |
510 bug with this filter is that the characteristics for the uppermost band | |
511 are not completely symmetric if the sample rate is close to the center | |
512 frequency of that band. This problem can be worked around by up-sampling | |
513 the sound using the resample filter before it reaches this filter. | |
514 </para> | |
515 | |
516 <para> | |
517 This filter has 10 parameters: | |
518 </para> | |
519 | |
520 <variablelist> | |
521 <varlistentry> | |
522 <term><option>g1:g2:g3...g10</option></term> | |
523 <listitem><para> | |
524 are floating point numbers between <literal>-12</literal> and <literal>+12</literal> | |
525 representing the gain in dB for each frequency band. | |
526 </para></listitem> | |
527 </varlistentry> | |
528 </variablelist> | |
529 | |
530 <para> | |
531 Example: | |
11713 | 532 <screen>mplayer -af equalizer=11:11:10:5:0:-12:0:5:12:12 <replaceable>media.avi</replaceable></screen> |
9675 | 533 would amplify the sound in the upper and lower frequency region while |
534 canceling it almost completely around 1kHz. | |
535 </para> | |
14442 | 536 </sect2> |
9675 | 537 |
14442 | 538 <sect2 id="af_panning"> |
9675 | 539 <title>Panning filter</title> |
540 <para> | |
541 Use the <option>pan</option> filter to mix channels arbitrarily. It is | |
542 basically a combination of the volume control and the channels filter. | |
543 There are two major uses for this filter: | |
544 </para> | |
545 | |
546 <orderedlist> | |
547 <listitem><para> | |
548 Down-mixing many channels to only a few, stereo to mono for example. | |
549 </para></listitem> | |
550 <listitem><para> | |
551 Varying the "width" of the center speaker in a surround sound system. | |
552 </para></listitem> | |
553 </orderedlist> | |
554 | |
555 <para> | |
556 This filter is hard to use, and will require some tinkering before the | |
557 desired result is obtained. The number of options for this filter | |
558 depends on the number of output channels: | |
559 </para> | |
560 | |
561 <variablelist> | |
562 <varlistentry> | |
563 <term><option>nch <1-6></option></term> | |
564 <listitem><para> | |
565 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
|
566 for setting the number of input channels. This option is required, leaving it |
9675 | 567 empty results in a runtime error. |
568 </para></listitem> | |
569 </varlistentry> | |
570 | |
571 <varlistentry> | |
572 <term><option>l00:l01:l02:..l10:l11:l12:...ln0:ln1:ln2:...</option></term> | |
573 <listitem><para> | |
574 are floating point values between <literal>0</literal> and <literal>1</literal>. | |
575 <option>l[i][j]</option> determines how much of input channel j is mixed into | |
576 output channel i. | |
577 </para></listitem> | |
578 </varlistentry> | |
579 </variablelist> | |
580 | |
581 <para> | |
582 Example 1: | |
11713 | 583 <screen>mplayer -af pan=1:0.5:0.5 -channels 1 <replaceable>media.avi</replaceable></screen> |
9675 | 584 would down-mix from stereo to mono. |
585 </para> | |
586 | |
587 <para> | |
588 Example 2: | |
11713 | 589 <screen>mplayer -af pan=3:1:0:1:0.5:0.5 -channels 3 <replaceable>media.avi</replaceable></screen> |
9675 | 590 would give 3 channel output leaving channels 0 and 1 intact, and mix |
591 channels 0 and 1 into output channel 2 (which could be sent to a | |
592 sub-woofer for example). | |
593 </para> | |
14442 | 594 </sect2> |
9675 | 595 |
14442 | 596 <sect2 id="af_sub"> |
9675 | 597 <title>Sub-woofer</title> |
598 <para> | |
10111 | 599 The <option>sub</option> filter adds a sub woofer channel to the audio |
9675 | 600 stream. The audio data used for creating the sub-woofer channel is an |
601 average of the sound in channel 0 and channel 1. The resulting sound is | |
602 then low-pass filtered by a 4th order Butterworth filter with a default | |
603 cutoff frequency of 60Hz and added to a separate channel in the audio | |
604 stream. Warning: Disable this filter when you are playing DVDs with Dolby | |
605 Digital 5.1 sound, otherwise this filter will disrupt the sound to the | |
606 sub-woofer. This filter has two parameters: | |
607 </para> | |
608 | |
609 <variablelist> | |
610 <varlistentry> | |
611 <term><option>fc <20-300></option></term> | |
612 <listitem><para> | |
613 is an optional floating point number used for setting the cutoff frequency | |
614 for the filter in Hz. The valid range is 20Hz to 300Hz. For the best result | |
615 try setting the cutoff frequency as low as possible. This will improve the | |
616 stereo or surround sound experience. The default cutoff frequency is 60Hz. | |
617 </para></listitem> | |
618 </varlistentry> | |
619 | |
620 <varlistentry> | |
621 <term><option>ch <0-5></option></term> | |
622 <listitem><para> | |
623 is an optional integer between <literal>0</literal> and <literal>5</literal> | |
624 which determines the channel number in which to insert the sub-channel audio. | |
625 The default is channel number <literal>5</literal>. Observe that the number of | |
626 channels will automatically be increased to <replaceable>ch</replaceable> if | |
627 necessary. | |
628 </para></listitem> | |
629 </varlistentry> | |
630 </variablelist> | |
631 | |
632 <para> | |
633 Example: | |
11713 | 634 <screen>mplayer -af sub=100:4 -channels 5 <replaceable>media.avi</replaceable></screen> |
9675 | 635 would add a sub-woofer channel with a cutoff frequency of |
636 100Hz to output channel 4. | |
637 </para> | |
14442 | 638 </sect2> |
9675 | 639 |
14442 | 640 <sect2 id="af_surround"> |
9675 | 641 <title>Surround-sound decoder</title> |
642 <para> | |
643 Matrix encoded surround sound can be decoded by the <option>surround</option> | |
644 filter. Dolby Surround is an example of a matrix encoded format. Many files | |
645 with 2 channel audio actually contain matrixed surround sound. To use this | |
646 feature you need a sound card supporting at least 4 channels. This filter has | |
647 one parameter: | |
648 </para> | |
649 | |
650 <variablelist> | |
651 <varlistentry> | |
652 <term><option>d <0-1000></option></term> | |
653 <listitem><para> | |
654 is an optional floating point number between <literal>0</literal> and | |
655 <literal>1000</literal> used for setting the delay time in ms for the | |
656 rear speakers. This delay should be set as follows: if d1 is the distance | |
657 from the listening position to the front speakers and d2 is the distance | |
658 from the listening position to the rear speakers, then the delay d should | |
659 be set to 15ms if d1 <= d2 and to 15 + 5*(d1-d2) if d1 > d2. The default | |
660 value for d is 20ms. | |
661 </para></listitem> | |
662 </varlistentry> | |
663 </variablelist> | |
664 | |
665 <para> | |
666 Example: | |
11713 | 667 <screen>mplayer -af surround=15 -channels 4 <replaceable>media.avi</replaceable></screen> |
9675 | 668 would add surround sound decoding with 15ms delay for the sound to the |
669 rear speakers. | |
670 </para> | |
14442 | 671 </sect2> |
11366
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
672 |
14442 | 673 <sect2 id="af_export"> |
11366
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
674 <title>Audio Exporter</title> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
675 <para> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
676 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
|
677 mapping (<literal>mmap()</literal>). Memory mapped areas contain a header: |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
678 |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
679 <programlisting> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
680 int nch /*number of channels*/ |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
681 int size /*buffer size*/ |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
682 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
|
683 every time new data is exported.*/ |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
684 </programlisting> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
685 |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
686 The rest is payload (non-interleaved) 16bit data. |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
687 </para> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
688 |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
689 <variablelist> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
690 <varlistentry> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
691 <term><option>mmapped_file</option></term> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
692 <listitem><para> |
12815 | 693 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
|
694 <filename>~/.mplayer/mplayer-af_export</filename>. |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
695 </para></listitem> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
696 </varlistentry> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
697 |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
698 <varlistentry> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
699 <term><option>nsamples</option></term> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
700 <listitem><para> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
701 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
|
702 </para></listitem> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
703 </varlistentry> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
704 </variablelist> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
705 |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
706 <para> |
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
707 Example: |
11713 | 708 <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
|
709 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
|
710 </para> |
14442 | 711 </sect2> |
11366
3d38013edd45
Export audio filter documentation by Gustavo Sverzut Barbieri
diego
parents:
11271
diff
changeset
|
712 |
14442 | 713 <sect2 id="af_extrastereo"> |
13590 | 714 <title>Extrastereo</title> |
715 | |
716 <para> | |
717 This audio filter (linearly) increases the difference between left and | |
718 right channels (like the <application>XMMS</application> extrastereo | |
719 plugin) which adds some sort of "live" effect to playback. | |
720 This filter has one parameter:</para> | |
721 | |
722 <variablelist> | |
723 <varlistentry> | |
724 <term><option>mul</option></term> | |
725 <listitem><para> | |
726 is the difference coefficient, an optional floating point number that defaults | |
727 to <literal>2.5</literal>. If you set it to <literal>0.0</literal>, you will | |
728 have mono sound (average of both channels). If you set it to | |
729 <literal>1.0</literal>, sound will be unchanged, if you set it to | |
730 <literal>-1.0</literal>, left and right channels will be swapped. | |
731 </para></listitem> | |
732 </varlistentry> | |
733 </variablelist> | |
734 | |
735 <para> | |
736 Usage: | |
737 <screen> | |
738 mplayer -af extrastereo <replaceable>media.avi</replaceable> | |
739 mplayer -af extrastereo=3.45 <replaceable>media.avi</replaceable><!-- | |
740 --></screen> | |
741 </para> | |
14442 | 742 </sect2> |
13590 | 743 |
14442 | 744 <sect2 id="af_volnorm"> |
13590 | 745 <title>Volume normalizer</title> |
746 | |
747 <para> | |
748 This audio filter maximizes the volume without distorting the sound. | |
749 </para> | |
750 | |
751 <para> | |
752 Usage: | |
753 <screen>mplayer -af volnorm <replaceable>media.avi</replaceable></screen> | |
754 </para> | |
13912
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
755 </sect2> |
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
756 |
c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
diego
parents:
13590
diff
changeset
|
757 </sect1> |