annotate DOCS/xml/en/audio.xml @ 14646:5eb0f60a6962

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