2002-06-12 23:53:28 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2001-08-21 21:01:54 +00:00
< HTML >
2002-03-07 17:55:34 +00:00
< HEAD >
2002-08-04 00:07:55 +00:00
< TITLE > Sound - MPlayer - The Movie Player for Linux< / TITLE >
2002-06-12 09:14:08 +00:00
< LINK REL = "stylesheet" TYPE = "text/css" HREF = "default.css" >
2002-06-12 23:53:28 +00:00
< META HTTP-EQUIV = "Content-Type" CONTENT = "text/html; charset=iso-8859-1" >
2002-03-07 17:55:34 +00:00
< / HEAD >
2002-06-12 23:53:28 +00:00
< BODY >
2001-08-26 17:28:49 +00:00
2001-08-21 21:01:54 +00:00
2002-08-20 00:33:04 +00:00
< H3 > < A NAME = "audio" > 2.3.2 Audio output devices< / A > < / H3 >
2001-08-24 18:48:13 +00:00
2002-11-13 05:13:51 +00:00
< H4 > < A NAME = "sync" > 2.3.2.1 Description of MPlayer's A/V sync method< / A > < / H4 >
2002-10-20 12:20:39 +00:00
< P > MPlayer's audio interface is called < I > libao2< / I > . It currently
2002-08-11 18:27:38 +00:00
contains these drivers:< / P >
2001-09-14 16:13:28 +00:00
2001-09-17 18:15:18 +00:00
< TABLE BORDER = 0 >
2002-08-11 18:27:38 +00:00
< TR > < TD COLSPAN = 4 > < P > < B > General:< / B > < / P > < / TD > < / TR >
< TR > < TD > < / TD > < TD VALIGN = top > oss< / TD > < TD > < / TD > < TD > OSS (ioctl) driver (supports hardware AC3 passthrough)< / TD > < / TR >
< TR > < TD > < / TD > < TD VALIGN = top > sdl< / TD > < TD > < / TD > < TD > SDL driver (supports up/downsampling, < B > ESD< / B > , < B > ARTS< / B > etc)< / TD > < / TR >
< TR > < TD > < / TD > < TD VALIGN = top > nas< / TD > < TD > < / TD > < TD > NAS (Network Audio System) driver< / TD > < / TR >
< TR > < TD > < / TD > < TD VALIGN = top > alsa5< / TD > < TD > < / TD > < TD > native ALSA 0.5 driver< / TD > < / TR >
< TR > < TD > < / TD > < TD VALIGN = top > alsa9< / TD > < TD > < / TD > < TD > native ALSA 0.9 driver (supports hardware AC3 passthrough)< / TD > < / TR >
< TR > < TD > < / TD > < TD VALIGN = top > sun< / TD > < TD > < / TD > < TD > SUN audio driver (< CODE > /dev/audio< / CODE > ) for BSD and Solaris8 users< / TD > < / TR >
< TR > < TD > < / TD > < TD VALIGN = top > arts< / TD > < TD > < / TD > < TD > native ARTS driver (mostly for KDE users)< / TD > < / TR >
2001-09-17 18:15:18 +00:00
< / TABLE >
2001-08-24 18:48:13 +00:00
2002-11-13 05:13:51 +00:00
< P > Fact is, Linux sound card drivers have compatibility problems. The cause
is that MPlayer uses a feature of normally coded audio drivers to maintain
audio/video sync. Regrettably, some driver authors don't care of this
function: it isn't needed for playing MP3s, or sound effects.< / P >
< P > Other media players like aviplay or xine possibly work out-of-the-box with
these drivers because they use "simple" methods with internal timing. A note:
time showed their methods aren't AS efficient as MPlayer's.< / P >
< P > Using MPlayer with a correctly written audio driver won't ever give you A/V
desyncs related to the audio, only with very badly created files (check the
documentation 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 >
2002-04-21 15:29:59 +00:00
< UL >
2002-08-10 20:26:43 +00:00
< 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 >
2002-04-21 15:29:59 +00:00
< / UL >
2001-09-14 16:13:28 +00:00
2002-11-13 05:13:51 +00:00
< P > On < B > Solaris< / B > , use the SUN audio driver with the
2002-08-10 20:26:43 +00:00
< CODE > -ao sun< / CODE > option, otherwise neither video nor audio will work.< / P >
2001-09-14 16:13:28 +00:00
2002-08-20 00:33:04 +00:00
2002-11-13 05:13:51 +00:00
< H4 > < A NAME = "experiences" > 2.3.2.2 Sound Card experiences, recommendations< / A > < / H4 >
2001-08-24 18:48:13 +00:00
2002-04-21 15:29:59 +00:00
< TABLE BORDER = 0 WIDTH = "100%" >
2002-08-11 18:38:41 +00:00
< TR > < TD COLSPAN = 3 > < B > VIA onboard chipset (via82cxxx) 48kHz only< / B > < / TD > < / TR >
2002-08-23 10:50:19 +00:00
< TR > < TD > < / TD > < TD > Driver:< / TD > < TD > from < A HREF = "http://sourceforge.net/project/showfiles.php?group_id=3242&release_id=59602" > sourceforge.net< / A > < / TD > < / TR >
2002-08-11 18:38:41 +00:00
< TR > < TD COLSPAN = 3 > < B > Aureal Vortex 2< / B > < / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS:< / TD > < TD > no driver< / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS/Pro:< / TD > < TD > OK< / TD > < / TR >
< TR > < TD > < / TD > < TD > ALSA:< / TD > < TD > no driver< / TD > < / TR >
< TR > < TD > < / TD > < TD > Max kHz:< / TD > < TD > 48< / TD > < / TR >
< TR > < TD > < / TD > < TD > Driver:< / TD > < TD > < A HREF = "http://aureal.sourceforge.net" > aureal.sourceforge.net< / A > < / TD > < / TR >
2002-08-23 10:50:19 +00:00
< TR > < TD > < / TD > < TD > Driver2:< / TD > < TD > from < A HREF = "http://makacs.poliod.hu/~pontscho/aureal/au88xx-1.1.3.tar.bz2" > Pontscho's page< / A > < BR >
2002-08-11 18:38:41 +00:00
(< I > buffer size increased to 32k< / I > )< / TD > < / TR >
< TR > < TD COLSPAN = 3 > < B > GUS PnP< / B > < / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS:< / TD > < TD > no driver< / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS/Pro:< / TD > < TD > OK< / TD > < / TR >
< TR > < TD > < / TD > < TD > ALSA:< / TD > < TD > OK< / TD > < / TR >
< TR > < TD > < / TD > < TD > Max kHz:< / TD > < TD > 48< / TD > < / TR >
< TR > < TD COLSPAN = 3 > < B > SB Live!< / B > < / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS:< / TD > < TD > Analog OK, SP/DIF not working< / TD > < / TR >
< TR > < TD > < / TD > < TD > ALSA:< / TD > < TD > Both OK< / TD > < / TR >
< TR > < TD > < / TD > < TD > Max kHz:< / TD > < TD > 192< / TD > < / TR >
< TR > < TD COLSPAN = 3 > < B > SB AWE 64< / B > < / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS:< / TD > < TD > max 44kHz< / TD > < / TR >
< TR > < TD > < / TD > < TD > ALSA:< / TD > < TD > 48kHz sounds bad< / TD > < / TR >
< TR > < TD > < / TD > < TD > Max kHz:< / TD > < TD > 48< / TD > < / TR >
< TR > < TD COLSPAN = 3 > < B > Gravis UltraSound ACE< / B > < / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS:< / TD > < TD > not OK< / TD > < / TR >
< TR > < TD > < / TD > < TD > ALSA:< / TD > < TD > OK< / TD > < / TR >
< TR > < TD > < / TD > < TD > Max kHz:< / TD > < TD > 44< / TD > < / TR >
< TR > < TD COLSPAN = 3 > < B > Gravis UltraSound MAX< / B > < / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS:< / TD > < TD > OK< / TD > < / TR >
< TR > < TD > < / TD > < TD > ALSA:< / TD > < TD > OK (?)< / TD > < / TR >
< TR > < TD > < / TD > < TD > Max kHz:< / TD > < TD > 48< / TD > < / TR >
< TR > < TD COLSPAN = 3 > < B > ESS 688< / B > < / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS:< / TD > < TD > OK< / TD > < / TR >
< TR > < TD > < / TD > < TD > ALSA:< / TD > < TD > OK (?)< / TD > < / TR >
< TR > < TD > < / TD > < TD > Max kHz:< / TD > < TD > 48< / TD > < / TR >
< TR > < TD COLSPAN = 3 > < B > C-Media cards (which ones?)< / B > < / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS:< / TD > < TD > not OK (hissing) (?)< / TD > < / TR >
< TR > < TD > < / TD > < TD > ALSA:< / TD > < TD > OK (?)< / TD > < / TR >
< TR > < TD > < / TD > < TD > Max kHz:< / TD > < TD > ?< / TD > < / TR >
< TR > < TD COLSPAN = 3 > < B > Yamaha cards (*ymf*)< / B > < / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS:< / TD > < TD > not OK (?) (maybe < CODE > -ao sdl< / CODE > )< / TD > < / TR >
< TR > < TD > < / TD > < TD > ALSA:< / TD > < TD > OK only with ALSA 0.5 with OSS emulation < B > AND< / B > < CODE > -ao sdl< / CODE > (!) (?)< / TD > < / TR >
< TR > < TD > < / TD > < TD > Max kHz:< / TD > < TD > ?< / TD > < / TR >
< TR > < TD COLSPAN = 3 > < B > Cards with envy24 chips (like Terratec EWS88MT)< / B > < / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS:< / TD > < TD > ?< / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS/Pro:< / TD > < TD > OK< / TD > < / TR >
< TR > < TD > < / TD > < TD > ALSA:< / TD > < TD > ?< / TD > < / TR >
< TR > < TD > < / TD > < TD > Max kHz:< / TD > < TD > ?< / TD > < / TR >
< TR > < TD COLSPAN = 3 > < B > PC Speaker or DAC< / B > < / TD > < / TR >
< TR > < TD > < / TD > < TD > OSS:< / TD > < TD > OK (Use the SDL driver: < CODE > -ao sdl< / CODE > )< / TD > < / TR >
< TR > < TD > < / TD > < TD > ALSA:< / TD > < TD > no driver< / TD > < / TR >
< TR > < TD > < / TD > < TD > Max kHz:< / TD > < TD > The driver emulates 44.1, maybe more.< / TD > < / TR >
< TR > < TD > < / TD > < TD > Driver:< / TD > < TD > < A HREF = "ftp://ftp.infradead.org/pub/pcsp" > ftp://ftp.infradead.org/pub/pcsp< / A > < / TD > < / TR >
2002-04-21 15:29:59 +00:00
< / TABLE >
2002-08-27 18:06:07 +00:00
< P > On Linux, a 2.4.x kernel is highly recommended. Kernel 2.2 is not tested.< / P >
< P > 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#drives">CD-ROM section< / A > .< / P >
< P > Sharing your sound card with another application like XMMS is < B > strongly
discouraged< / B > ! If the other sound application is using ESD, start
2002-10-20 12:20:39 +00:00
MPlayer with the < CODE > -vo sdl:esd< / CODE > option to combine both
2002-08-27 18:06:07 +00:00
sound streams. In fact, the option < CODE > -vo sdl:esd< / CODE > could be used
2002-10-20 12:20:39 +00:00
with ESD even when playing MPlayer alone.< / P >
2002-08-27 18:06:07 +00:00
2002-10-20 12:20:39 +00:00
< P > Feedback to this document is welcome. Please tell us how MPlayer
2002-08-27 18:06:07 +00:00
and your sound card(s) worked together.< / P >
2001-08-21 21:01:54 +00:00
2001-12-23 15:55:11 +00:00
2002-11-13 05:13:51 +00:00
< H4 > < A NAME = "plugins" > 2.3.2.3 Audio plugins< / A > < / H4 >
2001-12-23 15:55:11 +00:00
2002-10-20 12:20:39 +00:00
< P > MPlayer has support for audio plugins. Audio plugins can be used for
2002-02-03 13:03:09 +00:00
changing the properties of the audio data before the sound reaches the sound
2002-04-21 15:29:59 +00:00
card. They are enabled using the < CODE > -aop< / CODE > switch which takes a
< CODE > list=plugin1,plugin2,...< / CODE > argument. The < CODE > list< / CODE > argument
is required and determines which plugins should be used and in which order they
2002-08-11 18:27:38 +00:00
should be executed. Example:< / P >
2002-02-03 13:03:09 +00:00
< P > < CODE > mplayer media.avi -aop list=resample,format< / CODE > < / P >
< P > would run the sound through the resampling plugin followed by the format
2002-08-11 18:27:38 +00:00
plugin.< / P >
2002-02-03 13:03:09 +00:00
2002-04-21 15:29:59 +00:00
< P > The plugins can also have switches that change their behavior. These
2002-02-03 13:03:09 +00:00
switches are explained in detail in the sections below. A plugin will execute
2002-04-21 15:29:59 +00:00
using default settings if its switches are omitted. Here is an example of how
2002-08-11 18:27:38 +00:00
to use plugins in combination with plugin specific switches:< / P >
2002-02-03 13:03:09 +00:00
< P > < CODE > mplayer media.avi -aop
2002-08-11 18:27:38 +00:00
list=resample,format:fout=44100:format=0x8< / CODE > < / P >
2002-02-03 13:03:09 +00:00
< P > would set the output frequency of the resample plugin to 44100Hz and the
2002-08-11 18:27:38 +00:00
output format of the format plugin to AFMT_U8.< / P >
2002-02-03 13:03:09 +00:00
2002-10-20 12:20:39 +00:00
< P > Currently audio plugins can not be used in MEncoder.< / P >
2002-02-03 13:03:09 +00:00
2002-11-13 05:13:51 +00:00
< H5 > < A NAME = "resample" > 2.3.2.3.1 Up/Downsampling< / A > < / H5 >
2001-12-23 15:55:11 +00:00
2002-10-20 12:20:39 +00:00
< P > MPlayer fully supports up/downsampling of the sound. This plugin can
2002-04-21 15:29:59 +00:00
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.
2002-02-03 13:03:09 +00:00
Limitations in your hardware are not auto detected, so you have to specify
the sample frequency explicitly. This plugin has one switch:
< CODE > fout< / CODE > which is used for setting the desired output sample
2002-04-21 15:29:59 +00:00
frequency. It defaults to 48kHz, and is given in
2002-08-11 18:27:38 +00:00
< Hz> .< / P >
2001-12-23 15:55:11 +00:00
2002-04-21 15:29:59 +00:00
< P > Usage:< BR >
2002-08-11 18:27:38 +00:00
< CODE > mplayer media.avi -aop list=resample:fout=< required
2001-12-23 15:55:11 +00:00
frequency in Hz, like 44100> < / CODE > < / P >
2002-04-21 15:29:59 +00:00
< P > Note that the output frequency should not be scaled up from the default value.
Scaling up will cause the audio and video streams to be played in slow motion
in addition to audio distortion.< / P >
2001-12-23 15:55:11 +00:00
2002-08-11 18:27:38 +00:00
2002-11-13 05:13:51 +00:00
< H5 > < A NAME = "surround_decoding" > 2.3.2.3.2 Surround Sound decoding< / A > < / H5 >
2002-01-01 18:20:40 +00:00
2002-10-20 12:20:39 +00:00
< P > MPlayer has an audio plugin that can decode matrix encoded
2002-08-11 18:27:38 +00:00
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.< / P >
2002-01-01 18:20:40 +00:00
2002-04-21 15:29:59 +00:00
< P > Usage:< BR >
2002-08-11 18:27:38 +00:00
< CODE > mplayer media.avi -aop list=surround< / CODE > < / P >
2002-01-01 18:20:40 +00:00
2002-02-03 13:03:09 +00:00
2002-11-13 05:13:51 +00:00
< H5 > < A NAME = "format" > 2.3.2.3.3 Sample format converter< / A > < / H5 >
2002-02-03 13:03:09 +00:00
2002-04-21 15:29:59 +00:00
< P > If your sound card driver does not support signed 16bit < CODE > int< / CODE > data type,
this plugin can
2002-02-03 13:03:09 +00:00
be used to change the format to one which your sound card can understand. It
2002-04-21 15:29:59 +00:00
has one switch, < CODE > format< / CODE > , which can be set to one of the numbers
found in < CODE > libao2/afmt.h< / CODE > . This plugin is hardly ever needed and is
intended for advanced users. Keep in mind that this plugin only changes the
2002-08-11 18:27:38 +00:00
sample format and not the sample frequency or the number of channels.< / P >
2002-02-03 13:03:09 +00:00
2002-04-21 15:29:59 +00:00
< P > Usage:< BR >
2002-02-03 13:03:09 +00:00
< CODE > mplayer media.avi -aop
2002-08-11 18:27:38 +00:00
list=format:format=< required output format> < / CODE > < / P >
2002-02-03 13:03:09 +00:00
2002-11-13 05:13:51 +00:00
< H5 > < A NAME = "delay" > 2.3.2.3.4 Delay< / A > < / H5 >
2002-02-03 13:03:09 +00:00
< P > This plugin delays the sound and is intended as an example of how to develop
2002-04-21 15:29:59 +00:00
new plugins. It can not be used for anything useful from a users perspective
2002-02-03 13:03:09 +00:00
and is mentioned here for the sake of completeness only. Do not use this
plugin unless you are a developer.< / P >
2002-08-20 00:33:04 +00:00
2002-11-13 05:13:51 +00:00
< H5 > < A NAME = "volume" > 2.3.2.3.5 Software volume control< / A > < / H5 >
2002-03-02 18:22:44 +00:00
< P > This plugin is a software replacement for the volume control, and
2002-04-21 15:29:59 +00:00
can be used on machines with a broken mixer device. It can also be
2002-10-20 12:20:39 +00:00
used if one wants to change the output volume of MPlayer
2002-03-02 18:22:44 +00:00
without changing the PCM volume setting in the mixer. It has one
switch < CODE > volume< / CODE > that is used for setting the initial
sound level. The initial sound level can be set to values between 0
2002-03-15 20:36:20 +00:00
and 255 and defaults to 101 which equals 0dB amplification. Use this
plugin 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 plugin out and control the output level to
2002-04-21 15:29:59 +00:00
your speakers with the master volume control of the mixer. If there is an
2002-03-15 20:36:20 +00:00
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
2002-08-11 18:27:38 +00:00
in the background is gone.< / P >
2002-03-02 18:22:44 +00:00
2002-04-21 15:29:59 +00:00
< P > Usage:< BR >
2002-03-02 18:22:44 +00:00
< CODE > mplayer media.avi -aop
2002-08-11 18:27:38 +00:00
list=volume:volume=< 0-255> < / CODE > < / P >
2002-03-02 18:22:44 +00:00
2002-04-21 15:29:59 +00:00
< P > This plugin also has compressor or "soft-clipping" capabilities.
2002-03-15 20:36:20 +00:00
Compression can be used if the dynamic range of the sound is very
high or if the dynamic range of the loudspeakers is very
2002-04-21 15:29:59 +00:00
low. Be aware that this feature creates distortion and should be
2002-08-11 18:27:38 +00:00
considered a last resort.< / P >
2002-03-15 20:36:20 +00:00
2002-04-21 15:29:59 +00:00
< P > Usage:< BR >
2002-03-15 20:36:20 +00:00
< CODE > mplayer media.avi -aop
2002-08-11 18:27:38 +00:00
list=volume:softclip< / CODE > < / P >
2002-03-03 16:47:04 +00:00
2002-03-15 22:14:26 +00:00
2002-11-13 05:13:51 +00:00
< H5 > < A NAME = "extrastereo" > 2.3.2.3.6 Extrastereo< / A > < / H5 >
2002-03-03 16:47:04 +00:00
2002-04-21 15:29:59 +00:00
< P > This plugin (linearly) increases the difference between left and right
channels (like the XMMS extrastereo plugin) which gives some sort of "live"
2002-08-11 18:27:38 +00:00
effect to playback.< / P >
2002-03-03 16:47:04 +00:00
2002-04-21 15:29:59 +00:00
< P > Usage:< BR >
2002-03-03 16:47:04 +00:00
< CODE > mplayer media.avi -aop list=extrastereo< / CODE > < BR >
< CODE > mplayer media.avi -aop list=extrastereo:mul=3.45< / CODE > < / P >
< P > The default coefficient (< CODE > mul< / CODE > ) is a float number that defaults
2002-04-21 15:29:59 +00:00
to 2.5. If you set it to 0.0, you will have mono sound (average of both
2002-06-02 19:06:11 +00:00
channels). If you set it to 1.0, sound will be unchanged, if you set it to
-1.0, left and right channels will be swapped.< / P >
2002-03-03 16:47:04 +00:00
2002-03-15 22:14:26 +00:00
2002-11-13 05:13:51 +00:00
< H5 > < A NAME = "normalizer" > 2.3.2.3.7 Volume normalizer< / A > < / H5 >
2002-03-15 22:14:26 +00:00
2002-04-21 15:29:59 +00:00
< P > This plugin maximizes the volume without distorting the sound.< / P >
2002-03-15 22:14:26 +00:00
2002-04-21 15:29:59 +00:00
< P > Usage:< BR >
2002-03-15 22:14:26 +00:00
< CODE > mplayer media.avi -aop list=volnorm< / CODE > < BR >
2002-04-20 07:02:36 +00:00
2001-08-21 21:01:54 +00:00
< / BODY >
< / HTML >