diff options
author | eyck <eyck@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-01 09:20:36 +0000 |
---|---|---|
committer | eyck <eyck@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-01 09:20:36 +0000 |
commit | 78919825b5a3031739399f1f3e76ff621c83cf33 (patch) | |
tree | 3fe9819c2e525a2eef75b3958b42e8e25711a48c /DOCS | |
parent | f563b8adc3d82444e408409a4d10dabf8080f946 (diff) | |
download | mpv-78919825b5a3031739399f1f3e76ff621c83cf33.tar.bz2 mpv-78919825b5a3031739399f1f3e76ff621c83cf33.tar.xz |
race with time translating sound.html starts...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9780 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'DOCS')
-rw-r--r-- | DOCS/pl/sound.html | 927 |
1 files changed, 742 insertions, 185 deletions
diff --git a/DOCS/pl/sound.html b/DOCS/pl/sound.html index 3a3ebaca4b..f2d5b67663 100644 --- a/DOCS/pl/sound.html +++ b/DOCS/pl/sound.html @@ -1,271 +1,831 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> -<STYLE> - .text - {font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 14px;} -</STYLE> + <TITLE>Sound - MPlayer - Odtwarzacz filmów</TITLE> + <LINK REL="stylesheet" TYPE="text/css" HREF="../default.css"> + <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2"> </HEAD> -<BODY BGCOLOR=white> +<BODY> -<FONT CLASS="text"> -<P><B><A NAME=2.3.2>2.3.2. Audio output devices</A></B></P> + <H3><A NAME="audio">2.3.2 Urządzenia wyjścia: dźwięk</A></H3> -<P><B>MPlayer</B>'s audio interface is called <I>libao2</I>. It currently -contains these drivers:</P> +<H4><A NAME="sync">2.3.2.1 Synchronizacja audio/video</A></H4> -<TABLE BORDER=0> +<P>Interfejs do dźwięku w MPlayerze nazywa się <I>libao2</I>. Aktualnie +zawiera następujące sterowniki:</P> -<TR><TD COLSPAN=4><P><B><FONT CLASS="text">General:</B></P></TD></TR> +<DL> + <DT>oss</DT> + <DD>sterownik OSS (ioctl) (obsługuje sprzętowe AC3)</DD> -<TR><TD> </TD><TD VALIGN=top><FONT CLASS="text">oss</TD><TD> </TD><TD><FONT CLASS="text">OSS (ioctl) driver</TD></TR> -<TR><TD></TD><TD VALIGN=top><FONT CLASS="text">sdl</TD><TD></TD><TD><FONT CLASS="text">SDL driver (supports up/downsampling, <B>ESD</B>, <B>ARTS</B> etc)</TD></TR> -<TR><TD></TD><TD VALIGN=top><FONT CLASS="text">nas</TD><TD></TD><TD><FONT CLASS="text">NAS (Network Audio System) driver</TD></TR> -<TR><TD></TD><TD VALIGN=top><FONT CLASS="text">alsa5</TD><TD></TD><TD><FONT CLASS="text">native ALSA 0.5 driver</TD></TR> -<TR><TD></TD><TD VALIGN=top><FONT CLASS="text">alsa9</TD><TD></TD><TD><FONT CLASS="text">native ALSA 0.9 driver (works, but has problems -> use OSS)</TD></TR> -<TR><TD></TD><TD VALIGN=top><FONT CLASS="text">sun</TD><TD></TD><TD><FONT CLASS="text">SUN audio driver (/dev/audio) for BSD and Solaris8 users</TD></TR> + <DT>sdl</DT> + <DD>sterownik SDL (obsługuje demony dźwięku takie jak <B>ESD</B> i <B>ARTS</B>)</DD> -</TABLE> + <DT>nas</DT> + <DD>sterownik NAS (Network Audio System)</DD> + + <DT>alsa5</DT> + <DD>natywny sterownik ALSA 0.5</DD> + + <DT>alsa9</DT> + <DD>natywny sterownik ALSA 0.9 (obsługuje sprzętowe AC3)</DD> + + <DT>sun</DT> + <DD>sterownik dźwięku SUN (<CODE>/dev/audio</CODE>) dla użytkowników BSD i Solaris8</DD> + + <DT>arts</DT> + <DD>natywny sterownik ARTS (głównie dla użytkowników KDE)</DD> + + <DT>esd</DT> + <DD>natywny sterownik ESD (głównie dla użytkowników GNOME)</DD> +</DL> -<P>Fact is, Linux sound card drivers have compatibility problems. -It <B>may</B> take a while to find your optimal settings.</P> +<P> + Sterowniki kart dźwiękowych w Linuxie mają problemy z kompatybilnością. + Wynika to z tego że MPlayer polega na wbudowanych właściwościach <EM>prawidłowo</EM> + napisanych sterowników które pozwalają utrzymać prawidłową synchronizację audio/video. + Niestety, niektórzy autorzy sterowników nie wysilają się z zaprogramowaniem tych właściwości, + gdyż nie są wymagane do odgrywania plików MP3. </P> + +<P>Other media players like <A HREF="http://avifile.sourceforge.net">aviplay</A> + or <A HREF="http://xine.sourceforge.net">xine</A> possibly work + 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 MPlayer's. </P> + +<P>Using MPlayer 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).</P> + +<P>If you happen to have a bad audio driver, try the <CODE>-autosync</CODE> + option, it should sort out your problems. See the man page for detailed + information.</P> + +<P>Some notes:</P> <UL> -<LI>If you have an OSS driver, first try <CODE>-ao oss</CODE> (this is the default). -If you experience glitches, halts or anything out of the ordinary, try -<CODE>-ao sdl</CODE> (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, -ARTS, and up/downsampling. (ESD is the sound daemon from GNOME, ARTS is from KDE.)</LI> -<LI>If you have ALSA version 0.5, then you almost always have to use <CODE>-ao alsa5</CODE> , -since ALSA 0.5 has buggy OSS emulation code, and will <B>crash MPlayer</B> with -a message like this:<BR> -<CODE>DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!</CODE></LI> -<LI>If you have ALSA version 0.9 you may choose between <CODE>-ao oss</CODE> and -<CODE>-ao sdl</CODE>. You can also use <CODE>-ao alsa9</CODE>. It works, but -there are problems like lost sync and disappearing audio.</LI> -</UL> - -<P>On <B>Solaris/FreeBSD</B> systems, use the SUN audio driver with the -<CODE>-ao sun</CODE> option, otherwise neither video nor audio will work.</P> - -<P><B><A NAME=2.3.2.1>2.3.2.1. Sound Card experiences, recommendations</A></B></P> - -<TABLE BORDER=0 WIDTH="100%"> -<TR><TD COLSPAN=3><B><FONT CLASS="text">VIA onboard chipset (via82cxxx) 48kHz only</B></TD><TR> -<TD></TD><TD><FONT CLASS="text">Driver:</TD><TD><FONT CLASS="text"> from <A HREF="http://sourceforge.net/project/showfiles.php?group_id=3242&release_id=59602">here</A></TD><TR> - -<TD COLSPAN=3><B><FONT CLASS="text">Aureal Vortex 2</B></TD><TR> -<TD> </TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">no driver</TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS/Pro:</TD><TD><FONT CLASS="text">OK</TD><TR> -<TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">no driver</TD><TR> -<TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD>48</TD><TR> -<TD></TD><TD><FONT CLASS="text">Driver:</TD><TD><FONT CLASS="text"><A HREF="http://aureal.sourceforge.net">aureal.sourceforge.net</A></TD><TR> -<TD></TD><TD><FONT CLASS="text">Driver2:</TD><TD><FONT CLASS="text"> from <A HREF="http://makacs.poliod.hu/~pontscho/aureal/au88xx-1.1.3.tar.bz2">here</A><BR> -(<I>buffer size increased to 32k</I>)</TD><TR> - -<TD COLSPAN=3><B><FONT CLASS="text">GUS PnP</B></TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">no driver</TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS/Pro:</TD><TD><FONT CLASS="text">OK</TD><TR> -<TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK</TD><TR> -<TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">48</TD><TR> - -<TD COLSPAN=3><B><FONT CLASS="text">SB Live!</B></TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">Analog OK, SP/DIF not working</TD><TR> -<TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">Both OK</TD><TR> -<TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">192</TD><TR> - -<TD COLSPAN=3><B><FONT CLASS="text">SB AWE 64</B></TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">max 44kHz</TD><TR> -<TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">48kHz sounds bad</TD><TR> -<TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">48</TD><TR> - -<TD COLSPAN=3><B><FONT CLASS="text">Gravis UltraSound ACE</B></TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">not OK</TD><TR> -<TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK</TD><TR> -<TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">44</TD><TR> - -<TD COLSPAN=3><B><FONT CLASS="text">Gravis UltraSound MAX</B></TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">OK</TD><TR> -<TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK (?)</TD><TR> -<TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">48</TD><TR> - -<TD COLSPAN=3><B><FONT CLASS="text">ESS 688</B></TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">OK</TD><TR> -<TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK (?)</TD><TR> -<TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">48</TD><TR> - -<TD COLSPAN=3><B><FONT CLASS="text">C-Media cards (which ones?)</B></TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">not OK (hissing) (?)</TD><TR> -<TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK (?)</TD><TR> -<TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">?</TD><TR> - -<TD COLSPAN=3><B><FONT CLASS="text">Yamaha cards (*ymf*)</B></TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">not OK (?) (maybe <CODE>-ao sdl</CODE>)</TD><TR> -<TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">OK only with ALSA 0.5 with OSS emulation <B>AND</B> <CODE>-ao sdl</CODE> (!) (?)</TD><TR> -<TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">?</TD><TR> - -<TD COLSPAN=3><B><FONT CLASS="text">Cards with envy24 chips (like Terratec EWS88MT)</B></TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">?</TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS/Pro:</TD><TD><FONT CLASS="text">OK</TD><TR> -<TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">?</TD><TR> -<TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">?</TD><TR> - -<TD COLSPAN=3><B><FONT CLASS="text">PC Speaker or DAC</B></TD><TR> -<TD></TD><TD><FONT CLASS="text">OSS:</TD><TD><FONT CLASS="text">OK (Use the SDL driver: <CODE>-ao sdl</CODE>)</TD><TR> -<TD></TD><TD><FONT CLASS="text">ALSA:</TD><TD><FONT CLASS="text">no driver</TD><TR> -<TD></TD><TD><FONT CLASS="text">Max kHz:</TD><TD><FONT CLASS="text">The driver emulates 44.1, maybe more.</TD><TR> -<TD></TD><TD><FONT CLASS="text">Driver:</TD><TD><FONT CLASS="text"><A HREF="ftp://ftp.infradead.org/pub/pcsp">ftp://ftp.infradead.org/pub/pcsp</A></TD> + <LI>If you have an OSS driver, first try <CODE>-ao oss</CODE> (this is the + default). If you experience glitches, halts or anything out of the + ordinary, try <CODE>-ao sdl</CODE> (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).</LI> + <LI>If you have ALSA version 0.5, then you almost always have to use + <CODE>-ao alsa5</CODE> , since ALSA 0.5 has buggy OSS emulation code, and + will <B>crash MPlayer</B> with a message like this:<BR> + <CODE>DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!</CODE></LI> + <LI>On Solaris, use the SUN audio driver with the <CODE>-ao sun</CODE> option, + otherwise neither video nor audio will work.</LI> + <LI>If the sound clicks when playing from CD-ROM, turn on IRQ unmasking, e.g. + <CODE>hdparm -u1 /dev/cdrom</CODE> (<CODE>man hdparm</CODE>). This is + generally beneficial and described in more detail in the + <A HREF="cd-dvd.html#drives">CD-ROM section</A>.</LI> + </UL> + + +<H4><A NAME="experiences">2.3.2.2 Sound Card experiences, recommendations</A></H4> + +<P>On Linux, a 2.4.x kernel is highly recommended. Kernel 2.2 is not tested.</P> + +<P>Linux sound drivers are primarily provided by the free version of OSS. These + drivers have been superceded by <A HREF="http://www.alsa-project.org">ALSA</A> + (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 + <A HREF="http://www.opensound.com/">4Front Technologies</A>. They also support + several non-Linux systems.</P> + +<TABLE BORDER="1" WIDTH="100%"> + + <TR> + <TH ROWSPAN="2"><B>SOUND CARD</B></TH> + <TH COLSPAN="4"><B>DRIVER</B></TH> + <TH ROWSPAN="2"><B>Max kHz</B></TH> + <TH ROWSPAN="2"><B>Max Channels</B></TH> + <TH ROWSPAN="2"><B>Max Opens<FONT SIZE="-2"><A HREF=#note1>[1]</A></FONT></B></TH> + </TR> + + <TR> + <TH><B>OSS/Free</B></TH> + <TH><B>ALSA</B></TH> + <TH><B>OSS/Pro</B></TH> + <TH><B>other</B></TH> + </TR> + + <TR> + <TD><B>VIA onboard (686/A/B, 8233, 8235)</B></TD> + <TD><A HREF="http://sourceforge.net/project/showfiles.php?group_id=3242&release_id=59602">via82cxxx_audio</A></TD> + <TD>snd-via82xx</TD> + <TD> </TD> + <TD> </TD> + <TD>4-48 kHz or 48 kHz only, depending on the chipset</TD> + <TD> </TD> + <TD> </TD> + </TR> + + <TR> + <TD><B>Aureal Vortex 2</B></TD> + <TD>none</TD> + <TD>none</TD> + <TD>OK</TD> + <TD><A HREF="http://aureal.sourceforge.net">Linux Aureal Drivers</A><BR> + <A HREF="http://makacs.poliod.hu/~pontscho/aureal/au88xx-1.1.3.tar.bz2">buffer size increased to 32k</A></TD> + <TD>48</TD> + <TD>4.1</TD> + <TD>5+</TD> + </TR> + + <TR> + <TD><B>SB Live!</B></TD> + <TD>Analog OK, SP/DIF not working</TD> + <TD>Both OK</TD> + <TD>Both OK</TD> + <TD><A HREF="http://opensource.creative.com">Creative's OSS driver (SP/DIF support)</A></TD> + <TD>192</TD> + <TD>4.0/5.1</TD> + <TD>32</TD> + </TR> + + <TR> + <TD><B>SB 128 PCI (es1371)</B></TD> + <TD>OK</TD> + <TD>?</TD> + <TD> </TD> + <TD> </TD> + <TD>48</TD> + <TD>stereo</TD> + <TD>2</TD> + </TR> + + <TR> + <TD><B>SB AWE 64</B></TD> + <TD>max 44kHz</TD> + <TD>48kHz sounds bad</TD> + <TD> </TD> + <TD> </TD> + <TD>48</TD> + <TD> </TD> + <TD> </TD> + </TR> + + <TR> + <TD><B>GUS PnP</B></TD> + <TD>none</TD> + <TD>OK</TD> + <TD>OK</TD> + <TD> </TD> + <TD>48</TD> + <TD> </TD> + <TD> </TD> + </TR> + + <TR> + <TD><B>Gravis UltraSound ACE</B></TD> + <TD>not OK</TD> + <TD>OK</TD> + <TD> </TD> + <TD> </TD> + <TD>44</TD> + <TD> </TD> + <TD> </TD> + </TR> + + <TR> + <TD><B>Gravis UltraSound MAX</B></TD> + <TD>OK</TD> + <TD>OK (?)</TD> + <TD> </TD> + <TD> </TD> + <TD>48</TD> + <TD> </TD> + <TD> </TD> + </TR> + + <TR> + <TD><B>ESS 688</B></TD> + <TD>OK</TD> + <TD>OK (?)</TD> + <TD> </TD> + <TD> </TD> + <TD>48</TD> + <TD> </TD> + <TD> </TD> + </TR> + + <TR> + <TD><B>C-Media cards (which ones?)</B></TD> + <TD>not OK (hissing) (?)</TD> + <TD>OK</TD> + <TD> </TD> + <TD> </TD> + <TD>?</TD> + <TD> </TD> + <TD> </TD> + </TR> + + <TR> + <TD><B>Yamaha cards (*ymf*)</B></TD> + <TD>not OK (?) (maybe <CODE>-ao sdl</CODE>)</TD> + <TD>OK only with ALSA 0.5 with OSS emulation <B>AND</B> + <CODE>-ao sdl</CODE> (!) (?)</TD> + <TD> </TD> + <TD> </TD> + <TD>?</TD> + <TD> </TD> + <TD> </TD> + </TR> + + <TR> + <TD><B>Cards with envy24 chips (like Terratec EWS88MT)</B></TD> + <TD>?</TD> + <TD>?</TD> + <TD>OK</TD> + <TD> </TD> + <TD>?</TD> + <TD> </TD> + <TD> </TD> + </TR> + + <TR> + <TD><B>PC Speaker or DAC</B></TD> + <TD>OK</TD> + <TD>none</TD> + <TD> </TD> + <TD><A HREF="http://www.geocities.com/stssppnn/pcsp.html">Linux PC speaker OSS driver</a></TD> + <TD>The driver emulates 44.1, maybe more.</TD> + <TD>mono</TD> + <TD>1</TD> + </TR> + </TABLE> -<UL> -<LI>On Linux, a 2.4.x kernel is highly recommended. Kernel 2.2 is not tested.</LI> -<LI>If sound clicks when playing from CD-ROM, turn on IRQ unmasking, e.g. - <CODE>hdparm -u1 /dev/cdrom</CODE> (<CODE>man hdparm</CODE>). This is - generally beneficial and described more detailed in the - <A HREF="cd-dvd.html#4.1">CD-ROM section</A>.</LI> -<LI>Sharing your sound card with another application like XMMS is <B>strongly discouraged</B>! - If the other sound application is using ESD, start <B>MPlayer</B> with the <CODE>-vo sdl:esd</CODE> option - to combine both sound streams! In fact, the option <CODE>-vo sdl:esd</CODE> could be used with ESD - even when playing <B>Mplayer</B> alone.</LI> -<LI>Feedback to this document is welcome. Please tell us how <B>MPlayer</B> and - your sound card(s) worked together.</LI> -</UL> - - -<P><B><A NAME=2.3.2.2>2.3.2.2. Audio plugins</A></B></P> - -<P><B>MPlayer</B> has support for audio plugins. Audio plugins can be used for - changing the properties of the audio data before the sound reaches the sound - card. They are enabled using the <CODE>-aop</CODE> switch which takes a +<P><A NAME="note1"><B>[1]</B></A>: the number of applications that are able to use the + device <I>at the same time</I>.</P> + +<P>Feedback to this document is welcome. Please tell us how MPlayer + and your sound card(s) worked together.</P> + + +<H4><A NAME="af">2.3.2.3 Audio filters</A></H4> + +<P>The old audio plugins have been superseded by a new audio filter layer. Audio + filters are used for changing the properties of the audio data before the + 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 <CODE>-af filter1,filter2,...</CODE> + 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.</P> + +<P>Example:<BR> + <CODE>mplayer -af resample,pan movie.avi </CODE></P> + +<P>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.</P> + +<P>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:</P> + +<P> <CODE>mplayer -af resample=11025,pan=1:0.5:0.5 -channels 1 + -srate 11025 media.avi</CODE></P> + +<P>would set the output frequency of the resample filter to 11025Hz and downmix + the audio to 1 channel using the pan filter.</P> + +<P>The overall execution of the filter layer is controlled using the + <CODE>-af-adv</CODE> option. This option has two suboptions:</P> + +<DL> + <DT><CODE>force</CODE><DT> + <DD>is a Bit field that controls how the filters are inserted and what + speed/accuracy optimizations they use: + <DL> + <DT><CODE>0</CODE></DT> + <DD>Use automatic insertion of filters and optimize according to CPU + speed.</DD> + <DT><CODE>1</CODE></DT> + <DD>Use automatic insertion of filters and optimize for the highest + speed.<BR> + <EM>Warning:</EM> Some features in the audio filters may silently fail, + and the sound quality may drop.</DD> + <DT><CODE>2</CODE></DT> + <DD>Use automatic insertion of filters and optimize for quality.</DD> + <DT><CODE>3</CODE></DT> + <DD>Use no automatic insertion of filters and no optimization.<BR> + <I>Warning:</I> It may be possible to crash MPlayer using this + setting.</DD> + <DT><CODE>4</CODE></DT> + <DD>Use automatic insertion of filters according to 0 above, but use + floating point processing when possible.</DD> + <DT><CODE>5</CODE></DT> + <DD>Use automatic insertion of filters according to 1 above, but use + floating point processing when possible.</DD> + <DT><CODE>6</CODE></DT> + <DD>Use automatic insertion of filters according to 2 above, but use + floating point processing when possible.</DD> + <DT><CODE>7</CODE></DT> + <DD>Use no automatic insertion of filters according to 3 above, and use + floating point processing when possible.</DD> + </DL> + </DD> + + <DT><CODE>list</CODE></DT> + <DD>is an alias for the -af option.</DD> +</DL> + +<P>The filter layer is also affected by the following generic options: + +<DL> + <DT><CODE>-v</CODE></DT> + <DD>Increases the verbosity level and makes most filters print out extra + status messages.</DD> + <DT><CODE>-channels</CODE></DT> + <DD>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.</DD> + <DT><CODE>-srate</CODE></DT> + <DD>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.</DD> + <DT><CODE>-format</CODE><DT> + <DD>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.</DD> +</DL> + + +<H4><A NAME="af_resample">2.3.2.3.1 Up/Down-sampling</A></H4> + +<P>MPlayer fully supports sound up/down-sampling through the + <CODE>resample</CODE> filter. It can be used if you + 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:</P> + +<DL> + <DT><CODE>srate <8000-192000></CODE></DT> + <DD>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.</DD> + + <DT><CODE>sloppy</CODE></DT> + <DD>is an optional binary parameter that allows the output frequency to differ + slightly from the frequency given by <CODE>srate</CODE>. This option can be + used if the startup of the playback is extremely slow. It is enabled by + default.</DD> + + <DT><CODE>type <0-2></CODE><DT> + <DD>is an optional integer between <CODE>0</CODE> and <CODE>2</CODE> that + selects which resampling method to use. Here <CODE>0</CODE> represents + linear interpolation as resampling method, <CODE>1</CODE> represents + resampling using a poly-phase filter-bank and integer processing and + <CODE>2</CODE> 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 <CODE>2</CODE> but this method also suffers from + the highest CPU load.</DD> +</DL> + +<P>Example:<BR> + <CODE>mplayer -af resample=44100:0:0</CODE></P> + +<P>would set the output frequency of the resample filter to 44100Hz using exact + output frequency scaling and linear interpolation.</P> + + +<H4><A NAME="af_channels">2.3.2.3.2 Changing the number of channels</A></H4> + +<P>The <CODE>channels</CODE> 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:</P> + +<DL> + <DT><CODE>nch <1-6></CODE></DT> + <DD>is an integer between <CODE>1</CODE> and <CODE>6</CODE> that is used for + setting the number of output channels. This option is required, leaving it + empty results in a runtime error.</DD> + + <DT><CODE>nr <1-6></CODE></DT> + <DD>is an integer between <CODE>1</CODE> and <CODE>6</CODE> that is used for + specifying the number of routes. This parameter is optional. If it is + omitted the default routing is used.</DD> + + <DT><CODE>from1:to1:from2:to2:from3:to3...</CODE></DT> + <DD>are pairs of numbers between <CODE>0</CODE> and <CODE>5</CODE> that define + where each channel should be routed.</DD> +</DL> + +<P>If only <CODE>nch</CODE> 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.</P> + +<P>Example 1:<BR> + <CODE>mplayer -af channels=4:4:0:1:1:0:2:2:3:3 media.avi </CODE></P> + +<P>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.</P> + +<P>Example 2:<BR> + <CODE>mplayer -af channels=6:4:0:0:0:1:0:2:0:3 media.avi </CODE></P> + +<P>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.</P> + + +<H4><A NAME="af_format">2.3.2.3.3 Sample format converter</A></H4> + +<P>The <CODE>format</CODE> filter converts between different sample formats. It + is automatically enabled when needed by the sound card or another filter.</P> + +<DL> + <DT><CODE>bps <number></CODE></DT> + <DD>can be <CODE>1</CODE>, <CODE>2</CODE> or <CODE>4</CODE> and denotes the + number of bytes per sample. This option is required, leaving it empty + results in a runtime error.</DD> + + <DT><CODE>f <format></CODE></DT> + <DD>is a text string describing the sample format. The string is a + concatenated mix of: <CODE>alaw</CODE>, <CODE>mulaw</CODE> or + <CODE>imaadpcm</CODE>, <CODE>float</CODE> or <CODE>int</CODE>, + <CODE>unsigned</CODE> or <CODE>signed</CODE>, <CODE>le</CODE> or + <CODE>be</CODE> (little or big endian). This option is required, leaving it + empty results in a runtime error.</DD> +</DL> + +<P>Example:<BR> + <CODE>mplayer -af format=4:float media.avi</CODE></P> + +<P>would set the output format to 4 bytes per sample floating point + data.</P> + + +<H4><A NAME="af_delay">2.3.2.3.4 Delay</A></H4> + +<P>The <CODE>delay</CODE> filter delays the sound to the loudspeakers such that + 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:</P> + +<DL> + <DT><CODE>d1:d2:d3...</CODE></DT> + <DD>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.</DD> +</DL> + +<P>To calculate the required delay for the different channels do as follows:</P> + +<OL> + <LI>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).</LI> + <LI>Subtract the distances s1 to s5 from the maximum distance i.e.<BR> + s[i] = max(s) - s[i]; i = 1...5</LI> + <LI>Calculated the required delays in ms as<BR> + d[i] = 1000*s[i]/342; i = 1...5 </LI> +</OL> + +<P>Example:<BR> + <CODE>mplayer -af delay=10.5:10.5:0:0:7:0 media.avi</CODE></P> + +<P>would delay front left and right by 10.5ms, the two rear channels and the sub + by 0ms and the center channel by 7ms.</P> + + +<H4><A NAME="af_volume">2.3.2.3.5 Software volume control</A></H4> + +<P>Software volume control is implemented by the <CODE>volume</CODE> 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:</P> + +<DL> + <DT><CODE>v <-200 - +60></CODE></DT> + <DD>is a floating point number between <CODE>-200</CODE> and <CODE>+60</CODE> + which represents the volume level in dB. The default level is 0dB.</DD> + + <DT><CODE>c</CODE></DT> + <DD>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.</DD> +</DL> + +<P>Example:<BR> + <CODE>mplayer -af volume=10.1:0 media.avi</CODE></P> + +<P>would amplify the sound by 10.1dB and hard-clip if the sound level is too + high.</P> + +<P>This filter has a second feature: It measures the overall maximum sound level + and prints out that level when MPlayer exits. This volume estimate can be used + for setting the sound level in MEncoder such that the maximum dynamic range is + utilized.</P> + + +<H4><A NAME="af_equalizer">2.3.2.3.6 Equalizer</A></H4> + +<P>The <CODE>equalizer</CODE> 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:</P> + +<TABLE BORDER="0" WIDTH="100%"> + <TR><TD>Band No.</TD><TD>Center frequency</TD></TR> + <TR><TD>0</TD><TD>31.25 Hz</TD></TR> + <TR><TD>1</TD><TD>62.50 Hz</TD></TR> + <TR><TD>2</TD><TD>125.0 Hz</TD></TR> + <TR><TD>3</TD><TD>250.0 Hz</TD></TR> + <TR><TD>4</TD><TD>500.0 Hz</TD></TR> + <TR><TD>5</TD><TD>1.000 kHz</TD></TR> + <TR><TD>6</TD><TD>2.000 kHz</TD></TR> + <TR><TD>7</TD><TD>4.000 kHz</TD></TR> + <TR><TD>8</TD><TD>8.000 kHz</TD></TR> + <TR><TD>9</TD><TD>16.00 kHz</TD></TR> +</TABLE> + +<P>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. </P> + +<P>This filter has 10 parameters:</P> + +<DL> + <DT><CODE>g1:g2:g3...g10</CODE |