Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > c152d44cf90e046b661655b5995890a5 > files > 198

mplayer-doc-1.0-1.rc2.18.2mdv2009.0.i586.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>3.6. Advanced audio</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="MPlayer - The Movie Player"><link rel="up" href="usage.html" title="Chapter 3. Usage"><link rel="prev" href="edl.html" title="3.5. Edit Decision Lists (EDL)"><link rel="next" href="cd-dvd.html" title="Chapter 4. CD/DVD usage"><link rel="preface" href="howtoread.html" title="How to read this documentation"><link rel="chapter" href="intro.html" title="Chapter 1. Introduction"><link rel="chapter" href="install.html" title="Chapter 2. Installation"><link rel="chapter" href="usage.html" title="Chapter 3. Usage"><link rel="chapter" href="cd-dvd.html" title="Chapter 4. CD/DVD usage"><link rel="chapter" href="faq.html" title="Chapter 5. Frequently Asked Questions"><link rel="chapter" href="containers.html" title="Chapter 6. Containers"><link rel="chapter" href="codecs.html" title="Chapter 7. Codecs"><link rel="chapter" href="video.html" title="Chapter 8. Video output devices"><link rel="chapter" href="audio.html" title="Chapter 9. Audio output devices"><link rel="chapter" href="tv.html" title="Chapter 10. TV"><link rel="chapter" href="radio.html" title="Chapter 11. Radio"><link rel="chapter" href="ports.html" title="Chapter 12. Ports"><link rel="chapter" href="mencoder.html" title="Chapter 13. Basic usage of MEncoder"><link rel="chapter" href="encoding-guide.html" title="Chapter 14. Encoding with MEncoder"><link rel="appendix" href="bugreports.html" title="Appendix A. How to report bugs"><link rel="appendix" href="bugs.html" title="Appendix B. Known bugs"><link rel="appendix" href="skin.html" title="Appendix C. MPlayer skin format"><link rel="appendix" href="history.html" title="Appendix D. History"><link rel="subsection" href="advaudio.html#advaudio-surround" title="3.6.1. Surround/Multichannel playback"><link rel="subsection" href="advaudio.html#advaudio-channels" title="3.6.2. Channel manipulation"><link rel="subsection" href="advaudio.html#advaudio-volume" title="3.6.3. Software Volume adjustment"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.6. Advanced audio</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="edl.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Usage</th><td width="20%" align="right"> <a accesskey="n" href="cd-dvd.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="advaudio"></a>3.6. Advanced audio</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="advaudio-surround"></a>3.6.1. Surround/Multichannel playback</h3></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="advaudio-surround-DVD"></a>3.6.1.1. DVDs</h4></div></div></div><p>
Most DVDs and many other files include surround sound.
<span class="application">MPlayer</span> supports surround playback but does not
enable it by default because stereo equipment is by far more common. To play a
file that has more than two channels of audio use <tt class="option">-channels</tt>.
For example, to play a DVD with 5.1 audio:
</p><pre class="screen">mplayer dvd://1 -channels 6</pre><p>
Note that despite the name "5.1" there are actually six discrete channels.
If you have surround sound equipment it is safe to put the
<tt class="option">channels</tt> option in your <span class="application">MPlayer</span>
configuration file <tt class="filename">~/.mplayer/config</tt>. For example, to make
quadraphonic playback the default, add this line:
</p><pre class="programlisting">channels=4</pre><p>
<span class="application">MPlayer</span> will then output audio in four channels when
all four channels are available.
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="advaudio-surround-stereoinfour"></a>3.6.1.2. Playing stereo files to four speakers</h4></div></div></div><p>
<span class="application">MPlayer</span> does not duplicate any channels by default,
and neither do most audio drivers. If you want to do that manually:
</p><pre class="screen">mplayer <em class="replaceable"><code>filename</code></em> -af channels=2:2:0:1:0:0</pre><p>
See the section on
<a class="link" href="advaudio.html#advaudio-channels-copying" title="3.6.2.3. Channel copying/moving">channel copying</a> for an
explanation.
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="advaudio-surround-passthrough"></a>3.6.1.3. AC-3/DTS Passthrough</h4></div></div></div><p>
DVDs usually have surround audio encoded in AC-3 (Dolby Digital) or DTS
(Digital Theater System) format. Some modern audio equipment is capable of
decoding these formats internally. <span class="application">MPlayer</span> can be
configured to relay the audio data without decoding it. This will only work if
you have a S/PDIF (Sony/Philips Digital Interface) jack in your sound card.
</p><p>
If your audio equipment can decode both AC-3 and DTS, you can safely enable
passthrough for both formats. Otherwise, enable passthrough for only the format
your equipment supports.
</p><div class="itemizedlist"><p class="title"><b>To enable passthrough on the command line:</b></p><ul type="disc"><li><p>
  For AC-3 only, use <tt class="option">-ac hwac3</tt>
</p></li><li><p>
  For DTS only, use <tt class="option">-ac hwdts</tt>
</p></li><li><p>
  For both AC-3 and DTS, use <tt class="option">-afm hwac3</tt>
</p></li></ul></div><div class="itemizedlist"><p class="title"><b>To enable passthrough in the <span class="application">MPlayer</span>
  configuration file: </b></p><ul type="disc"><li><p>
  For AC-3 only, use <tt class="option">ac=hwac3,</tt>
</p></li><li><p>
  For DTS only, use <tt class="option">ac=hwdts,</tt>
</p></li><li><p>
  For both AC-3 and DTS, use <tt class="option">afm=hwac3</tt>
</p></li></ul></div><p>
Note that there is a comma (",") at the end of
<tt class="option">ac=hwac3,</tt> and <tt class="option">ac=hwdts,</tt>. This will make
<span class="application">MPlayer</span> fall back on the codecs it normally uses when
playing a file that does not have AC-3 or DTS audio.
<tt class="option">afm=hwac3</tt> does not need a comma;
<span class="application">MPlayer</span> will fall back anyway when an audio family
is specified.
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="hwmpa-surround-passthrough"></a>3.6.1.4. MPEG audio Passthrough</h4></div></div></div><p>
Digital TV transmissions (such as DVB and ATSC) and some DVDs usually have 
MPEG audio streams (in particular MP2).
Some MPEG hardware decoders such as full-featured DVB cards and DXR2 
adapters can natively decode this format. 
<span class="application">MPlayer</span> can be configured to relay the audio data 
without decoding it.
</p><p>
To use this codec:
</p><pre class="screen"> mplayer -ac hwmpa </pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="advaudio-surround-matrix"></a>3.6.1.5. Matrix-encoded audio</h4></div></div></div><p>
<span class="emphasis"><em>***TODO***</em></span>
</p><p>
This section has yet to be written and cannot be completed until somebody
provides sample files for us to test. If you have any matrix-encoded audio
files, know where to find some, or have any information that could be helpful,
please send a message to the
<a class="ulink" href="http://lists.mplayerhq.hu/mailman/listinfo/mplayer-docs" target="_top">MPlayer-DOCS</a>
mailing list. Put "[matrix-encoded audio]" in the subject line.
</p><p>
If no files or further information are forthcoming this section will be dropped.
</p><p>
Good links:
</p><div class="itemizedlist"><ul type="disc"><li><p>
  <a class="ulink" href="http://electronics.howstuffworks.com/surround-sound5.htm" target="_top">http://electronics.howstuffworks.com/surround-sound5.htm</a>
</p></li><li><p>
  <a class="ulink" href="http://www.extremetech.com/article2/0,1697,1016875,00.asp" target="_top">http://www.extremetech.com/article2/0,1697,1016875,00.asp</a>
</p></li></ul></div><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="advaudio-surround-hrtf"></a>3.6.1.6. Surround emulation in headphones</h4></div></div></div><p>
<span class="application">MPlayer</span> includes an HRTF (Head Related Transfer
Function) filter based on an
<a class="ulink" href="http://sound.media.mit.edu/KEMAR.html" target="_top">MIT project</a>
wherein measurements were taken from microphones mounted on a dummy human head.
</p><p>
Although it is not possible to exactly imitate a surround system,
<span class="application">MPlayer</span>'s HRTF filter does provide more spatially
immersive audio in 2-channel headphones. Regular downmixing simply combines all
the channels into two; besides combining the channels, <tt class="option">hrtf</tt>
generates subtle echoes, increases the stereo separation slightly, and alters
the volume of some frequencies. Whether HRTF sounds better may be dependent on
the source audio and a matter of personal taste, but it is definitely worth
trying out.
</p><p>
To play a DVD with HRTF:
</p><pre class="screen">mplayer dvd://1 -channels 6 -af hrtf</pre><p>
</p><p>
<tt class="option">hrtf</tt> only works well with 5 or 6 channels. Also,
<tt class="option">hrtf</tt> requires 48 kHz audio. DVD audio is already 48 kHz, but if
you have a file with a different sampling rate that you want to play using
<tt class="option">hrtf</tt> you must resample it:
</p><pre class="screen">
mplayer <em class="replaceable"><code>filename</code></em> -channels 6 -af resample=48000,hrtf
</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="advaudio-surround-troubleshooting"></a>3.6.1.7. Troubleshooting</h4></div></div></div><p>
If you do not hear any sound out of your surround channels, check your mixer
settings with a mixer program such as <span class="application">alsamixer</span>;
audio outputs are often muted and set to zero volume by default.
</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="advaudio-channels"></a>3.6.2. Channel manipulation</h3></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="advaudio-channels-general"></a>3.6.2.1. General information</h4></div></div></div><p>
Unfortunately, there is no standard for how channels are ordered. The orders
listed below are those of AC-3 and are fairly typical; try them and see if your
source matches. Channels are numbered starting with 0.

</p><div class="orderedlist"><p class="title"><b>mono</b></p><ol type="1" compact><li value="0"><p>center</p></li></ol></div><p>

</p><div class="orderedlist"><p class="title"><b>stereo</b></p><ol type="1" compact><li value="0"><p>left</p></li><li><p>right</p></li></ol></div><p>

</p><div class="orderedlist"><p class="title"><b>quadraphonic</b></p><ol type="1" compact><li value="0"><p>left front</p></li><li><p>right front</p></li><li><p>left rear</p></li><li><p>right rear</p></li></ol></div><p>

</p><div class="orderedlist"><p class="title"><b>surround 4.0</b></p><ol type="1" compact><li value="0"><p>left front</p></li><li><p>right front</p></li><li><p>center rear</p></li><li><p>center front</p></li></ol></div><p>

</p><div class="orderedlist"><p class="title"><b>surround 5.0</b></p><ol type="1" compact><li value="0"><p>left front</p></li><li><p>right front</p></li><li><p>left rear</p></li><li><p>right rear</p></li><li><p>center front</p></li></ol></div><p>

</p><div class="orderedlist"><p class="title"><b>surround 5.1</b></p><ol type="1" compact><li value="0"><p>left front</p></li><li><p>right front</p></li><li><p>left rear</p></li><li><p>right rear</p></li><li><p>center front</p></li><li><p>subwoofer</p></li></ol></div><p>
</p><p>
The <tt class="option">-channels</tt> option is used to request the number of
channels from the audio decoder. Some audio codecs use the number of specified
channels to decide if downmixing the source is necessary. Note that this does
not always affect the number of output channels. For example, using
<tt class="option">-channels 4</tt> to play a stereo MP3 file will still result in
2-channel output since the MP3 codec will not produce the extra channels.
</p><p>
The <tt class="option">channels</tt> audio filter can be used to create or remove
channels and is useful for controlling the number of channels sent to the sound
card. See the following sections for more information on channel manipulation.
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="advaudio-channels-mono"></a>3.6.2.2. Playing mono with two speakers</h4></div></div></div><p>
Mono sounds a lot better when played through two speakers - especially when
using headphones. Audio files that truly have one channel are automatically
played through two speakers; unfortunately, most files with mono sound are
actually encoded as stereo with one channel silent. The easiest and most
foolproof way to make both speakers output the same audio is the
<tt class="option">extrastereo</tt> filter:
</p><pre class="screen">mplayer <em class="replaceable"><code>filename</code></em> -af extrastereo=0</pre><p>
</p><p>
This averages both channels, resulting in both channels being half as loud as
the original. The next sections have examples of other ways to do this without a
volume decrease, but they are more complex and require different options
depending on which channel to keep. If you really need to maintain the volume,
it may be easier to experiment with the <tt class="option">volume</tt> filter and find
the right value. For example:
</p><pre class="screen">
mplayer <em class="replaceable"><code>filename</code></em> -af extrastereo=0,volume=5
</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="advaudio-channels-copying"></a>3.6.2.3. Channel copying/moving</h4></div></div></div><p>
The <tt class="option">channels</tt> filter can move any or all channels.
Setting up all the suboptions for the <tt class="option">channels</tt>
filter can be complicated and takes a little care.

</p><div class="orderedlist"><ol type="1" compact><li><p>
  Decide how many output channels you need. This is the first suboption.
</p></li><li><p>
  Count how many channel moves you will do. This is the second suboption. Each
  channel can be moved to several different channels at the same time, but keep
  in mind that when a channel is moved (even if to only one destination) the
  source channel will be empty unless another channel is moved into it. To copy
  a channel, keeping the source the same, simply move the channel into both the
  destination and the source. For example:
  </p><pre class="programlisting">
channel 2 --&gt; channel 3
channel 2 --&gt; channel 2</pre><p>
</p></li><li><p>
  Write out the channel copies as pairs of suboptions. Note that the first
  channel is 0, the second is 1, etc. The order of these suboptions does not
  matter as long as they are properly grouped into
  <em class="replaceable"><code>source:destination</code></em> pairs.
</p></li></ol></div><p>
</p><h5><a name="id2549875"></a>Example: one channel in two speakers</h5><p>
Here is an example of another way to play one channel in both speakers. Suppose
for this example that the left channel should be played and the right channel
discarded. Following the steps above:
</p><div class="orderedlist"><ol type="1"><li><p>
  In order to provide an output channel for each of the two speakers, the first
  suboption must be "2".
</p></li><li><p>
  The left channel needs to be moved to the right channel, and also must be
  moved to itself so it won't be empty. This is a total of two moves, making
  the second suboption "2" as well.
</p></li><li><p>
  To move the left channel (channel 0) into the right channel (channel 1), the
  suboption pair is "0:1", "0:0" moves the left channel onto itself.
</p></li></ol></div><p>
Putting that all together gives:
</p><pre class="screen">
mplayer <em class="replaceable"><code>filename</code></em> -af channels=2:2:0:1:0:0
</pre><p>
</p><p>
The advantage this example has over <tt class="option">extrastereo</tt> is that the
volume of each output channel is the same as the input channel. The disadvantage
is that the suboptions must be changed to "2:2:1:0:1:1" when the desired audio
is in the right channel. Also, it is more difficult to remember and type.
</p><h5><a name="id2549934"></a>Example: left channel in two speakers shortcut</h5><p>
There is actually a much easier way to use the <tt class="option">channels</tt> filter
for playing the left channel in both speakers:
</p><pre class="screen">mplayer <em class="replaceable"><code>filename</code></em> -af channels=1</pre><p>
The second channel is discarded and, with no further suboptions, the single
remaining channel is left alone. Sound card drivers automatically play
single-channel audio in both speakers. This only works when the desired channel
is on the left.
</p><h5><a name="id2549960"></a>Example: duplicate front channels to the rear</h5><p>
Another common operation is to duplicate the front channels and play them back
on the rear speakers of a quadraphonic setup.
</p><div class="orderedlist"><ol type="1"><li><p>
  There should be four output channels. The first suboption is "4".
</p></li><li><p>
  Each of the two front channels needs to be moved to the corresponding rear
  channel and also to itself. This is four moves, so the second suboption is "4".
</p></li><li><p>
  The left front (channel 0) needs to moved to the left rear (channel 2):
  "0:2".  The left front also needs to be moved to itself: "0:0". The right
  front (channel 1) is moved to the right rear (channel 3): "1:3", and also to
  itself: "1:1".
</p></li></ol></div><p>
Combine all the suboptions to get:
</p><pre class="screen">
mplayer <em class="replaceable"><code>filename</code></em> -af channels=4:4:0:2:0:0:1:3:1:1
</pre><p>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="advaudio-channels-mixing"></a>3.6.2.4. Channel mixing</h4></div></div></div><p>
The <tt class="option">pan</tt> filter can mix channels in user-specified proportions.
This allows for everything the <tt class="option">channels</tt> filter can do and
more. Unfortunately, the suboptions are much more complicated.
</p><div class="orderedlist"><ol type="1"><li><p>
  Decide how many channels to work with. You may need to specify this with
  <tt class="option">-channels</tt> and/or <tt class="option">-af channels</tt>.
  Later examples will show when to use which.
</p></li><li><p>
  Decide how many channels to feed into <tt class="option">pan</tt> (further decoded
  channels are discarded). This is the first suboption, and it also controls how
  many channels to employ for output.
</p></li><li><p>
  The remaining suboptions specify how much of each channel gets mixed into each
  other channel. This is the complicated part. To break the task down, split the
  suboptions into several sets, one set for each output channel. Each suboption
  within a set corresponds to an input channel. The number you specify will be
  the percentage of the input channel that gets mixed into the output channel.
  </p><p>
  <tt class="option">pan</tt> accepts values from 0 to 512, yielding 0% to 51200% of
  the original volume. Be careful when using values greater than 1. Not only
  can this give you very high volume, but if you exceed the sample range of
  your sound card you may hear painful pops and clicks. If you want you can
  follow <tt class="option">pan</tt> with <tt class="option">,volume</tt> to enable clipping,
  but it is best to keep the values of <tt class="option">pan</tt> low enough that
  clipping is not necessary.
  </p></li></ol></div><p>
</p><h5><a name="id2550096"></a>Example: one channel in two speakers</h5><p>
Here is yet another example for playing the left channel in two speakers. Follow
the steps above:
</p><div class="orderedlist"><ol type="1"><li><p>
  <tt class="option">pan</tt> should output two channels, so the first
  suboption is "2".
</p></li><li><p>
  Since we have two input channels, there will be two sets of suboptions.
  Since there are also two output channels,
  there will be two suboptions per set.
  The left channel from the file should go with full volume to
  the new left and the right channels.
  Thus the first set of suboptions is "1:1".
  The right channel should be discarded, so the second would be "0:0".
  Any 0 values at the end can be left out, but for ease of
  understanding we will keep them.
</p></li></ol></div><p>
Putting those options together gives:
</p><pre class="screen">mplayer <em class="replaceable"><code>filename</code></em> -af pan=2:1:1:0:0</pre><p>
If the right channel is desired instead of the left, the suboptions to
<tt class="option">pan</tt> will be "2:0:0:1:1".
</p><h5><a name="id2550147"></a>Example: left channel in two speakers shortcut</h5><p>
As with <tt class="option">channels</tt>, there is a shortcut that only works with the
left channel:
</p><pre class="screen">mplayer <em class="replaceable"><code>filename</code></em> -af pan=1:1</pre><p>
Since <tt class="option">pan</tt> has only one channel of input (the other channel is
discarded), there is only one set with one suboption, which specifies that the
only channel gets 100% of itself.
</p><h5><a name="id2550173"></a>Example: downmixing 6-channel PCM</h5><p>
<span class="application">MPlayer</span>'s decoder for 6-channel PCM is not capable of
downmixing. Here is a way to downmix PCM using <tt class="option">pan</tt>:
</p><div class="orderedlist"><ol type="1"><li><p>
  The number of output channels is 2, so the first suboption is "2".
</p></li><li><p>
  With six input channels there will be six sets of options. Fortunately,
  since we only care about the output of the first two channels, we only need to
  make two sets; the remaining four sets can be omitted. Beware that not all
  multichannel audio files have the same channel order! This example
  demonstrates downmixing a file with the same channels as AC-3 5.1:
  </p><pre class="programlisting">
0 - front left
1 - front right
2 - rear left
3 - rear right
4 - center front
5 - subwoofer</pre><p>
  The first set of suboptions lists the percentages of the original volume, in
  order, which each output channel should receive from the
  front left channel: "1:0".
  The front right channel should go into the right output: "0:1".
  The same for the rear channels: "1:0" and "0:1".
  The center channel goes into both output channels with half volume:
  "0.5:0.5", and the subwoofer goes into both with full volume: "1:1".
</p></li></ol></div><p>
Put all that together, for:
</p><pre class="screen">
mplayer <em class="replaceable"><code>6-channel.wav</code></em> -af pan=2:1:0:0:1:1:0:0:1:0.5:0.5:1:1
</pre><p>
The percentages listed above are only a rough example. Feel free to tweak them.
</p><h5><a name="id2550240"></a>Example: Playing 5.1 audio on big speakers without a subwoofer</h5><p>
If you have a huge pair of front speakers you may not want to waste any money on
buying a subwoofer for a complete 5.1 sound system. If you use
<tt class="option">-channels 5</tt> to request that liba52 decode 5.1 audio in 5.0,
the subwoofer channel is simply discarded. If you want to distribute the
subwoofer channel yourself you need to downmix manually with
<tt class="option">pan</tt>:
</p><div class="orderedlist"><ol type="1"><li><p>
  Since <tt class="option">pan</tt> needs to examine all six channels, specify
  <tt class="option">-channels 6</tt> so liba52 decodes them all.
</p></li><li><p>
  <tt class="option">pan</tt> outputs to only five channels, the first suboption is 5.
</p></li><li><p>
  Six input channels and five output channels means six sets of five suboptions.
  </p><div class="itemizedlist"><ul type="disc" compact><li><p>
    The left front channel only replicates onto itself:
    "1:0:0:0:0"
  </p></li><li><p>
    Same for the right front channel:
    "0:1:0:0:0"
  </p></li><li><p>
    Same for the left rear channel:
    "0:0:1:0:0"
  </p></li><li><p>
    And also the same for the right rear channel:
    "0:0:0:1:0"
  </p></li><li><p>
    Center front, too:
    "0:0:0:0:1"
  </p></li><li><p>
    And now we have to decide what to do with the subwoofer,
    e.g. half into front right and front left:
    "0.5:0.5:0:0:0"
  </p></li></ul></div><p>
</p></li></ol></div><p>
Combine all those options to get:
</p><pre class="screen">
mplayer <em class="replaceable"><code>dvd://1</code></em> -channels 6 -af pan=5:1:0:0:0:0:0:1:0:0:0:0:0:1:0:0:0:0:0:1:0:0:0:0:0:1:0.5:0.5:0:0:0
</pre><p>
</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="advaudio-volume"></a>3.6.3. Software Volume adjustment</h3></div></div></div><p>
Some audio tracks are too quiet to be heard comfortably without amplification.
This becomes a problem when your audio equipment cannot amplify the signal for
you. The <tt class="option">-softvol</tt> option directs
<span class="application">MPlayer</span> to use an internal mixer. You can then use
the volume adjustment keys (by default <span class="keycap"><b>9</b></span> and
<span class="keycap"><b>0</b></span>) to reach much higher volume levels. Note that this does not
bypass your sound card's mixer; <span class="application">MPlayer</span> only
amplifies the signal before sending it to your sound card.
The following example is a good start:
</p><pre class="screen">
mplayer <em class="replaceable"><code>quiet-file</code></em> -softvol -softvol-max 300
</pre><p>
The <tt class="option">-softvol-max</tt> option specifies the maximum allowable output
volume as a percentage of the
original volume. For example, <tt class="option">-softvol-max 200</tt> would allow the
volume to be adjusted up to twice its original level.
It is safe to specify a large value with
<tt class="option">-softvol-max</tt>; the higher volume will not be used until you
use the volume adjustment keys. The only disadvantage of a large value is that,
since <span class="application">MPlayer</span> adjusts volume by a percentage of the
maximum, you will not have as precise control when using the volume adjustment
keys. Use a lower value with <tt class="option">-softvol-max</tt> and/or specify
<tt class="option">-volstep 1</tt> if you need higher precision.
</p><p>
The <tt class="option">-softvol</tt> option works by controlling the
<tt class="option">volume</tt> audio filter. If you want to play a file at a certain
volume from the beginning you can specify <tt class="option">volume</tt> manually:
</p><pre class="screen">mplayer <em class="replaceable"><code>quiet-file</code></em> -af volume=10</pre><p>
This will play the file with a ten decibel gain. Be careful when using the
<tt class="option">volume</tt> filter - you could easily hurt your ears if you use
too high a value. Start low and work your way up gradually until you get a feel
for how much adjustment is required. Also, if you specify excessively high
values, <tt class="option">volume</tt> may need to clip the signal to avoid sending
your sound card data that is outside the allowable range; this will result in
distorted audio.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="edl.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="usage.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="cd-dvd.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.5. Edit Decision Lists (EDL) </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 4. CD/DVD usage</td></tr></table></div></body></html>