[MPlayer-dev-eng] DOCS bug

Anders Johansson ajh at watri.uwa.edu.au
Fri Jan 10 02:03:55 CET 2003


Hi,

> Anders Johansson writes:
>  > > Yes, Anders' patch for sound.html describes this correctly.
>  > 
>  > I was about to fix the man page as well. There are other errors in the
>  > -af section, see channels (many new options) and volume (pr is gone),
>  > also docs for sub and pan are missing from the manpage.
> 
> That would be very nice as I'll have absolutely no time to do it.
> IIRC you added some features during the last days (subwoofer etc) that
> might be worth documenting ;-) (hint, hint ;-)))

Patch attached.

> Diego

//Anders
-------------- next part --------------
Index: mplayer.1
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/mplayer.1,v
retrieving revision 1.305
diff -u -r1.305 mplayer.1
--- mplayer.1	9 Jan 2003 09:35:01 -0000	1.305
+++ mplayer.1	10 Jan 2003 01:05:36 -0000
@@ -994,7 +994,7 @@
 Available filters are:
 .
 .RSs
-.IPs resample[=srate[:sloppy][:fast]]
+.IPs resample[=srate[:sloppy][:type]]
 Changes the sample rate of the audio stream to an integer srate (Hz).
 It only supports the 16 bit little endian format.
 .IPs channels[=nch]
@@ -1018,7 +1018,7 @@
 .br
 le or be (little or big endian)
 .br
-.IPs "volume[=v:sc:pr:en]"
+.IPs "volume[=v:sc]"
 Select the output volume level.
 This filter is not reentrant and can therefore only be enabled once for every
 audio stream.
@@ -1029,15 +1029,25 @@
 The default gain is -20dB.
 .br
 sc: enable soft clipping.
+.REss
+.IPs "pan[=n:l01:l02:..l10:l11:l12:...ln0:ln1:ln2:...]"
+Mixes channels arbitrarily, see html documentation for more info.
+.RSss
+n: number of output channels (1 - 6).
 .br
-pr: enable probing of the volume level for each audio stream.
-Both the maximum and instantaneous volume is probed.
-The instantaneous volume can only be accessed through the runtime interface,
-but the maximum volume is printed at the end of the movie.
-This value can be used when transcoding movies to maximize the utilization
-of the dynamic range.
+lij: how much of input channel j is mixed into output channel i.
+.REss
+.IPs "sub[=fc:ch]"
+Add sub-woofer channel.
+.RSss
+fc: Cutoff frequency for low-pass filter (20Hz to 300Hz) default is 60Hz.
 .br
-en: enable and disable the volume control.
+ch: channel number for the sub-channel.
+.REss
+.IPs "surround[=d]"
+Decoder for matrix encoded surround sound, works on many 2 channel files.
+.RSss
+d: delay time in ms for the rear speakers (0ms to 1000ms) default is 15ms.
 .REss
 .IPs delay[=ch1:ch2:...]
 Delays the sound output.
Index: sound.html
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/sound.html,v
retrieving revision 1.61
diff -u -r1.61 sound.html
--- sound.html	9 Jan 2003 09:32:28 -0000	1.61
+++ sound.html	10 Jan 2003 01:05:36 -0000
@@ -189,15 +189,12 @@
 <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>Most filters respond to the <CODE>-v</CODE> switch, which makes the filters
-  print out status messages.</P>
-
 <P>The overall execution of the filter layer is controlled using the
   <CODE>-af-adv</CODE> switch. This switch has two suboptions:</P>
 
 <DL>
   <DT><CODE>force</CODE><DT>
-  <DD>is an integer between 0 and 3 that controls how the filters are inserted
+  <DD>is a bit field that controls how the filters are inserted
     and what speed/accuracy optimizations they use:
     <DL>
       <DT>0</DT>
@@ -205,17 +202,25 @@
         speed.</DD>
       <DT>1</DT>
       <DD>Use automatic insertion of filters and optimize for the highest speed.
-        If this option is set the processing of the audio data will be done
-        using fix point arithmetics. Warning: Some features in the audio filters
-        will silently fail, and the sound quality may drop.</DD>
+        Warning: Some features in the audio filters may
+        silently fail, and the sound quality may drop.</DD>
       <DT>2</DT>
-      <DD>Use automatic insertion of filters and optimize for quality. If this
-        option is set the processing of the audio data will be done using
-        floating point instructions and is therefore quite CPU intensive, but
-        gives a lot higher sound quality than fix point processing.</DD>
+      <DD>Use automatic insertion of filters and optimize for quality.</DD>
       <DT>3</DT>
       <DD>Use no automatic insertion of filters and no optimization. Warning: It
         may be possible to crash MPlayer using this setting.</DD>
+      <DT>4</DT>
+      <DD>Use automatic insertion of filters according to 0 above, but use
+      floating point processing when possible.</DD>
+      <DT>5</DT>
+      <DD>Use automatic insertion of filters according to 1 above, but use
+      floating point processing when possible.</DD>
+      <DT>6</DT>
+      <DD>Use automatic insertion of filters according to 2 above, but use
+      floating point processing when possible.</DD>
+      <DT>7</DT>
+      <DD>Use no automatic insertion of filters according to 3 above, and use
+      floating point processing when possible.</DD>
     </DL>
   </DD>
   
@@ -223,6 +228,30 @@
   <DD>is an alias for the -af switch.</DD>
 </DL>
 
+<P>The filter layer is also affected by the following generic switches:
+<DL>
+  <DT><CODE>-v</CODE></DT>
+  <DD>Increases the verbosity level and makes most filters print out
+    extra status in messages.</DD>
+  <DT><CODE>-channels</CODE></DT>
+  <DD>This option sets the number of output channels your sound-card
+    is using. 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
+    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 of your sound-card. 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 of the audio filter layer and
+    of 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>
 
 <H5><A NAME="af_resample">2.3.2.3.1 Up/Down-sampling</A></H5>
 
@@ -244,12 +273,18 @@
   <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 switch can be
-    used if the startup of the playback is extremely slow.</DD>
+    used if the startup of the playback is extremely slow. This option
+    is enabled by default.</DD>
 
-  <DT><CODE>fast</CODE><DT>
-  <DD>is an optional binary parameter that enables linear interpolation as
-    resampling method. Linear interpolation is extremely fast, but suffers from
-    poor sound quality especially when used for up-sampling.</DD>
+  <DT><CODE>type</CODE><DT>
+  <DD>is an optional integer between 0 and 2 that selects which
+    resampling method to use. Here 0 represents linear interpolation
+    as resampling method, 1 represents resampling using a poly-phase
+    filter-bank and integer processing and 2 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 2 but this method also suffers from the highest CPU load.</DD> 
 </DL>
 
 <P>Example:<BR>
@@ -364,7 +399,6 @@
 <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>
 
-
 <H5><A NAME="af_volume">2.3.2.3.5 Software volume control</A></H5>
 
 <P>This filter is a software volume control. Use this filter with caution since
@@ -478,6 +512,68 @@
 <P>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).</P>
+
+
+<H5><A NAME="af_sub">2.3.2.3.5 Sub-woofer</A></H5>
+
+<P>This filter adds a sub woofer channel to the audio 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 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:</P>
+
+<DL>
+  <DT><CODE>fc</CODE></DT>
+  <DD>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.</DD>
+
+  <DT><CODE>ch</CODE></DT>
+  <DD>is an optional integer between 0 and 5 which determines the
+    channel number in which to insert the sub-channel audio. The
+    default is channel number 5. Observe that the number of channels
+    will automatically be increased to <CODE>ch</CODE> if
+    necessary.</DD>
+</DL>
+
+<P>Example:<BR>
+  &nbsp;&nbsp;<CODE>mplayer -af sub=100:4 -channels 5 media.avi</CODE></P>
+
+<P>would add a sub-woofer channel with a cutoff frequency of 100Hz to
+  output channel 4.</P>
+
+<H5><A NAME="af_surround">2.3.2.3.6 Surround-sound decoder</A></H5>
+
+<P> This filter is a decoder for matrix encoded surround sound. 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:</P>
+
+<DL>
+  <DT><CODE>d</CODE></DT>
+  <DD>is an optional floating point number between 0 and 1000 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
+    <CODE>d</CODE> should be set to 15ms if d1 <= d2 and to 15 +
+    5*(d1-d2) if d1 > d2. The default value for <CODE>d</CODE> is
+    20ms. </DD>
+</DL>
+
+<P>Example:<BR>
+  &nbsp;&nbsp;<CODE>mplayer -af surround=15 -channels 4 media.avi</CODE></P>
+
+<P>would add a surround sound decoding with 15ms delay for the sound
+  to the rear speakers. </P>
+
+
 
 
 <H2><STRONG>Note: Audio plugins have been deprecated by audio filters and will be


More information about the MPlayer-dev-eng mailing list