2003-03-23 23:35:12 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2003-09-21 13:05:42 +00:00
|
|
|
<!-- $Revision$ -->
|
2004-11-11 02:09:15 +00:00
|
|
|
<sect1 id="audio">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Audio output devices</title>
|
2004-11-11 02:09:15 +00:00
|
|
|
<sect2 id="sync">
|
2005-01-10 00:34:39 +00:00
|
|
|
<title>Audio/Video synchronization</title>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
|
|
|
<para>
|
|
|
|
Linux sound card drivers have compatibility problems. This is because
|
|
|
|
<application>MPlayer</application> relies on an in-built feature of
|
|
|
|
<emphasis>properly</emphasis> coded sound drivers that enable them to
|
|
|
|
maintain correct audio/video sync. Regrettably, some driver authors
|
|
|
|
don't take the care to code this feature since it is not needed for
|
|
|
|
playing MP3s or sound effects.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2004-11-19 12:03:41 +00:00
|
|
|
Other media players like <ulink url="http://avifile.sf.net">aviplay</ulink>
|
|
|
|
or <ulink url="http://xinehq.de">xine</ulink> possibly work
|
2003-03-23 23:35:12 +00:00
|
|
|
out-of-the-box with these drivers because they use "simple" methods
|
|
|
|
with internal timing. Measuring showed that their methods are not as
|
|
|
|
efficient as <application>MPlayer</application>'s.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Using <application>MPlayer</application> with a properly written audio
|
|
|
|
driver will never result in A/V desyncs related to the audio, except
|
|
|
|
only with very badly created files (check the man page for workarounds).
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If you happen to have a bad audio driver, try the <option>-autosync</option>
|
|
|
|
option, it should sort out your problems. See the man page for detailed
|
|
|
|
information.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<itemizedlist>
|
|
|
|
<title>Some notes:</title>
|
|
|
|
<listitem><para>
|
|
|
|
If you have an OSS driver, first try <option>-ao oss</option> (this is
|
|
|
|
the default). If you experience glitches, halts or anything out of the
|
|
|
|
ordinary, try <option>-ao sdl</option> (NOTE: you need to have SDL libraries
|
|
|
|
and header files installed). The SDL audio driver helps in a lot of cases
|
|
|
|
and also supports ESD (GNOME) and ARTS (KDE).
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
If you have ALSA version 0.5, then you almost always have to use
|
|
|
|
<option>-ao alsa5</option>, since ALSA 0.5 has buggy OSS emulation code,
|
|
|
|
and will <emphasis role="bold">crash <application>MPlayer</application></emphasis>
|
|
|
|
with a message like this:
|
|
|
|
<screen>
|
|
|
|
DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!<!--
|
|
|
|
--></screen>
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
On Solaris, use the SUN audio driver with the <option>-ao sun</option> option,
|
|
|
|
otherwise neither video nor audio will work.
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
If the sound clicks when playing from CD-ROM, turn on IRQ unmasking, e.g.
|
|
|
|
<command>hdparm -u1 /dev/cdrom</command> (<command>man hdparm</command>).
|
|
|
|
This is generally beneficial and described in more detail in the
|
2003-11-16 19:55:53 +00:00
|
|
|
<link linkend="drives">CD-ROM</link> section.
|
2003-03-23 23:35:12 +00:00
|
|
|
</para></listitem>
|
|
|
|
</itemizedlist>
|
2004-11-11 02:09:15 +00:00
|
|
|
</sect2>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
2004-11-11 02:09:15 +00:00
|
|
|
<sect2 id="experiences">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Soundcard experiences, recommendations</title>
|
|
|
|
<para>
|
|
|
|
On Linux, a 2.4.x kernel is highly recommended. Kernel 2.2 is not tested.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Linux sound drivers are primarily provided by the free version of OSS.
|
2003-10-26 14:58:17 +00:00
|
|
|
These drivers have been superseded by <ulink url="http://www.alsa-project.org">ALSA</ulink>
|
2003-03-23 23:35:12 +00:00
|
|
|
(Advanced Linux Sound Architecture) in the 2.5 development series. If
|
|
|
|
your distribution does not already use ALSA you may wish to try their
|
|
|
|
drivers if you experience sound problems. ALSA drivers are generally
|
|
|
|
superior to OSS in compatibility, performance and features. But some
|
|
|
|
sound cards are only supported by the commercial OSS drivers from
|
|
|
|
<ulink url="http://www.opensound.com/">4Front Technologies</ulink>.
|
|
|
|
They also support several non-Linux systems.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="8">
|
|
|
|
<colspec colname="c1"/>
|
|
|
|
<colspec colname="c2"/>
|
|
|
|
<colspec colname="c3"/>
|
|
|
|
<colspec colname="c4"/>
|
|
|
|
<colspec colname="c5"/>
|
|
|
|
<colspec colname="c6"/>
|
|
|
|
<colspec colname="c7"/>
|
|
|
|
<colspec colname="c8"/>
|
|
|
|
<spanspec spanname="driver" namest="c2" nameend="c5"/>
|
|
|
|
<spanspec spanname="ossfree" namest="c2" nameend="c2"/>
|
|
|
|
<spanspec spanname="alsa" namest="c3" nameend="c3"/>
|
|
|
|
<spanspec spanname="osspro" namest="c4" nameend="c4"/>
|
|
|
|
<spanspec spanname="others" namest="c5" nameend="c5"/>
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry morerows="2" valign="middle">SOUND CARD</entry>
|
|
|
|
<entry spanname="driver">DRIVER</entry>
|
|
|
|
<entry morerows="2" valign="middle">Max kHz</entry>
|
|
|
|
<entry morerows="2" valign="middle">Max Channels</entry>
|
|
|
|
<entry morerows="2" valign="middle">Max Opens
|
|
|
|
<footnote id="maxopens">
|
|
|
|
<para>the number of applications that are able to use
|
|
|
|
the device <emphasis>at the same time</emphasis>.</para>
|
|
|
|
</footnote>
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry spanname="ossfree">OSS/Free</entry>
|
|
|
|
<entry spanname="alsa">ALSA</entry>
|
|
|
|
<entry spanname="osspro">OSS/Pro</entry>
|
|
|
|
<entry spanname="others">other</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
<row>
|
|
|
|
<entry>VIA onboard (686/A/B, 8233, 8235)</entry>
|
|
|
|
<entry>
|
2004-11-19 12:03:41 +00:00
|
|
|
<ulink url="http://sf.net/project/showfiles.php?group_id=3242&release_id=59602">via82cxxx_audio</ulink>
|
2003-03-23 23:35:12 +00:00
|
|
|
</entry>
|
|
|
|
<entry>snd-via82xx</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry>4-48 kHz or 48 kHz only, depending on the chipset</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry>Aureal Vortex 2</entry>
|
|
|
|
<entry>none</entry>
|
|
|
|
<entry>none</entry>
|
|
|
|
<entry>OK</entry>
|
|
|
|
<entry>
|
2004-11-19 12:03:41 +00:00
|
|
|
<ulink url="http://aureal.sf.net">Linux Aureal Drivers</ulink>
|
2003-03-23 23:35:12 +00:00
|
|
|
<ulink url="http://makacs.poliod.hu/~pontscho/aureal/au88xx-1.1.3.tar.bz2">buffer size increased to 32k</ulink>
|
|
|
|
</entry>
|
|
|
|
<entry>48</entry>
|
|
|
|
<entry>4.1</entry>
|
|
|
|
<entry>5+</entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry>SB Live!</entry>
|
2004-05-01 12:03:03 +00:00
|
|
|
<entry>Analog OK, S/PDIF not working</entry>
|
2003-03-23 23:35:12 +00:00
|
|
|
<entry>Both OK</entry>
|
|
|
|
<entry>Both OK</entry>
|
|
|
|
<entry>
|
2004-05-01 12:03:03 +00:00
|
|
|
<ulink url="http://opensource.creative.com">Creative's OSS driver (S/PDIF support)</ulink>
|
2003-03-23 23:35:12 +00:00
|
|
|
</entry>
|
|
|
|
<entry>192</entry>
|
|
|
|
<entry>4.0/5.1</entry>
|
|
|
|
<entry>32</entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry>SB 128 PCI (es1371)</entry>
|
|
|
|
<entry>OK</entry>
|
|
|
|
<entry>?</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry>48</entry>
|
|
|
|
<entry>stereo</entry>
|
|
|
|
<entry>2</entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry>SB AWE 64</entry>
|
|
|
|
<entry>max 44kHz</entry>
|
|
|
|
<entry>48kHz sounds bad</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry>48</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry>GUS PnP</entry>
|
|
|
|
<entry>none</entry>
|
|
|
|
<entry>OK</entry>
|
|
|
|
<entry>OK</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry>48</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry>Gravis UltraSound ACE</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry>Gravis UltraSound MAX</entry>
|
|
|
|
<entry>OK</entry>
|
|
|
|
<entry>OK (?)</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry>48</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry>ESS 688</entry>
|
|
|
|
<entry>OK</entry>
|
|
|
|
<entry>OK (?)</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry>48</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
2003-10-04 20:05:54 +00:00
|
|
|
<entry>C-Media cards (CMI8338/8738)</entry>
|
2003-03-23 23:35:12 +00:00
|
|
|
<entry>OK</entry>
|
2004-05-01 12:03:03 +00:00
|
|
|
<entry>OK S/PDIF is supported with ALSA 0.9.x</entry>
|
2003-03-23 23:35:12 +00:00
|
|
|
<entry>?</entry>
|
|
|
|
<entry></entry>
|
2003-10-04 20:05:54 +00:00
|
|
|
<entry>44</entry>
|
|
|
|
<entry>stereo</entry>
|
|
|
|
<entry>1</entry>
|
2003-03-23 23:35:12 +00:00
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry>Yamaha cards (*ymf*)</entry>
|
|
|
|
<entry>not OK (?) (maybe <option>-ao sdl</option>)</entry>
|
|
|
|
<entry>OK only with ALSA 0.5 with OSS emulation
|
|
|
|
<emphasis role="bold">AND</emphasis> <option>-ao sdl</option> (!) (?)</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry>Cards with envy24 chips (like Terratec EWS88MT)</entry>
|
|
|
|
<entry>?</entry>
|
|
|
|
<entry>?</entry>
|
|
|
|
<entry>OK</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry>?</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry></entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
<row>
|
|
|
|
<entry>PC Speaker or DAC</entry>
|
|
|
|
<entry>OK</entry>
|
|
|
|
<entry>none</entry>
|
|
|
|
<entry></entry>
|
|
|
|
<entry>
|
|
|
|
<ulink url="http://www.geocities.com/stssppnn/pcsp.html">Linux PC speaker OSS driver</ulink>
|
|
|
|
</entry>
|
|
|
|
<entry>The driver emulates 44.1, maybe more.</entry>
|
|
|
|
<entry>mono</entry>
|
|
|
|
<entry>1</entry>
|
|
|
|
</row>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Feedback to this document is welcome. Please tell us how
|
|
|
|
<application>MPlayer</application> and your sound card(s) worked together.
|
|
|
|
</para>
|
2004-11-11 02:09:15 +00:00
|
|
|
</sect2>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect1>
|
|
|
|
|
|
|
|
<sect1 id="af">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Audio filters</title>
|
|
|
|
<para>
|
2005-01-10 00:34:39 +00:00
|
|
|
Audio filters allow changing the properties of the audio data before the
|
2003-03-23 23:35:12 +00:00
|
|
|
sound reaches the sound card. The activation and deactivation of the filters
|
|
|
|
is normally automated but can be overridden. The filters are activated when
|
|
|
|
the properties of the audio data differ from those required by the sound card
|
|
|
|
and deactivated if unnecessary. The <option>-af filter1,filter2,...</option>
|
|
|
|
option is used to override the automatic activation of filters or to insert
|
|
|
|
filters that are not automatically inserted. The filters will be executed as
|
|
|
|
they appear in the comma separated list.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af resample,pan <replaceable>movie.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would run the sound through the resampling filter followed by the pan filter.
|
|
|
|
Observe that the list must not contain any spaces, else it will fail.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The filters often have options that change their behavior. These options
|
|
|
|
are explained in detail in the sections below. A filter will execute using
|
|
|
|
default settings if its options are omitted. Here is an example of how to use
|
|
|
|
filters in combination with filter specific options:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af resample=11025,pan=1:0.5:0.5 -channels 1 -srate 11025 <replaceable>media.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would set the output frequency of the resample filter to 11025Hz and downmix
|
|
|
|
the audio to 1 channel using the pan filter.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The overall execution of the filter layer is controlled using the
|
|
|
|
<option>-af-adv</option> option. This option has two suboptions:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<option>force</option> is a bit field that controls how the filters
|
|
|
|
are inserted and what speed/accuracy optimizations they use:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>0</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
Use automatic insertion of filters and optimize according to CPU speed.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>1</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
Use automatic insertion of filters and optimize for the highest speed.
|
|
|
|
<emphasis>Warning:</emphasis> Some features in the audio filters may
|
|
|
|
silently fail, and the sound quality may drop.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>2</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
Use automatic insertion of filters and optimize for quality.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>3</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
Use no automatic insertion of filters and no optimization.
|
2003-11-30 13:07:40 +00:00
|
|
|
<emphasis>Warning:</emphasis> It may be possible to crash <application>MPlayer</application>
|
2003-03-23 23:35:12 +00:00
|
|
|
using this setting.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>4</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
Use automatic insertion of filters according to 0 above,
|
|
|
|
but use floating point processing when possible.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>5</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
Use automatic insertion of filters according to 1 above,
|
|
|
|
but use floating point processing when possible.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>6</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
Use automatic insertion of filters according to 2 above,
|
|
|
|
but use floating point processing when possible.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>7</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
Use no automatic insertion of filters according to 3 above,
|
|
|
|
and use floating point processing when possible.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<option>list</option> is an alias for the -af option.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The filter layer is also affected by the following generic options:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>-v</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
Increases the verbosity level and makes most filters print out extra
|
|
|
|
status messages.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>-channels</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
This option sets the number of output channels you would like your
|
|
|
|
sound card to use. It also affects the number of channels that are
|
|
|
|
being decoded from the media. If the media contains less channels
|
|
|
|
than requested the channels filter (see below) will automatically
|
|
|
|
be inserted. The routing will be the default routing for the channels
|
|
|
|
filter.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>-srate</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
This option selects the sample rate you would like your sound card
|
|
|
|
to use (of course the cards have limits on this). If the sample frequency
|
|
|
|
of your sound card is different from that of the current media, the resample
|
|
|
|
filter (see below) will be inserted into the audio filter layer to compensate
|
|
|
|
for the difference.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>-format</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
This option sets the sample format between the audio filter layer and the
|
|
|
|
sound card. If the requested sample format of your sound card is different
|
|
|
|
from that of the current media, a format filter (see below) will be inserted
|
|
|
|
to rectify the difference.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_resample">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Up/Downsampling</title>
|
|
|
|
|
|
|
|
<para>
|
2003-11-30 13:07:40 +00:00
|
|
|
<application>MPlayer</application> fully supports sound up/down-sampling through the
|
2003-10-13 15:02:30 +00:00
|
|
|
<option>resample</option> filter. It can be used if you
|
2003-03-23 23:35:12 +00:00
|
|
|
have a fixed frequency sound card or if you are stuck with an old sound card
|
|
|
|
that is only capable of max 44.1kHz. This filter is automatically enabled if
|
|
|
|
it is necessary, but it can also be explicitly enabled on the command line. It
|
|
|
|
has three options:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>srate <8000-192000></option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is an integer used for setting the output sample
|
|
|
|
frequency in Hz. The valid range for this parameter is 8kHz to 192kHz. If
|
|
|
|
the input and output sample frequency are the same or if this parameter is
|
|
|
|
omitted the filter is automatically unloaded. A high sample frequency
|
|
|
|
normally improves the audio quality, especially when used in combination
|
|
|
|
with other filters.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>sloppy</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is an optional binary parameter that allows the output frequency to differ
|
|
|
|
slightly from the frequency given by <option>srate</option>. This option
|
|
|
|
can be used if the startup of the playback is extremely slow. It is enabled
|
|
|
|
by default.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>type <0-2></option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is an optional integer between <literal>0</literal> and <literal>2</literal> that
|
|
|
|
selects which resampling method to use. Here <literal>0</literal> represents
|
|
|
|
linear interpolation as resampling method, <literal>1</literal> represents
|
|
|
|
resampling using a poly-phase filter-bank and integer processing and
|
|
|
|
<literal>2</literal> represents resampling using a poly-phase filter-bank and
|
|
|
|
floating point processing. Linear interpolation is extremely fast, but
|
|
|
|
suffers from poor sound quality especially when used for up-sampling. The
|
|
|
|
best quality is given by <literal>2</literal> but this method also suffers from
|
|
|
|
the highest CPU load.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>Example:
|
|
|
|
<screen>mplayer -af resample=44100:0:0</screen>
|
|
|
|
would set the output frequency of the resample filter to 44100Hz using exact output
|
|
|
|
frequency scaling and linear interpolation.
|
|
|
|
</para>
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect2>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_channels">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Changing the number of channels</title>
|
|
|
|
<para>
|
|
|
|
The <option>channels</option> filter can be used for adding and removing
|
|
|
|
channels, it can also be used for routing or copying channels. It is
|
|
|
|
automatically enabled when the output from the audio filter layer differs from
|
|
|
|
the input layer or when it is requested by another filter. This filter unloads
|
|
|
|
itself if not needed. The number of options is dynamic:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>nch <1-6></option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is an integer between <literal>1</literal> and <literal>6</literal> that is used
|
|
|
|
for setting the number of output channels. This option is required, leaving it
|
|
|
|
empty results in a runtime error.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>nr <1-6></option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is an integer between <literal>1</literal> and <literal>6</literal> that is used
|
|
|
|
for specifying the number of routes. This parameter is optional. If it is
|
|
|
|
omitted the default routing is used.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>from1:to1:from2:to2:from3:to3...</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
are pairs of numbers between <literal>0</literal> and <literal>5</literal>
|
|
|
|
that define where each channel should be routed.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If only <option>nch</option> is given the default routing is used, it works
|
|
|
|
as follows: If the number of output channels is bigger than the number of input
|
|
|
|
channels empty channels are inserted (except mixing from mono to stereo, then
|
|
|
|
the mono channel is repeated in both of the output channels). If the number of
|
|
|
|
output channels is smaller than the number of input channels the exceeding
|
|
|
|
channels are truncated.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example 1:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af channels=4:4:0:1:1:0:2:2:3:3 <replaceable>media.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would change the number of channels to 4 and set up 4 routes that swap
|
|
|
|
channel 0 and channel 1 and leave channel 2 and 3 intact. Observe that
|
|
|
|
if media containing two channels was played back, channels 2 and 3 would
|
|
|
|
contain silence but 0 and 1 would still be swapped.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2003-05-16 13:30:51 +00:00
|
|
|
Example 2:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af channels=6:4:0:0:0:1:0:2:0:3 <replaceable>media.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would change the number of channels to 6 and set up 4 routes that copy
|
|
|
|
channel 0 to channels 0 to 3. Channel 4 and 5 will contain silence.
|
|
|
|
</para>
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect2>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_format">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Sample format converter</title>
|
|
|
|
<para>
|
|
|
|
The <option>format</option> filter converts between different sample formats. It
|
|
|
|
is automatically enabled when needed by the sound card or another filter.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>bps <number></option></term>
|
|
|
|
<listitem><para>
|
|
|
|
can be <literal>1</literal>, <literal>2</literal> or <literal>4</literal> and
|
|
|
|
denotes the number of bytes per sample. This option is required, leaving it empty
|
|
|
|
results in a runtime error.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>f <format></option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is a text string describing the sample format. The string is a
|
|
|
|
concatenated mix of: <option>alaw</option>, <option>mulaw</option> or
|
|
|
|
<option>imaadpcm</option>, <option>float</option> or <option>int</option>,
|
|
|
|
<option>unsigned</option> or <option>signed</option>, <option>le</option> or
|
2004-08-18 19:00:05 +00:00
|
|
|
<option>be</option> (little- or big-endian). This option is required,
|
2003-03-23 23:35:12 +00:00
|
|
|
leaving it empty results in a runtime error.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af format=4:float <replaceable>media.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would set the output format to 4 bytes per sample floating point data.
|
|
|
|
</para>
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect2>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_delay">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Delay</title>
|
|
|
|
<para>
|
2003-05-16 13:30:51 +00:00
|
|
|
The <option>delay</option> filter delays the sound to the loudspeakers such that
|
2003-03-23 23:35:12 +00:00
|
|
|
the sound from the different channels arrives at the listening position
|
|
|
|
simultaneously.
|
|
|
|
It is only useful if you have more than 2 loudspeakers. This filter has a
|
|
|
|
variable number of parameters:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>d1:d2:d3...</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
are floating point numbers representing the delays in ms that should be
|
|
|
|
imposed on the different channels. The minimum delay is 0ms and the maximum
|
|
|
|
is 1000ms.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
To calculate the required delay for the different channels do as follows:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<orderedlist>
|
|
|
|
<listitem><para>
|
|
|
|
Measure the distance to the loudspeakers in meters in relation to your
|
|
|
|
listening position, giving you the distances s1 to s5 (for a 5.1 system).
|
|
|
|
There is no point in compensating for the sub-woofer (you will not hear the
|
|
|
|
difference anyway).
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
Subtract the distances s1 to s5 from the maximum distance i.e.
|
|
|
|
s[i] = max(s) - s[i]; i = 1...5
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
2003-10-14 02:21:56 +00:00
|
|
|
Calculate the required delays in ms as
|
2003-03-23 23:35:12 +00:00
|
|
|
d[i] = 1000*s[i]/342; i = 1...5
|
|
|
|
</para></listitem>
|
|
|
|
</orderedlist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af delay=10.5:10.5:0:0:7:0 <replaceable>media.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would delay front left and right by 10.5ms, the two rear channels and the sub
|
|
|
|
by 0ms and the center channel by 7ms.
|
|
|
|
</para>
|
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect2>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_volume">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Software volume control</title>
|
|
|
|
<para>Software volume control is implemented by the <option>volume</option>
|
|
|
|
audio filter. Use this filter with caution since it can reduce the signal to
|
|
|
|
noise ratio of the sound. In most cases it is best to set the level for the
|
|
|
|
PCM sound to max, leave this filter out and control the output level to your
|
|
|
|
speakers with the master volume control of the mixer. In case your sound card
|
|
|
|
has a digital PCM mixer instead of an analog one, and you hear distortion,
|
|
|
|
use the MASTER mixer instead. If there is an external amplifier connected to
|
|
|
|
the computer (this is almost always the case), the noise level can be minimized
|
|
|
|
by adjusting the master level and the volume knob on the amplifier until the
|
|
|
|
hissing noise in the background is gone. This filter has two options:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>v <-200 - +60></option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is a floating point number between <literal>-200</literal> and <literal>+60</literal>
|
|
|
|
which represents the volume level in dB. The default level is 0dB.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>c</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is a binary control that turns soft clipping on and off. Soft-clipping can
|
|
|
|
make the sound more smooth if very high volume levels are used. Enable this
|
|
|
|
option if the dynamic range of the loudspeakers is very low. Be aware that
|
|
|
|
this feature creates distortion and should be considered a last resort.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af volume=10.1:0 <replaceable>media.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would amplify the sound by 10.1dB and hard-clip if the sound level is too high.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
This filter has a second feature: It measures the overall maximum sound level
|
2003-11-30 13:07:40 +00:00
|
|
|
and prints out that level when <application>MPlayer</application> exits.
|
|
|
|
This volume estimate can be used for setting the sound level in
|
|
|
|
<application>MEncoder</application> such that the maximum dynamic range is utilized.
|
2003-03-23 23:35:12 +00:00
|
|
|
</para>
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect2>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_equalizer">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Equalizer</title>
|
|
|
|
<para>
|
|
|
|
The <option>equalizer</option> filter represents a 10 octave band graphic
|
|
|
|
equalizer, implemented using 10 IIR band pass filters. This means that
|
|
|
|
it works regardless of what type of audio is being played back. The center
|
|
|
|
frequencies for the 10 bands are:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="2">
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry>Band No.</entry><entry>Center frequency</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<row><entry>0</entry><entry>31.25 Hz</entry></row>
|
|
|
|
<row><entry>1</entry><entry>62.50 Hz</entry></row>
|
|
|
|
<row><entry>2</entry><entry>125.0 Hz</entry></row>
|
|
|
|
<row><entry>3</entry><entry>250.0 Hz</entry></row>
|
|
|
|
<row><entry>4</entry><entry>500.0 Hz</entry></row>
|
|
|
|
<row><entry>5</entry><entry>1.000 kHz</entry></row>
|
|
|
|
<row><entry>6</entry><entry>2.000 kHz</entry></row>
|
|
|
|
<row><entry>7</entry><entry>4.000 kHz</entry></row>
|
|
|
|
<row><entry>8</entry><entry>8.000 kHz</entry></row>
|
|
|
|
<row><entry>9</entry><entry>16.00 kHz</entry></row>
|
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If the sample rate of the sound being played back is lower than the center
|
|
|
|
frequency for a frequency band, then that band will be disabled. A known
|
|
|
|
bug with this filter is that the characteristics for the uppermost band
|
|
|
|
are not completely symmetric if the sample rate is close to the center
|
|
|
|
frequency of that band. This problem can be worked around by up-sampling
|
|
|
|
the sound using the resample filter before it reaches this filter.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
This filter has 10 parameters:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>g1:g2:g3...g10</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
are floating point numbers between <literal>-12</literal> and <literal>+12</literal>
|
|
|
|
representing the gain in dB for each frequency band.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af equalizer=11:11:10:5:0:-12:0:5:12:12 <replaceable>media.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would amplify the sound in the upper and lower frequency region while
|
|
|
|
canceling it almost completely around 1kHz.
|
|
|
|
</para>
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect2>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_panning">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Panning filter</title>
|
|
|
|
<para>
|
|
|
|
Use the <option>pan</option> filter to mix channels arbitrarily. It is
|
|
|
|
basically a combination of the volume control and the channels filter.
|
|
|
|
There are two major uses for this filter:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<orderedlist>
|
|
|
|
<listitem><para>
|
|
|
|
Down-mixing many channels to only a few, stereo to mono for example.
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
Varying the "width" of the center speaker in a surround sound system.
|
|
|
|
</para></listitem>
|
|
|
|
</orderedlist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
This filter is hard to use, and will require some tinkering before the
|
|
|
|
desired result is obtained. The number of options for this filter
|
|
|
|
depends on the number of output channels:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>nch <1-6></option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is an integer between <literal>1</literal> and <literal>6</literal> and is used
|
2004-09-06 14:06:33 +00:00
|
|
|
for setting the number of input channels. This option is required, leaving it
|
2003-03-23 23:35:12 +00:00
|
|
|
empty results in a runtime error.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>l00:l01:l02:..l10:l11:l12:...ln0:ln1:ln2:...</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
are floating point values between <literal>0</literal> and <literal>1</literal>.
|
|
|
|
<option>l[i][j]</option> determines how much of input channel j is mixed into
|
|
|
|
output channel i.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example 1:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af pan=1:0.5:0.5 -channels 1 <replaceable>media.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would down-mix from stereo to mono.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example 2:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af pan=3:1:0:1:0.5:0.5 -channels 3 <replaceable>media.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would give 3 channel output leaving channels 0 and 1 intact, and mix
|
|
|
|
channels 0 and 1 into output channel 2 (which could be sent to a
|
|
|
|
sub-woofer for example).
|
|
|
|
</para>
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect2>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_sub">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Sub-woofer</title>
|
|
|
|
<para>
|
2003-05-16 13:30:51 +00:00
|
|
|
The <option>sub</option> filter adds a sub woofer channel to the audio
|
2003-03-23 23:35:12 +00:00
|
|
|
stream. The audio data used for creating the sub-woofer channel is an
|
|
|
|
average of the sound in channel 0 and channel 1. The resulting sound is
|
|
|
|
then low-pass filtered by a 4th order Butterworth filter with a default
|
|
|
|
cutoff frequency of 60Hz and added to a separate channel in the audio
|
|
|
|
stream. Warning: Disable this filter when you are playing DVDs with Dolby
|
|
|
|
Digital 5.1 sound, otherwise this filter will disrupt the sound to the
|
|
|
|
sub-woofer. This filter has two parameters:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>fc <20-300></option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is an optional floating point number used for setting the cutoff frequency
|
|
|
|
for the filter in Hz. The valid range is 20Hz to 300Hz. For the best result
|
|
|
|
try setting the cutoff frequency as low as possible. This will improve the
|
|
|
|
stereo or surround sound experience. The default cutoff frequency is 60Hz.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>ch <0-5></option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is an optional integer between <literal>0</literal> and <literal>5</literal>
|
|
|
|
which determines the channel number in which to insert the sub-channel audio.
|
|
|
|
The default is channel number <literal>5</literal>. Observe that the number of
|
|
|
|
channels will automatically be increased to <replaceable>ch</replaceable> if
|
|
|
|
necessary.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af sub=100:4 -channels 5 <replaceable>media.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would add a sub-woofer channel with a cutoff frequency of
|
|
|
|
100Hz to output channel 4.
|
|
|
|
</para>
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect2>
|
2003-03-23 23:35:12 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_surround">
|
2003-03-23 23:35:12 +00:00
|
|
|
<title>Surround-sound decoder</title>
|
|
|
|
<para>
|
|
|
|
Matrix encoded surround sound can be decoded by the <option>surround</option>
|
|
|
|
filter. Dolby Surround is an example of a matrix encoded format. Many files
|
|
|
|
with 2 channel audio actually contain matrixed surround sound. To use this
|
|
|
|
feature you need a sound card supporting at least 4 channels. This filter has
|
|
|
|
one parameter:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>d <0-1000></option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is an optional floating point number between <literal>0</literal> and
|
|
|
|
<literal>1000</literal> used for setting the delay time in ms for the
|
|
|
|
rear speakers. This delay should be set as follows: if d1 is the distance
|
|
|
|
from the listening position to the front speakers and d2 is the distance
|
|
|
|
from the listening position to the rear speakers, then the delay d should
|
|
|
|
be set to 15ms if d1 <= d2 and to 15 + 5*(d1-d2) if d1 > d2. The default
|
|
|
|
value for d is 20ms.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af surround=15 -channels 4 <replaceable>media.avi</replaceable></screen>
|
2003-03-23 23:35:12 +00:00
|
|
|
would add surround sound decoding with 15ms delay for the sound to the
|
|
|
|
rear speakers.
|
|
|
|
</para>
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect2>
|
2003-11-03 01:45:04 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_export">
|
2003-11-03 01:45:04 +00:00
|
|
|
<title>Audio Exporter</title>
|
|
|
|
<para>
|
|
|
|
This audio filter exports the incoming signal to other processes using memory
|
|
|
|
mapping (<literal>mmap()</literal>). Memory mapped areas contain a header:
|
|
|
|
|
|
|
|
<programlisting>
|
|
|
|
int nch /*number of channels*/
|
|
|
|
int size /*buffer size*/
|
|
|
|
unsigned long long counter /*Used to keep sync, it's updated
|
|
|
|
every time new data is exported.*/
|
|
|
|
</programlisting>
|
|
|
|
|
|
|
|
The rest is payload (non-interleaved) 16bit data.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>mmapped_file</option></term>
|
|
|
|
<listitem><para>
|
2004-07-14 09:05:47 +00:00
|
|
|
The file you want this filter to export to. The default is to map to
|
2003-11-03 01:45:04 +00:00
|
|
|
<filename>~/.mplayer/mplayer-af_export</filename>.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>nsamples</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
Number of samples per channel. The default is <literal>512</literal> samples.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Example:
|
2004-01-01 17:44:41 +00:00
|
|
|
<screen>mplayer -af export=/tmp/mplayer-af_export:1024 <replaceable>media.avi</replaceable></screen>
|
2003-11-03 01:45:04 +00:00
|
|
|
would export 1024 samples per channel to <filename>/tmp/mplayer-af_export</filename>.
|
|
|
|
</para>
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect2>
|
2003-11-03 01:45:04 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_extrastereo">
|
2004-10-09 01:03:41 +00:00
|
|
|
<title>Extrastereo</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
This audio filter (linearly) increases the difference between left and
|
|
|
|
right channels (like the <application>XMMS</application> extrastereo
|
|
|
|
plugin) which adds some sort of "live" effect to playback.
|
|
|
|
This filter has one parameter:</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>mul</option></term>
|
|
|
|
<listitem><para>
|
|
|
|
is the difference coefficient, an optional floating point number that defaults
|
|
|
|
to <literal>2.5</literal>. If you set it to <literal>0.0</literal>, you will
|
|
|
|
have mono sound (average of both channels). If you set it to
|
|
|
|
<literal>1.0</literal>, sound will be unchanged, if you set it to
|
|
|
|
<literal>-1.0</literal>, left and right channels will be swapped.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Usage:
|
|
|
|
<screen>
|
|
|
|
mplayer -af extrastereo <replaceable>media.avi</replaceable>
|
|
|
|
mplayer -af extrastereo=3.45 <replaceable>media.avi</replaceable><!--
|
|
|
|
--></screen>
|
|
|
|
</para>
|
2005-01-10 00:33:51 +00:00
|
|
|
</sect2>
|
2004-10-09 01:03:41 +00:00
|
|
|
|
2005-01-10 00:33:51 +00:00
|
|
|
<sect2 id="af_volnorm">
|
2004-10-09 01:03:41 +00:00
|
|
|
<title>Volume normalizer</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
This audio filter maximizes the volume without distorting the sound.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Usage:
|
|
|
|
<screen>mplayer -af volnorm <replaceable>media.avi</replaceable></screen>
|
|
|
|
</para>
|
2004-11-11 02:09:15 +00:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|