Mplayer (Howto)

From the ALSA wiki

(Difference between revisions)
Jump to: navigation, search
(corrected dmixplugin link)
(cleanup + more links)
 
Line 1: Line 1:
-
This article describes how to get the ''Mplayer'' media player program to work with the ''ALSA:dmix''.
+
This article describes how to get the [[mplayer]] media player program to work with the <code>[[dmix]]</code> plugin.
-
== Is there a way to get <code>[[mplayer]]</code> working with ALSA <code>plug:dmix</code> ? ==
+
== Is there a way to get mplayer working with ALSA <code>plug:dmix</code>? ==
-
Yes, you need to use [[SDL]] to get sound output when using <code>[[mplayer]]</code> and <code>plug:dmix</code> (see the page [[DmixPlugin]] for info on software mixing of multiple PCM streams). The reason is that the current <code>mplayer</code> 1.0pre3 alsa9 doesn't handle ALSA devices properly by design according to a message on the mailinglist.
+
Yes, you need to use [[SDL]] to get sound output when using <code>[[mplayer]]</code> and <code>plug:dmix</code> (see the page [[dmix]] for info on [[Hardware mixing, software mixing | software mixing]] of multiple PCM [[stream]]s). The reason is that the current <code>mplayer</code> 1.0pre3 alsa9 doesn't handle ALSA devices properly by design according to a message on the mailinglist.
To use SDL, set up the SDL audio handlers like this if you use the <code>bash</code> shell:
To use SDL, set up the SDL audio handlers like this if you use the <code>bash</code> shell:
<code>
<code>
-
    export SDL_AUDIODRIVER=alsa
+
export SDL_AUDIODRIVER=alsa
-
    export AUDIODEV=plug:dmix
+
export AUDIODEV=plug:dmix
</code>
</code>
Line 15: Line 15:
<code>
<code>
-
    mplayer -ao sdl
+
mplayer -ao sdl
</code>
</code>
'''Isn't there an alsa1x driver already? Does it handle the ALSA devices better?'''
'''Isn't there an alsa1x driver already? Does it handle the ALSA devices better?'''
-
:I tried mplayer cvs at Thu Mar 25 00:18:21 CET 2004 mplayer now has the [[alsa1x]] ao, works beautifully with dmix indeed!
+
I tried mplayer cvs at Thu Mar 25 00:18:21 CET 2004 mplayer now has the [[alsa1x]] ao, works beautifully with dmix indeed!
'''I have a new mplayer, and it still doesn't work?'''
'''I have a new mplayer, and it still doesn't work?'''

Latest revision as of 16:13, 28 January 2007

This article describes how to get the mplayer media player program to work with the dmix plugin.

Is there a way to get mplayer working with ALSA plug:dmix?

Yes, you need to use SDL to get sound output when using mplayer and plug:dmix (see the page dmix for info on software mixing of multiple PCM streams). The reason is that the current mplayer 1.0pre3 alsa9 doesn't handle ALSA devices properly by design according to a message on the mailinglist.

To use SDL, set up the SDL audio handlers like this if you use the bash shell:

export SDL_AUDIODRIVER=alsa
export AUDIODEV=plug:dmix

Now use the mplayer SDL audio output:

mplayer -ao sdl

Isn't there an alsa1x driver already? Does it handle the ALSA devices better?

I tried mplayer cvs at Thu Mar 25 00:18:21 CET 2004 mplayer now has the alsa1x ao, works beautifully with dmix indeed!

I have a new mplayer, and it still doesn't work?

  1. Try recompiling mplayer with ALSA support. If you have ALSA somewhat working, it should detect it automatically. Don't forget to install ALSA library files.
  2. Setup the ALSA config, and try running mplayer with it exclusively.
  3. If it runes, but you can't make it work with other software, try rebooting you system. The dmix plugin seems to have some problems with reinitialising sound on the fly, seems it needs to be the first device activated on a card.
Note: You can also use mplayer without plug:dmix but then you would not be able to do software mixing of multiple PCM streams.
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox