Mercurial > mplayer.hg
annotate DOCS/sound.html @ 6439:edac9b35835d
Fixed lround replacement, hopefully fast enough.
author | atmos4 |
---|---|
date | Sun, 16 Jun 2002 01:44:33 +0000 |
parents | c0f189e49ee4 |
children | 4b7d097a9c69 |
rev | line source |
---|---|
6403
c0f189e49ee4
Background color now set by CSS, added doctype and default character set,
diego
parents:
6393
diff
changeset
|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
1612 | 2 <HTML> |
4982
6cb9d9a1716d
HTML: different font handling - idea from new hp dezign
gabucino
parents:
4928
diff
changeset
|
3 |
6cb9d9a1716d
HTML: different font handling - idea from new hp dezign
gabucino
parents:
4928
diff
changeset
|
4 <HEAD> |
6391 | 5 <LINK REL="stylesheet" TYPE="text/css" HREF="default.css"> |
6403
c0f189e49ee4
Background color now set by CSS, added doctype and default character set,
diego
parents:
6393
diff
changeset
|
6 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
4982
6cb9d9a1716d
HTML: different font handling - idea from new hp dezign
gabucino
parents:
4928
diff
changeset
|
7 </HEAD> |
6cb9d9a1716d
HTML: different font handling - idea from new hp dezign
gabucino
parents:
4928
diff
changeset
|
8 |
6403
c0f189e49ee4
Background color now set by CSS, added doctype and default character set,
diego
parents:
6393
diff
changeset
|
9 <BODY> |
1704 | 10 |
1612 | 11 |
5765 | 12 <P><B><A NAME=2.3.2>2.3.2. Audio output devices</A></B></P> |
1612 | 13 |
1892 | 14 <P><B>MPlayer</B>'s audio interface is called <I>libao2</I>. It currently |
5765 | 15 contains these drivers:</P> |
1892 | 16 |
1905 | 17 <TABLE BORDER=0> |
18 | |
6393 | 19 <TR><TD COLSPAN=4><P><B>General:</B></P></TD></TR> |
1905 | 20 |
6393 | 21 <TR><TD> </TD><TD VALIGN=top>oss</TD><TD> </TD><TD>OSS (ioctl) driver (supports hardware AC3 passthrough)</TD></TR> |
22 <TR><TD></TD><TD VALIGN=top>sdl</TD><TD></TD><TD>SDL driver (supports up/downsampling, <B>ESD</B>, <B>ARTS</B> etc)</TD></TR> | |
23 <TR><TD></TD><TD VALIGN=top>nas</TD><TD></TD><TD>NAS (Network Audio System) driver</TD></TR> | |
24 <TR><TD></TD><TD VALIGN=top>alsa5</TD><TD></TD><TD>native ALSA 0.5 driver</TD></TR> | |
25 <TR><TD></TD><TD VALIGN=top>alsa9</TD><TD></TD><TD>native ALSA 0.9 driver (works, but has problems -> use OSS) (supports hardware AC3 passthrough)</TD></TR> | |
26 <TR><TD></TD><TD VALIGN=top>sun</TD><TD></TD><TD>SUN audio driver (<CODE>/dev/audio</CODE>) for BSD and Solaris8 users</TD></TR> | |
27 <TR><TD></TD><TD VALIGN=top>arts</TD><TD></TD><TD>native ARTS driver (mostly for KDE users)</TD></TR> | |
1905 | 28 |
29 </TABLE> | |
1612 | 30 |
5765 | 31 <P>Fact is, Linux sound card drivers have compatibility problems. |
32 It <B>may</B> take a while to find your optimal settings.</P> | |
33 | |
34 <UL> | |
35 <LI>If you have an OSS driver, first try <CODE>-ao oss</CODE> (this is the default). | |
36 If you experience glitches, halts or anything out of the ordinary, try | |
37 <CODE>-ao sdl</CODE> (NOTE: you need to have SDL libraries and header files | |
38 installed). The SDL audio driver helps in a lot of cases and also supports ESD, | |
39 ARTS, and up/downsampling. (ESD is the sound daemon from GNOME, ARTS is from KDE.)</LI> | |
40 <LI>If you have ALSA version 0.5, then you almost always have to use <CODE>-ao alsa5</CODE> , | |
41 since ALSA 0.5 has buggy OSS emulation code, and will <B>crash MPlayer</B> with | |
1892 | 42 a message like this:<BR> |
5765 | 43 <CODE>DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!</CODE></LI> |
44 <LI>If you have ALSA version 0.9 you may choose between <CODE>-ao oss</CODE> and | |
45 <CODE>-ao sdl</CODE>. You can also use <CODE>-ao alsa9</CODE>. It works, but | |
46 there are problems like lost sync and disappearing audio.</LI> | |
47 </UL> | |
1892 | 48 |
49 <P>On <B>Solaris/FreeBSD</B> systems, use the SUN audio driver with the | |
5765 | 50 <CODE>-ao sun</CODE> option, otherwise neither video nor audio will work.</P> |
1892 | 51 |
5765 | 52 <P><B><A NAME=2.3.2.1>2.3.2.1. Sound Card experiences, recommendations</A></B></P> |
1612 | 53 |
5765 | 54 <TABLE BORDER=0 WIDTH="100%"> |
6393 | 55 <TR><TD COLSPAN=3><B>VIA onboard chipset (via82cxxx) 48kHz only</B></TD><TR> |
56 <TD></TD><TD>Driver:</TD><TD> from <A HREF="http://sourceforge.net/project/showfiles.php?group_id=3242&release_id=59602">here</A></TD><TR> | |
3190 | 57 |
6393 | 58 <TD COLSPAN=3><B>Aureal Vortex 2</B></TD><TR> |
59 <TD> </TD><TD>OSS:</TD><TD>no driver</TD><TR> | |
60 <TD></TD><TD>OSS/Pro:</TD><TD>OK</TD><TR> | |
61 <TD></TD><TD>ALSA:</TD><TD>no driver</TD><TR> | |
62 <TD></TD><TD>Max kHz:</TD><TD>48</TD><TR> | |
63 <TD></TD><TD>Driver:</TD><TD><A HREF="http://aureal.sourceforge.net">aureal.sourceforge.net</A></TD><TR> | |
64 <TD></TD><TD>Driver2:</TD><TD> from <A HREF="http://makacs.poliod.hu/~pontscho/aureal/au88xx-1.1.3.tar.bz2">here</A><BR> | |
2999 | 65 (<I>buffer size increased to 32k</I>)</TD><TR> |
1612 | 66 |
6393 | 67 <TD COLSPAN=3><B>GUS PnP</B></TD><TR> |
68 <TD></TD><TD>OSS:</TD><TD>no driver</TD><TR> | |
69 <TD></TD><TD>OSS/Pro:</TD><TD>OK</TD><TR> | |
70 <TD></TD><TD>ALSA:</TD><TD>OK</TD><TR> | |
71 <TD></TD><TD>Max kHz:</TD><TD>48</TD><TR> | |
1682 | 72 |
6393 | 73 <TD COLSPAN=3><B>SB Live!</B></TD><TR> |
74 <TD></TD><TD>OSS:</TD><TD>Analog OK, SP/DIF not working</TD><TR> | |
75 <TD></TD><TD>ALSA:</TD><TD>Both OK</TD><TR> | |
76 <TD></TD><TD>Max kHz:</TD><TD>192</TD><TR> | |
1612 | 77 |
6393 | 78 <TD COLSPAN=3><B>SB AWE 64</B></TD><TR> |
79 <TD></TD><TD>OSS:</TD><TD>max 44kHz</TD><TR> | |
80 <TD></TD><TD>ALSA:</TD><TD>48kHz sounds bad</TD><TR> | |
81 <TD></TD><TD>Max kHz:</TD><TD>48</TD><TR> | |
1892 | 82 |
6393 | 83 <TD COLSPAN=3><B>Gravis UltraSound ACE</B></TD><TR> |
84 <TD></TD><TD>OSS:</TD><TD>not OK</TD><TR> | |
85 <TD></TD><TD>ALSA:</TD><TD>OK</TD><TR> | |
86 <TD></TD><TD>Max kHz:</TD><TD>44</TD><TR> | |
1612 | 87 |
6393 | 88 <TD COLSPAN=3><B>Gravis UltraSound MAX</B></TD><TR> |
89 <TD></TD><TD>OSS:</TD><TD>OK</TD><TR> | |
90 <TD></TD><TD>ALSA:</TD><TD>OK (?)</TD><TR> | |
91 <TD></TD><TD>Max kHz:</TD><TD>48</TD><TR> | |
1612 | 92 |
6393 | 93 <TD COLSPAN=3><B>ESS 688</B></TD><TR> |
94 <TD></TD><TD>OSS:</TD><TD>OK</TD><TR> | |
95 <TD></TD><TD>ALSA:</TD><TD>OK (?)</TD><TR> | |
96 <TD></TD><TD>Max kHz:</TD><TD>48</TD><TR> | |
1612 | 97 |
6393 | 98 <TD COLSPAN=3><B>C-Media cards (which ones?)</B></TD><TR> |
99 <TD></TD><TD>OSS:</TD><TD>not OK (hissing) (?)</TD><TR> | |
100 <TD></TD><TD>ALSA:</TD><TD>OK (?)</TD><TR> | |
101 <TD></TD><TD>Max kHz:</TD><TD>?</TD><TR> | |
1612 | 102 |
6393 | 103 <TD COLSPAN=3><B>Yamaha cards (*ymf*)</B></TD><TR> |
104 <TD></TD><TD>OSS:</TD><TD>not OK (?) (maybe <CODE>-ao sdl</CODE>)</TD><TR> | |
105 <TD></TD><TD>ALSA:</TD><TD>OK only with ALSA 0.5 with OSS emulation <B>AND</B> <CODE>-ao sdl</CODE> (!) (?)</TD><TR> | |
106 <TD></TD><TD>Max kHz:</TD><TD>?</TD><TR> | |
1612 | 107 |
6393 | 108 <TD COLSPAN=3><B>Cards with envy24 chips (like Terratec EWS88MT)</B></TD><TR> |
109 <TD></TD><TD>OSS:</TD><TD>?</TD><TR> | |
110 <TD></TD><TD>OSS/Pro:</TD><TD>OK</TD><TR> | |
111 <TD></TD><TD>ALSA:</TD><TD>?</TD><TR> | |
112 <TD></TD><TD>Max kHz:</TD><TD>?</TD><TR> | |
3438 | 113 |
6393 | 114 <TD COLSPAN=3><B>PC Speaker or DAC</B></TD><TR> |
115 <TD></TD><TD>OSS:</TD><TD>OK (Use the SDL driver: <CODE>-ao sdl</CODE>)</TD><TR> | |
116 <TD></TD><TD>ALSA:</TD><TD>no driver</TD><TR> | |
117 <TD></TD><TD>Max kHz:</TD><TD>The driver emulates 44.1, maybe more.</TD><TR> | |
118 <TD></TD><TD>Driver:</TD><TD><A HREF="ftp://ftp.infradead.org/pub/pcsp">ftp://ftp.infradead.org/pub/pcsp</A></TD> | |
5765 | 119 </TABLE> |
1612 | 120 |
5765 | 121 <UL> |
122 <LI>On Linux, a 2.4.x kernel is highly recommended. Kernel 2.2 is not tested.</LI> | |
123 <LI>If sound clicks when playing from CD-ROM, turn on IRQ unmasking, e.g. | |
124 <CODE>hdparm -u1 /dev/cdrom</CODE> (<CODE>man hdparm</CODE>). This is | |
125 generally beneficial and described more detailed in the | |
126 <A HREF="cd-dvd.html#4.1">CD-ROM section</A>.</LI> | |
127 <LI>Sharing your sound card with another application like XMMS is <B>strongly discouraged</B>! | |
128 If the other sound application is using ESD, start <B>MPlayer</B> with the <CODE>-vo sdl:esd</CODE> option | |
129 to combine both sound streams! In fact, the option <CODE>-vo sdl:esd</CODE> could be used with ESD | |
130 even when playing <B>Mplayer</B> alone.</LI> | |
131 <LI>Feedback to this document is welcome. Please tell us how <B>MPlayer</B> and | |
132 your sound card(s) worked together.</LI> | |
133 </UL> | |
1612 | 134 |
3671 | 135 |
4536 | 136 <P><B><A NAME=2.3.2.2>2.3.2.2. Audio plugins</A></B></P> |
3671 | 137 |
4508 | 138 <P><B>MPlayer</B> has support for audio plugins. Audio plugins can be used for |
139 changing the properties of the audio data before the sound reaches the sound | |
5765 | 140 card. They are enabled using the <CODE>-aop</CODE> switch which takes a |
141 <CODE>list=plugin1,plugin2,...</CODE> argument. The <CODE>list</CODE> argument | |
142 is required and determines which plugins should be used and in which order they | |
143 should be executed. Example: | |
4508 | 144 </P> |
145 | |
146 <P> <CODE>mplayer media.avi -aop list=resample,format</CODE></P> | |
147 | |
148 <P>would run the sound through the resampling plugin followed by the format | |
149 plugin. | |
150 </P> | |
151 | |
5765 | 152 <P>The plugins can also have switches that change their behavior. These |
4508 | 153 switches are explained in detail in the sections below. A plugin will execute |
5765 | 154 using default settings if its switches are omitted. Here is an example of how |
155 to use plugins in combination with plugin specific switches: | |
4508 | 156 </P> |
157 | |
158 <P> <CODE>mplayer media.avi -aop | |
5765 | 159 list=resample,format:fout=44100:format=0x8</CODE> |
4508 | 160 </P> |
161 | |
162 <P>would set the output frequency of the resample plugin to 44100Hz and the | |
163 output format of the format plugin to AFMT_U8. | |
164 </P> | |
165 | |
166 <P>Currently audio plugins can not be used in <B>MEncoder</B>.</P> | |
167 | |
168 | |
4536 | 169 <P><B><A NAME=2.3.2.2.1>2.3.2.2.1. Up/Downsampling</A></B></P> |
3671 | 170 |
5765 | 171 <P><B>MPlayer</B> fully supports up/downsampling of the sound. This plugin can |
172 be used if you have a fixed frequency sound card or if you are | |
173 stuck with an old sound card that is only capable of max 44.1kHz. | |
4508 | 174 Limitations in your hardware are not auto detected, so you have to specify |
175 the sample frequency explicitly. This plugin has one switch: | |
176 <CODE>fout</CODE> which is used for setting the desired output sample | |
5765 | 177 frequency. It defaults to 48kHz, and is given in |
4508 | 178 <Hz>. |
179 </P> | |
3671 | 180 |
5765 | 181 <P>Usage:<BR> |
3671 | 182 <CODE>mplayer media.avi -aop list=resample:fout=<required |
183 frequency in Hz, like 44100></CODE></P> | |
184 | |
5765 | 185 <P>Note that the output frequency should not be scaled up from the default value. |
186 Scaling up will cause the audio and video streams to be played in slow motion | |
187 in addition to audio distortion.</P> | |
3671 | 188 |
4536 | 189 <P><B><A NAME=2.3.2.2.2>2.3.2.2.2. Surround Sound decoding</A></B></P> |
3931 | 190 |
5765 | 191 <P><B>MPlayer</B> has an audio plugin that can decode matrix encoded |
192 surround sound. Dolby Surround is an example of a matrix encoded format. | |
193 Many files with 2 channel audio actually contain matrixed surround sound. | |
194 To use this feature you need a sound card supporting at least 4 channels.</P> | |
3931 | 195 |
5765 | 196 <P>Usage:<BR> |
3931 | 197 <CODE>mplayer media.avi -aop list=surround</CODE></P> |
198 | |
4508 | 199 |
200 <P><B><A NAME=2.3.2.2.3>2.3.2.2.3. Sample format converter</A></B></P> | |
201 | |
5765 | 202 <P>If your sound card driver does not support signed 16bit <CODE>int</CODE> data type, |
203 this plugin can | |
4508 | 204 be used to change the format to one which your sound card can understand. It |
5765 | 205 has one switch, <CODE>format</CODE>, which can be set to one of the numbers |
206 found in <CODE>libao2/afmt.h</CODE>. This plugin is hardly ever needed and is | |
207 intended for advanced users. Keep in mind that this plugin only changes the | |
208 sample format and not the sample frequency or the number of channels. | |
4508 | 209 </P> |
210 | |
5765 | 211 <P>Usage:<BR> |
4508 | 212 <CODE>mplayer media.avi -aop |
213 list=format:format=<required output format></CODE> | |
214 </P> | |
215 | |
216 | |
217 <P><B><A NAME=2.3.2.2.4>2.3.2.2.4. Delay</A></B></P> | |
218 | |
219 <P>This plugin delays the sound and is intended as an example of how to develop | |
5765 | 220 new plugins. It can not be used for anything useful from a users perspective |
4508 | 221 and is mentioned here for the sake of completeness only. Do not use this |
222 plugin unless you are a developer.</P> | |
223 | |
4913 | 224 <P><B><A NAME=2.3.2.2.5>2.3.2.2.5. Software volume control</A></B></P> |
225 | |
226 <P>This plugin is a software replacement for the volume control, and | |
5765 | 227 can be used on machines with a broken mixer device. It can also be |
228 used if one wants to change the output volume of <B>MPlayer</B> | |
4913 | 229 without changing the PCM volume setting in the mixer. It has one |
230 switch <CODE>volume</CODE> that is used for setting the initial | |
231 sound level. The initial sound level can be set to values between 0 | |
5099 | 232 and 255 and defaults to 101 which equals 0dB amplification. Use this |
233 plugin with caution since it can reduce the signal to noise ratio of | |
234 the sound. In most cases it is best to set the level for the PCM | |
235 sound to max, leave this plugin out and control the output level to | |
5765 | 236 your speakers with the master volume control of the mixer. If there is an |
5099 | 237 external amplifier connected to the computer (this is almost always |
238 the case), the noise level can be minimized by adjusting the master | |
239 level and the volume knob on the amplifier until the hissing noise | |
240 in the background is gone. | |
4913 | 241 </P> |
242 | |
5765 | 243 <P>Usage:<BR> |
4913 | 244 <CODE>mplayer media.avi -aop |
245 list=volume:volume=<0-255></CODE> | |
246 </P> | |
247 | |
5765 | 248 <P>This plugin also has compressor or "soft-clipping" capabilities. |
5099 | 249 Compression can be used if the dynamic range of the sound is very |
250 high or if the dynamic range of the loudspeakers is very | |
5765 | 251 low. Be aware that this feature creates distortion and should be |
5099 | 252 considered a last resort. |
253 </P> | |
254 | |
5765 | 255 <P>Usage:<BR> |
5099 | 256 <CODE>mplayer media.avi -aop |
257 list=volume:softclip</CODE> | |
258 </P> | |
4928
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
259 |
5109 | 260 |
5069 | 261 <P><B><A NAME=2.3.2.2.6>2.3.2.2.6. Extrastereo</A></B></P> |
4928
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
262 |
5765 | 263 <P>This plugin (linearly) increases the difference between left and right |
264 channels (like the XMMS extrastereo plugin) which gives some sort of "live" | |
265 effect to playback. | |
4928
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
266 </P> |
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
267 |
5765 | 268 <P>Usage:<BR> |
4928
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
269 <CODE>mplayer media.avi -aop list=extrastereo</CODE><BR> |
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
270 <CODE>mplayer media.avi -aop list=extrastereo:mul=3.45</CODE></P> |
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
271 |
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
272 <P>The default coefficient (<CODE>mul</CODE>) is a float number that defaults |
5765 | 273 to 2.5. If you set it to 0.0, you will have mono sound (average of both |
6272 | 274 channels). If you set it to 1.0, sound will be unchanged, if you set it to |
275 -1.0, left and right channels will be swapped.</P> | |
4928
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
276 |
5109 | 277 |
278 <P><B><A NAME=2.3.2.2.7>2.3.2.2.7. Volume normalizer</A></B></P> | |
279 | |
5765 | 280 <P>This plugin maximizes the volume without distorting the sound.</P> |
5109 | 281 |
5765 | 282 <P>Usage:<BR> |
5109 | 283 <CODE>mplayer media.avi -aop list=volnorm</CODE><BR> |
284 | |
5721 | 285 |
286 <P><B><A NAME=2.3.2.2.8>2.3.2.2.8. Surround</A></B></P> | |
287 | |
288 <P>Someone should document something, sometime.</P> | |
289 | |
1612 | 290 </BODY> |
291 </HTML> |