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