Mplayer no sound when playing some movies

0

Ok, that's a bit of a strange problem, that somehow crept into my system. It used to work fine.

Here is the problem as far as I can identify it. When I try to play certain video files with mplayer, there is no sound. As far as I can tell, it is only an issue with ac3 and dts sound tracks (using the ffmpeg decoder).

Mplayer says:

==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 6 ch, s16le, 1536.0 kbit/33.33% (ratio: 192000->576000)
Selected audio codec: [ffdca] afm: ffmpeg (FFmpeg DTS)
==========================================================================
[AO_ALSA] Playback open error: Device or resource busy
Failed to initialize audio driver 'alsa'
Could not open/initialize audio device -> no sound.
Audio: no sound

(similar with ac3 sound, but using the ffac3 audio codec).

Trying different audio output (-ao oss/pcm/sdl) doesn't fix the problem. The strange thing is that if I play these files directly with ffplay, they work fine.

mplayer sound with mp3/ogg is fine

My alsa configuration is standard (no /etc/asound.conf or ~/.asound*)

OS: Linux Gentoo
Mplayer: 1.0_rc4_p20100213 (SVN-r30554-4.3.4)
FFMpeg: 0.5_p20601-r1 (SVN-r20601)

Any other information I can provide?

Ivan Peevski

Posted 2010-02-27T23:21:23.623

Reputation: 150

Answers

0

It turns out ALSA was being taken by another application and wouldn't allow multiple outputs at the same time. After some googling, that seems to be a sign for a sound card that doesn't support hardware mixing. I found some ways to allow software mixing, but they seemed pretty hacky. What else I found was a way to see which application is using alsa, which turned out to be pretty useful.

Ivan Peevski

Posted 2010-02-27T23:21:23.623

Reputation: 150

So you solved your problem yourself :-) Mentioning "I found was a way to see which application is using alsa" would be nice to share at least this finding with the community! Would be very curious to know, how to list ALSA-using threads/programs. – hc_dev – 2019-07-19T18:39:04.960

This probably answers that: https://superuser.com/questions/47146/how-can-i-find-out-what-programs-are-using-sound-in-linux

– Ivan Peevski – 2019-07-25T07:07:37.823