[MPlayer-users] mplayer messing up the audio channel order
xeyrion+list at gmail.com
xeyrion+list at gmail.com
Sun Dec 14 21:57:11 CET 2008
Hi,
I noticed that the channel order sometimes gets messed up when playing
back the surround sound. Everything starts up just fine, but then at
some time during the playback the channel order changes (i.e., center
goes to subwoofer or front left, it looks like other channels shift
accordingly). mplayer doesn't print anything special, and playback is
otherwise unaffected. The seek or pause will always set the channel
order back to normal.
The problem is far more frequent when the system is under heavy load.
When the system is otherwise idle, the problem happens quite rarely
(once or twice during a 2 hour movie, sometimes not at all). However,
when the system is loaded (either CPU or disk IO), the problem happens
every few minutes, even though the playback is otherwise smooth.
It feels as if some part of mplayer is expecting a real-time response
from the system. I'm not familiar with the mplayer internals, but my
theory is that the audio decoder fails to deliver the sample in the
timely manner (either due to the lack of CPU time or the disk delay),
something else is used in its place (like the previous sample), and then
the sample that missed its place is played (instead of being dropped),
thus shifting the channel order. This would explain why the most
frequent change is the center channel going either to sub or front left
(assuming the native order of the dsp device is FL-FR-RL-RR-CE-SB, which
I think it is).
Of course the above could be totally wrong, so I would appreciate the
opinion of those familiar with the mplayer internals. Under what
circumstances the channel order might change? How does mplayer handle
the case when the audio decoder is too slow? When the system is loaded so
much that the sound becomes choppy, the channel order is pretty much
random, so it seems that mplayer just starts dropping samples from the
PCM stream without respect to their place.
The problem occurs on Linux (Debian amd64) and Solaris. It's more
frequent on Solaris, but I assume that's only because Solaris places
somewhat higher load on the system. The audio drivers are OSS 4.0,
mplayer is from a fairly recent svn build (dev-SVN-r27949-4.3.2). I've
had this problem for longer than I can remember, it's just that on Linux
it can often be neglected.
I only play the movies (mostly HD), so I'm not sure if the problem
occurs when playing sound only. Also, I tried playback from a simple
test program under heavy system load to see if the problem is with audio
drivers, but that doesn't seem to be the case.
Thanks in advance for any input.
More information about the MPlayer-users
mailing list