Mercurial > mplayer.hg
annotate DOCS/sound.html @ 8870:7538bf7e728d
halfpack now takes an optional argument, field, which tells it to keep
only even lines (if 0) or only odd lines (if 1) rather than averaging
pairs of lines. this may be useful for slightly improving performance
or for dirty deinterlacing.
author | rfelker |
---|---|
date | Fri, 10 Jan 2003 14:12:07 +0000 |
parents | 9476ccf6a41d |
children | 5b73c925436e |
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> |
6882
f3f87f6bf5cf
Added a uniform title: something - MPlayer - The Movie Player for Linux.
diego
parents:
6583
diff
changeset
|
5 <TITLE>Sound - MPlayer - The Movie Player for Linux</TITLE> |
6391 | 6 <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
|
7 <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
|
8 </HEAD> |
6cb9d9a1716d
HTML: different font handling - idea from new hp dezign
gabucino
parents:
4928
diff
changeset
|
9 |
6403
c0f189e49ee4
Background color now set by CSS, added doctype and default character set,
diego
parents:
6393
diff
changeset
|
10 <BODY> |
1704 | 11 |
1612 | 12 |
7047 | 13 <H3><A NAME="audio">2.3.2 Audio output devices</A></H3> |
1612 | 14 |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
15 <H4><A NAME="sync">2.3.2.1 Audio/Video synchronisation</A></H4> |
8177 | 16 |
7814 | 17 <P>MPlayer's audio interface is called <I>libao2</I>. It currently |
6974 | 18 contains these drivers:</P> |
1892 | 19 |
8751 | 20 <DL> |
21 <DT>oss</DT> | |
22 <DD>OSS (ioctl) driver (supports hardware AC3 passthrough)</DD> | |
23 | |
24 <DT>sdl</DT> | |
25 <DD>SDL driver (supports <B>ESD</B>, <B>ARTS</B> etc)</DD> | |
26 | |
27 <DT>nas</DT> | |
28 <DD>NAS (Network Audio System) driver</DD> | |
29 | |
30 <DT>alsa5</DT> | |
31 <DD>native ALSA 0.5 driver</DD> | |
32 | |
33 <DT>alsa9</DT> | |
34 <DD>native ALSA 0.9 driver (supports hardware AC3 passthrough)</DD> | |
35 | |
36 <DT>sun</DT> | |
37 <DD>SUN audio driver (<CODE>/dev/audio</CODE>) for BSD and Solaris8 users</DD> | |
38 | |
39 <DT>arts</DT> | |
40 <DD>native ARTS driver (mostly for KDE users)</DD> | |
41 | |
42 <DT>esd</DT> | |
43 <DD>native ESD driver (mostly for GNOME users)</DD> | |
44 </DL> | |
1612 | 45 |
8177 | 46 <P>Fact is, Linux sound card drivers have compatibility problems. The cause |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
47 is that MPlayer uses a feature that well coded audio drivers implement to |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
48 maintain audio/video sync. Regrettably, some driver authors do not care about |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
49 this function, it is not needed for playing MP3s or for sound effects.</P> |
8177 | 50 |
51 <P>Other media players like aviplay or xine possibly work out-of-the-box with | |
52 these drivers because they use "simple" methods with internal timing. A note: | |
53 time showed their methods aren't AS efficient as MPlayer's.</P> | |
54 | |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
55 <P>With a correctly written audio driver MPlayer will never create audio related |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
56 A/V desynchronisation, unless your file is badly broken. Some options to work |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
57 around these problems are described in the man page).</P> |
8177 | 58 |
59 <P>If you happen to have a bad audio driver, try the <CODE>-autosync</CODE> | |
60 option, it should sort out your problems. See the man page for detailed | |
61 information.</P> | |
62 | |
63 <P>Some notes:</P> | |
5765 | 64 |
65 <UL> | |
6960 | 66 <LI>If you have an OSS driver, first try <CODE>-ao oss</CODE> (this is the |
67 default). If you experience glitches, halts or anything out of the | |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
68 ordinary, try <CODE>-ao sdl</CODE> (NOTE: You need to have SDL libraries |
6960 | 69 and header files installed). The SDL audio driver helps in a lot of cases |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
70 and also supports ESD and ARTS. (ESD is the sound daemon |
6960 | 71 from GNOME, ARTS is from KDE.)</LI> |
72 <LI>If you have ALSA version 0.5, then you almost always have to use | |
73 <CODE>-ao alsa5</CODE> , since ALSA 0.5 has buggy OSS emulation code, and | |
74 will <B>crash MPlayer</B> with a message like this:<BR> | |
75 <CODE>DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!</CODE></LI> | |
5765 | 76 </UL> |
1892 | 77 |
8177 | 78 <P>On <B>Solaris</B>, use the SUN audio driver with the |
6960 | 79 <CODE>-ao sun</CODE> option, otherwise neither video nor audio will work.</P> |
1892 | 80 |
7047 | 81 |
8177 | 82 <H4><A NAME="experiences">2.3.2.2 Sound Card experiences, recommendations</A></H4> |
1612 | 83 |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
84 <TABLE BORDER="0" WIDTH="100%"> |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
85 <TR><TD COLSPAN=3><B>VIA onboard chipset (via82cxxx) 48kHz only</B></TD></TR> |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
86 <TR><TD></TD><TD>Driver:</TD><TD> from the |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
87 <A HREF="http://sourceforge.net/project/showfiles.php?group_id=3242&release_id=59602">gkernel project</A></TD></TR> |
3190 | 88 |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
89 <TR><TD COLSPAN=3><B>Aureal Vortex 2</B></TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
90 <TR><TD> </TD><TD>OSS:</TD><TD>no driver</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
91 <TR><TD></TD><TD>OSS/Pro:</TD><TD>OK</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
92 <TR><TD></TD><TD>ALSA:</TD><TD>no driver</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
93 <TR><TD></TD><TD>Max kHz:</TD><TD>48</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
94 <TR><TD></TD><TD>Driver:</TD><TD><A HREF="http://aureal.sourceforge.net">aureal.sourceforge.net</A></TD></TR> |
8751 | 95 <TR><TD></TD><TD>Driver2:</TD><TD> from <A HREF="http://makacs.poliod.hu/~pontscho/aureal/au88xx-1.1.3.tar.bz2">Pontscho's page</A> |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
96 (<I>buffer size increased to 32k</I>)</TD></TR> |
1612 | 97 |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
98 <TR><TD COLSPAN=3><B>GUS PnP</B></TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
99 <TR><TD></TD><TD>OSS:</TD><TD>no driver</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
100 <TR><TD></TD><TD>OSS/Pro:</TD><TD>OK</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
101 <TR><TD></TD><TD>ALSA:</TD><TD>OK</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
102 <TR><TD></TD><TD>Max kHz:</TD><TD>48</TD></TR> |
1682 | 103 |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
104 <TR><TD COLSPAN=3><B>SB Live!</B></TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
105 <TR><TD></TD><TD>OSS:</TD><TD>Analog OK, SP/DIF not working</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
106 <TR><TD></TD><TD>ALSA:</TD><TD>Both OK</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
107 <TR><TD></TD><TD>Max kHz:</TD><TD>192</TD></TR> |
1612 | 108 |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
109 <TR><TD COLSPAN=3><B>SB AWE 64</B></TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
110 <TR><TD></TD><TD>OSS:</TD><TD>max 44kHz</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
111 <TR><TD></TD><TD>ALSA:</TD><TD>48kHz sounds bad</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
112 <TR><TD></TD><TD>Max kHz:</TD><TD>48</TD></TR> |
1892 | 113 |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
114 <TR><TD COLSPAN=3><B>Gravis UltraSound ACE</B></TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
115 <TR><TD></TD><TD>OSS:</TD><TD>not OK</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
116 <TR><TD></TD><TD>ALSA:</TD><TD>OK</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
117 <TR><TD></TD><TD>Max kHz:</TD><TD>44</TD></TR> |
1612 | 118 |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
119 <TR><TD COLSPAN=3><B>Gravis UltraSound MAX</B></TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
120 <TR><TD></TD><TD>OSS:</TD><TD>OK</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
121 <TR><TD></TD><TD>ALSA:</TD><TD>OK (?)</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
122 <TR><TD></TD><TD>Max kHz:</TD><TD>48</TD></TR> |
1612 | 123 |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
124 <TR><TD COLSPAN=3><B>ESS 688</B></TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
125 <TR><TD></TD><TD>OSS:</TD><TD>OK</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
126 <TR><TD></TD><TD>ALSA:</TD><TD>OK (?)</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
127 <TR><TD></TD><TD>Max kHz:</TD><TD>48</TD></TR> |
1612 | 128 |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
129 <TR><TD COLSPAN=3><B>C-Media cards (which ones?)</B></TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
130 <TR><TD></TD><TD>OSS:</TD><TD>not OK (hissing) (?)</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
131 <TR><TD></TD><TD>ALSA:</TD><TD>OK (?)</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
132 <TR><TD></TD><TD>Max kHz:</TD><TD>?</TD></TR> |
1612 | 133 |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
134 <TR><TD COLSPAN=3><B>Yamaha cards (*ymf*)</B></TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
135 <TR><TD></TD><TD>OSS:</TD><TD>not OK (?) (maybe <CODE>-ao sdl</CODE>)</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
136 <TR><TD></TD><TD>ALSA:</TD><TD>OK only with ALSA 0.5 with OSS emulation <B>AND</B> <CODE>-ao sdl</CODE> (!) (?)</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
137 <TR><TD></TD><TD>Max kHz:</TD><TD>?</TD></TR> |
1612 | 138 |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
139 <TR><TD COLSPAN=3><B>Cards with envy24 chips (like Terratec EWS88MT)</B></TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
140 <TR><TD></TD><TD>OSS:</TD><TD>?</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
141 <TR><TD></TD><TD>OSS/Pro:</TD><TD>OK</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
142 <TR><TD></TD><TD>ALSA:</TD><TD>?</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
143 <TR><TD></TD><TD>Max kHz:</TD><TD>?</TD></TR> |
3438 | 144 |
6975
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
145 <TR><TD COLSPAN=3><B>PC Speaker or DAC</B></TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
146 <TR><TD></TD><TD>OSS:</TD><TD>OK (Use the SDL driver: <CODE>-ao sdl</CODE>)</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
147 <TR><TD></TD><TD>ALSA:</TD><TD>no driver</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
148 <TR><TD></TD><TD>Max kHz:</TD><TD>The driver emulates 44.1, maybe more.</TD></TR> |
d2cdfb831265
Sanitize a HTML table, <TR> are at the proper place and get closed.
diego
parents:
6974
diff
changeset
|
149 <TR><TD></TD><TD>Driver:</TD><TD><A HREF="ftp://ftp.infradead.org/pub/pcsp">ftp://ftp.infradead.org/pub/pcsp</A></TD></TR> |
5765 | 150 </TABLE> |
1612 | 151 |
7099
0b70f3dc34eb
Applied patch by Andras Mohari <mayday@varoshaza.nagyatad.hu>, with some
diego
parents:
7076
diff
changeset
|
152 <P>On Linux, a 2.4.x kernel is highly recommended. Kernel 2.2 is not tested.</P> |
0b70f3dc34eb
Applied patch by Andras Mohari <mayday@varoshaza.nagyatad.hu>, with some
diego
parents:
7076
diff
changeset
|
153 |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
154 <P>If the sound clicks when playing from CD-ROM, turn on IRQ unmasking, e.g. |
7099
0b70f3dc34eb
Applied patch by Andras Mohari <mayday@varoshaza.nagyatad.hu>, with some
diego
parents:
7076
diff
changeset
|
155 <CODE>hdparm -u1 /dev/cdrom</CODE> (<CODE>man hdparm</CODE>). This is |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
156 generally beneficial and described in more detail in the |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
157 <A HREF="cd-dvd.html#drives">CD-ROM section</A>.</P> |
7099
0b70f3dc34eb
Applied patch by Andras Mohari <mayday@varoshaza.nagyatad.hu>, with some
diego
parents:
7076
diff
changeset
|
158 |
7814 | 159 <P>Feedback to this document is welcome. Please tell us how MPlayer |
7099
0b70f3dc34eb
Applied patch by Andras Mohari <mayday@varoshaza.nagyatad.hu>, with some
diego
parents:
7076
diff
changeset
|
160 and your sound card(s) worked together.</P> |
1612 | 161 |
3671 | 162 |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
163 <H4><A NAME="af">2.3.2.3 Audio filters</A></H4> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
164 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
165 <P>The old audio plugins have been superseded by a new audio filter layer. Audio |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
166 filters are used for changing the properties of the audio data before the |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
167 sound reaches the sound card. The activation and deactivation of the filters |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
168 is normally automated but can be overridden. The filters are activated when |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
169 the properties of the audio data differ from those required by the sound card |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
170 and deactivated if unnecessary. The <CODE>-af filter1,filter2,...</CODE> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
171 switch is used to override the automatic activation of filters or to insert |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
172 filters that are not automatically inserted. The filters will be executed as |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
173 they appear in the comma separated list.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
174 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
175 <P>Example:<BR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
176 <CODE>mplayer -af resample,pan movie.avi </CODE></P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
177 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
178 <P>would run the sound through the resampling filter followed by the pan filter. |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
179 Observe that the list must not contain any spaces, else it will fail.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
180 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
181 <P>The filters often have switches that change their behavior. These switches |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
182 are explained in detail in the sections below. A filter will execute using |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
183 default settings if its switches are omitted. Here is an example of how to use |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
184 filters in combination with filter specific switches:</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
185 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
186 <P> <CODE>mplayer -af resample=11025,pan=1:0.5:0.5 -channels 1 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
187 -srate 11025 media.avi</CODE></P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
188 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
189 <P>would set the output frequency of the resample filter to 11025Hz and downmix |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
190 the audio to 1 channel using the pan filter.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
191 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
192 <P>Most filters respond to the <CODE>-v</CODE> switch, which makes the filters |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
193 print out status messages.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
194 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
195 <P>The overall execution of the filter layer is controlled using the |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
196 <CODE>-af-adv</CODE> switch. This switch has two suboptions:</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
197 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
198 <DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
199 <DT><CODE>force</CODE><DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
200 <DD>is an integer between 0 and 3 that controls how the filters are inserted |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
201 and what speed/accuracy optimizations they use: |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
202 <DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
203 <DT>0</DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
204 <DD>Use automatic insertion of filters and optimize according to CPU |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
205 speed.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
206 <DT>1</DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
207 <DD>Use automatic insertion of filters and optimize for the highest speed. |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
208 If this option is set the processing of the audio data will be done |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
209 using fix point arithmetics. Warning: Some features in the audio filters |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
210 will silently fail, and the sound quality may drop.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
211 <DT>2</DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
212 <DD>Use automatic insertion of filters and optimize for quality. If this |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
213 option is set the processing of the audio data will be done using |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
214 floating point instructions and is therefore quite CPU intensive, but |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
215 gives a lot higher sound quality than fix point processing.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
216 <DT>3</DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
217 <DD>Use no automatic insertion of filters and no optimization. Warning: It |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
218 may be possible to crash MPlayer using this setting.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
219 </DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
220 </DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
221 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
222 <DT><CODE>list</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
223 <DD>is an alias for the -af switch.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
224 </DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
225 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
226 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
227 <H5><A NAME="af_resample">2.3.2.3.1 Up/Down-sampling</A></H5> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
228 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
229 <P>MPlayer fully supports sound up/down-sampling. This filter can be used if you |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
230 have a fixed frequency sound card or if you are stuck with an old sound card |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
231 that is only capable of max 44.1kHz. This filter is automatically enabled if |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
232 it is necessary, but it can also be explicitly enabled on the command line. It |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
233 has three switches:</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
234 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
235 <DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
236 <DT><CODE>srate</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
237 <DD>is an integer used for setting the output sample |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
238 frequency in Hz. The valid range for this parameter is 8kHz to 192kHz. If |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
239 the input and output sample frequency are the same or if this parameter is |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
240 omitted the filter is automatically unloaded. A high sample frequency |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
241 normally improves the audio quality, especially when used in combination |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
242 with other filters.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
243 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
244 <DT><CODE>sloppy</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
245 <DD>is an optional binary parameter that allows the output frequency to differ |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
246 slightly from the frequency given by <CODE>srate</CODE>. This switch can be |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
247 used if the startup of the playback is extremely slow.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
248 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
249 <DT><CODE>fast</CODE><DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
250 <DD>is an optional binary parameter that enables linear interpolation as |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
251 resampling method. Linear interpolation is extremely fast, but suffers from |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
252 poor sound quality especially when used for up-sampling.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
253 </DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
254 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
255 <P>Example:<BR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
256 <CODE>mplayer -af resample=44100:0:1</CODE></P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
257 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
258 <P>would set the output frequency of the resample filter to 44100Hz using exact |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
259 output frequency scaling and linear interpolation.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
260 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
261 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
262 <H5><A NAME="af_channels">2.3.2.3.2 Changing the number of channels</A></H5> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
263 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
264 <P>The <CODE>channels</CODE> filter can be used for adding and removing |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
265 channels, it can also be used for routing or copying channels. It is |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
266 automatically enabled when the output from the audio filter layer differs from |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
267 the input layer or when it is requested by another filter. This filter unloads |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
268 itself if not needed. The number of switches is dynamic:</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
269 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
270 <DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
271 <DT><CODE>nch</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
272 <DD>is an integer between 1 and 6 that is used for setting the number of |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
273 output channels. This switch is required, leaving it empty results in a |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
274 runtime error.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
275 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
276 <DT><CODE>nr</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
277 <DD>is an integer between 1 and 6 that is used for specifying the number of |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
278 routes. This parameter is optional. If it is omitted the default routing is |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
279 used.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
280 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
281 <DT><CODE>from1:to1:from2:to2:from3:to3...</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
282 <DD>are pairs of numbers between 0 and 5 that define where each channel should |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
283 be routed.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
284 </DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
285 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
286 <P>If only <CODE>nch</CODE> is given the default routing is used, it works as |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
287 follows: If the number of output channels is bigger than the number of input |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
288 channels empty channels are inserted (except mixing from mono to stereo, then |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
289 the mono channel is repeated in both of the output channels). If the number of |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
290 output channels is smaller than the number of input channels the exceeding |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
291 channels are truncated.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
292 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
293 <P>Example 1:<BR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
294 <CODE>mplayer -af channels=4:4:0:1:1:0:2:2:3:3 media.avi </CODE></P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
295 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
296 <P>would change the number of channels to 4 and set up 4 routes that swap |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
297 channel 0 and channel 1 and leave channel 2 and 3 intact. Observe that if |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
298 media containing two channels was played back, channels 2 and 3 would contain |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
299 silence but 0 and 1 would still be swapped.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
300 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
301 <P>Example 2:<BR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
302 <CODE>mplayer -af channels=6:4:0:0:0:1:0:2:0:3 media.avi </CODE></P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
303 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
304 <P>would change the number of channels to 6 and set up 4 routes that copy |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
305 channel 0 to channels 0 to 3. Channel 4 and 5 will contain silence.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
306 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
307 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
308 <H5><A NAME="af_format">2.3.2.3.3 Sample format converter</A></H5> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
309 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
310 <P>This filter is a sample format converter. It is automatically enabled when |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
311 needed by the sound card or another filter.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
312 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
313 <DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
314 <DT><CODE>bps</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
315 <DD>can be 1, 2 or 4 and denotes the number of bytes per sample. This switch |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
316 is required, leaving it empty results in a runtime error.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
317 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
318 <DT><CODE>f</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
319 <DD>is a text string describing the sample format. The string is a |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
320 concatenated mix of: <CODE>alaw</CODE>, <CODE>mulaw</CODE> or |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
321 <CODE>imaadpcm</CODE>, <CODE>float</CODE> or <CODE>int</CODE>, |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
322 <CODE>unsigned</CODE> or <CODE>signed</CODE>, <CODE>le</CODE> or |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
323 <CODE>be</CODE> (little or big endian). This switch is required, leaving it |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
324 empty results in a runtime error.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
325 </DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
326 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
327 <P>Example:<BR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
328 <CODE>mplayer media.avi -af format=4:float</CODE></P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
329 |
8772 | 330 <P>would set the output format to 4 bytes per sample floating point |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
331 data.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
332 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
333 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
334 <H5><A NAME="af_delay">2.3.2.3.4 Delay</A></H5> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
335 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
336 <P>This filter delays the sound to the loudspeakers in order to make the sound |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
337 in the different channels arrive at the same time to the listening position. |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
338 It is only useful if you have more than 2 loudspeakers. This filter has a |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
339 variable number of parameters:</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
340 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
341 <DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
342 <DT><CODE>d1:d2:d3...</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
343 <DD>are floating point numbers representing the delays in ms that should be |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
344 imposed on the different channels. The minimum delay is 0ms and the maximum |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
345 is 1000ms.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
346 </DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
347 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
348 <P>To calculate the required delay for the different channels do as follows:</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
349 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
350 <OL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
351 <LI>Measure the distance to the loudspeakers in meters in relation to your |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
352 listening position, giving you the distances s1 to s5 (for a 5.1 system). |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
353 There is no point in compensating for the sub-woofer (you will not hear the |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
354 difference anyway).</LI> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
355 <LI>Subtract the distances s1 to s5 from the maximum distance i.e.<BR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
356 s[i] = max(s) - s[i]; i = 1...5</LI> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
357 <LI>Calculated the required delays in ms as<BR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
358 d[i] = 1000*s[i]/342; i = 1...5 </LI> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
359 </OL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
360 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
361 <P>Example:<BR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
362 <CODE>mplayer -af delay=10.5:10.5:0:0:7:0 media.avi</CODE></P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
363 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
364 <P>would delay front left and right by 10.5ms, the two rear channels and the sub |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
365 by 0ms and the center channel by 7ms.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
366 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
367 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
368 <H5><A NAME="af_volume">2.3.2.3.5 Software volume control</A></H5> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
369 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
370 <P>This filter is a software volume control. Use this filter with caution since |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
371 it can reduce the signal to noise ratio of the sound. In most cases it is best |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
372 to set the level for the PCM sound to max, leave this filter out and control |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
373 the output level to your speakers with the master volume control of the mixer. |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
374 If there is an external amplifier connected to the computer (this is almost |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
375 always the case), the noise level can be minimized by adjusting the master |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
376 level and the volume knob on the amplifier until the hissing noise in the |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
377 background is gone. This filter has two switches:</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
378 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
379 <DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
380 <DT><CODE>v</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
381 <DD>is a floating point number between -200 and +60 which represents the |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
382 volume level in dB. The default level is -10dB.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
383 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
384 <DT><CODE>c</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
385 <DD>is a binary control that turns soft clipping on and off. Soft-clipping can |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
386 make the sound more smooth if very high volume levels are used. Enable this |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
387 switch if the dynamic range of the loudspeakers is very low. Be aware that |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
388 this feature creates distortion and should be considered a last resort.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
389 </DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
390 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
391 <P>Example:<BR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
392 <CODE>mplayer -af volume=10.1:0 media.avi</CODE></P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
393 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
394 <P>would amplify the sound by 10.1dB and hard-clip if the sound level is too |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
395 high.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
396 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
397 <P>This filter has a second feature: It measures the overall maximum sound level |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
398 and prints out that level when MPlayer exits. This volume estimate can be used |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
399 for setting the sound level in MEncoder such that the maximum dynamic range is |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
400 utilized.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
401 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
402 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
403 <H5><A NAME="af_equalizer">2.3.2.3.6 Equalizer</A></H5> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
404 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
405 <P> This filter is a 10 octave band graphic equalizer, implemented using 10 IIR |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
406 band pass filters. This means that it works regardless of what type of audio |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
407 is being played back. The center frequencies for the 10 bands are:</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
408 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
409 <TABLE BORDER="0" WIDTH="100%"> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
410 <TR><TD>Band No.</TD><TD>Center frequency</TD></TR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
411 <TR><TD>0</TD><TD>31.25 Hz</TD></TR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
412 <TR><TD>1</TD><TD>62.50 Hz</TD></TR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
413 <TR><TD>2</TD><TD>125.0 Hz</TD></TR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
414 <TR><TD>3</TD><TD>250.0 Hz</TD></TR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
415 <TR><TD>4</TD><TD>500.0 Hz</TD></TR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
416 <TR><TD>5</TD><TD>1.000 kHz</TD></TR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
417 <TR><TD>6</TD><TD>2.000 kHz</TD></TR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
418 <TR><TD>7</TD><TD>4.000 kHz</TD></TR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
419 <TR><TD>8</TD><TD>8.000 kHz</TD></TR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
420 <TR><TD>9</TD><TD>16.00 kHz</TD></TR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
421 </TABLE> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
422 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
423 <P>If the sample rate of the sound being played back is lower than the center |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
424 frequency for a frequency band, then that band will be disabled. A known bug |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
425 with this filter is that the characteristics for the uppermost band are not |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
426 completely symmetric if the sample rate is close to the center frequency of |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
427 that band. This problem can be worked around by up-sampling the sound using |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
428 the resample filter before it reaches this filter. </P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
429 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
430 <P> This filter has 10 parameters:</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
431 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
432 <DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
433 <DT><CODE>g1:g2:g3...g10</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
434 <DD>are floating point numbers between -12 to +12dB representing the gain in |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
435 dB for each frequency band.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
436 </DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
437 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
438 <P>Example:<BR> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
439 <CODE>mplayer -af equalizer=11:11:10:5:0:-12:0:5:12:12 media.avi</CODE></P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
440 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
441 <P>would amplify the sound in the upper and lower frequency region while |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
442 canceling it almost completely around 1kHz.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
443 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
444 <H5><A NAME="af_panning">2.3.2.3.7 Panning filter </A></H5> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
445 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
446 <P>This filter can be used for mixing the channels arbitrarily. It is basically |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
447 a combination of the volume control and the channels filter. There are two |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
448 major uses for this filter: </P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
449 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
450 <OL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
451 <LI>Down-mixing many channels to only a few, stereo to mono for example.</LI> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
452 <LI>Varying the "width" of the center speaker in a surround sound system.</LI> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
453 </OL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
454 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
455 <P>This filter is hard to use, and will require some tinkering before the |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
456 desired result is obtained. The number of switches for this filter depends on |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
457 the number of output channels:</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
458 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
459 <DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
460 <DT><CODE>nch</CODE></DT> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
461 <DD>is an integer between 1 and 6 and is used for setting the number of output |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
462 channels. This switch is required, leaving it empty results in a runtime |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
463 error.</DD> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
464 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
465 <DT><CODE>l00:l01:l02:..l10:l11:l12:...ln0:ln1:ln2:...</CODE></DT> |
8757 | 466 <DD>are floating point values between 0 and 1. <CODE>l[i][j]</CODE> determines |
467 how much of input channel j is mixed into output channel i.</DD> | |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
468 </DL> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
469 |
8849 | 470 <P>Example 1:<BR> |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
471 <CODE>mplayer -af pan=1:0.5:0.5 -channels 1 media.avi</CODE></P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
472 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
473 <P>would down-mix from stereo to mono.</P> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
474 |
8849 | 475 <P>Example 2:<BR> |
476 <CODE>mplayer -af pan=3:1:0:1:0.5:0.5 -channels 3 media.avi</CODE></P> | |
477 | |
478 <P>would give 3 channel output leaving channels 0 and 1 intact, and mix channels | |
479 0 and 1 into output channel 2 (which could be sent to a sub-woofer for | |
480 example).</P> | |
481 | |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
482 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
483 <H2><STRONG>Note: Audio plugins have been deprecated by audio filters and will be |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
484 removed soon.</STRONG></H2> |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
485 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
486 <H4><A NAME="plugins">2.3.2.4 Audio plugins (deprecated)</A></H4> |
3671 | 487 |
7814 | 488 <P>MPlayer has support for audio plugins. Audio plugins can be used for |
4508 | 489 changing the properties of the audio data before the sound reaches the sound |
5765 | 490 card. They are enabled using the <CODE>-aop</CODE> switch which takes a |
491 <CODE>list=plugin1,plugin2,...</CODE> argument. The <CODE>list</CODE> argument | |
492 is required and determines which plugins should be used and in which order they | |
6974 | 493 should be executed. Example:</P> |
4508 | 494 |
495 <P> <CODE>mplayer media.avi -aop list=resample,format</CODE></P> | |
496 | |
497 <P>would run the sound through the resampling plugin followed by the format | |
6974 | 498 plugin.</P> |
4508 | 499 |
5765 | 500 <P>The plugins can also have switches that change their behavior. These |
4508 | 501 switches are explained in detail in the sections below. A plugin will execute |
5765 | 502 using default settings if its switches are omitted. Here is an example of how |
6974 | 503 to use plugins in combination with plugin specific switches:</P> |
4508 | 504 |
505 <P> <CODE>mplayer media.avi -aop | |
6974 | 506 list=resample,format:fout=44100:format=0x8</CODE></P> |
4508 | 507 |
508 <P>would set the output frequency of the resample plugin to 44100Hz and the | |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
509 output format of the format plugin to AFMT_U8.</P> |
4508 | 510 |
7814 | 511 <P>Currently audio plugins can not be used in MEncoder.</P> |
4508 | 512 |
513 | |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
514 <H5><A NAME="resample">2.3.2.4.1 Up/Downsampling</A></H5> |
3671 | 515 |
7814 | 516 <P>MPlayer fully supports up/downsampling of the sound. This plugin can |
5765 | 517 be used if you have a fixed frequency sound card or if you are |
518 stuck with an old sound card that is only capable of max 44.1kHz. | |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
519 Whether is usage of this plugin is necessary or not, is <B>autodetected</B>. |
8260 | 520 This plugin has one switch: |
4508 | 521 <CODE>fout</CODE> which is used for setting the desired output sample |
5765 | 522 frequency. It defaults to 48kHz, and is given in |
6974 | 523 <Hz>.</P> |
3671 | 524 |
5765 | 525 <P>Usage:<BR> |
6974 | 526 <CODE>mplayer media.avi -aop list=resample:fout=<required |
3671 | 527 frequency in Hz, like 44100></CODE></P> |
528 | |
5765 | 529 <P>Note that the output frequency should not be scaled up from the default value. |
530 Scaling up will cause the audio and video streams to be played in slow motion | |
531 in addition to audio distortion.</P> | |
3671 | 532 |
6974 | 533 |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
534 <H5><A NAME="surround_decoding">2.3.2.4.2 Surround Sound decoding</A></H5> |
3931 | 535 |
7814 | 536 <P>MPlayer has an audio plugin that can decode matrix encoded |
6974 | 537 surround sound. Dolby Surround is an example of a matrix encoded format. |
538 Many files with 2 channel audio actually contain matrixed surround sound. | |
539 To use this feature you need a sound card supporting at least 4 channels.</P> | |
3931 | 540 |
5765 | 541 <P>Usage:<BR> |
6974 | 542 <CODE>mplayer media.avi -aop list=surround</CODE></P> |
3931 | 543 |
4508 | 544 |
8177 | 545 <H5><A NAME="format">2.3.2.3.3 Sample format converter</A></H5> |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
546 |
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
547 <P>If your sound card driver does not support signed 16bit <CODE>int</CODE> data type, |
5765 | 548 this plugin can |
4508 | 549 be used to change the format to one which your sound card can understand. It |
5765 | 550 has one switch, <CODE>format</CODE>, which can be set to one of the numbers |
551 found in <CODE>libao2/afmt.h</CODE>. This plugin is hardly ever needed and is | |
552 intended for advanced users. Keep in mind that this plugin only changes the | |
6974 | 553 sample format and not the sample frequency or the number of channels.</P> |
4508 | 554 |
5765 | 555 <P>Usage:<BR> |
4508 | 556 <CODE>mplayer media.avi -aop |
6974 | 557 list=format:format=<required output format></CODE></P> |
4508 | 558 |
559 | |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
560 <H5><A NAME="delay">2.3.2.4.4 Delay</A></H5> |
4508 | 561 |
562 <P>This plugin delays the sound and is intended as an example of how to develop | |
5765 | 563 new plugins. It can not be used for anything useful from a users perspective |
4508 | 564 and is mentioned here for the sake of completeness only. Do not use this |
565 plugin unless you are a developer.</P> | |
566 | |
7047 | 567 |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
568 <H5><A NAME="volume">2.3.2.4.5 Software volume control</A></H5> |
4913 | 569 |
570 <P>This plugin is a software replacement for the volume control, and | |
5765 | 571 can be used on machines with a broken mixer device. It can also be |
7814 | 572 used if one wants to change the output volume of MPlayer |
4913 | 573 without changing the PCM volume setting in the mixer. It has one |
574 switch <CODE>volume</CODE> that is used for setting the initial | |
575 sound level. The initial sound level can be set to values between 0 | |
5099 | 576 and 255 and defaults to 101 which equals 0dB amplification. Use this |
577 plugin with caution since it can reduce the signal to noise ratio of | |
578 the sound. In most cases it is best to set the level for the PCM | |
579 sound to max, leave this plugin out and control the output level to | |
5765 | 580 your speakers with the master volume control of the mixer. If there is an |
5099 | 581 external amplifier connected to the computer (this is almost always |
582 the case), the noise level can be minimized by adjusting the master | |
583 level and the volume knob on the amplifier until the hissing noise | |
6974 | 584 in the background is gone.</P> |
4913 | 585 |
5765 | 586 <P>Usage:<BR> |
4913 | 587 <CODE>mplayer media.avi -aop |
6974 | 588 list=volume:volume=<0-255></CODE></P> |
4913 | 589 |
5765 | 590 <P>This plugin also has compressor or "soft-clipping" capabilities. |
5099 | 591 Compression can be used if the dynamic range of the sound is very |
592 high or if the dynamic range of the loudspeakers is very | |
5765 | 593 low. Be aware that this feature creates distortion and should be |
6974 | 594 considered a last resort.</P> |
5099 | 595 |
5765 | 596 <P>Usage:<BR> |
5099 | 597 <CODE>mplayer media.avi -aop |
6974 | 598 list=volume:softclip</CODE></P> |
4928
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
599 |
5109 | 600 |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
601 <H5><A NAME="extrastereo">2.3.2.4.6 Extrastereo</A></H5> |
4928
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
602 |
5765 | 603 <P>This plugin (linearly) increases the difference between left and right |
604 channels (like the XMMS extrastereo plugin) which gives some sort of "live" | |
6974 | 605 effect to playback.</P> |
4928
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
606 |
5765 | 607 <P>Usage:<BR> |
4928
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
608 <CODE>mplayer media.avi -aop list=extrastereo</CODE><BR> |
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
609 <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
|
610 |
ecf9f93dd9b6
added documentation for "extrastereo" plugin (patch by pl)
gabucino
parents:
4913
diff
changeset
|
611 <P>The default coefficient (<CODE>mul</CODE>) is a float number that defaults |
5765 | 612 to 2.5. If you set it to 0.0, you will have mono sound (average of both |
6272 | 613 channels). If you set it to 1.0, sound will be unchanged, if you set it to |
614 -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
|
615 |
5109 | 616 |
8750
f6323ff433aa
New audio filter documentation by Anders Johannsson with some structural
diego
parents:
8260
diff
changeset
|
617 <H5><A NAME="normalizer">2.3.2.4.7 Volume normalizer</A></H5> |
5109 | 618 |
5765 | 619 <P>This plugin maximizes the volume without distorting the sound.</P> |
5109 | 620 |
5765 | 621 <P>Usage:<BR> |
5109 | 622 <CODE>mplayer media.avi -aop list=volnorm</CODE><BR> |
623 | |
5721 | 624 |
1612 | 625 </BODY> |
626 </HTML> |