[MPlayer-users] Identifying Surround Sound with MPlayer

Corey Hickey bugfood-ml at fatooh.org
Sun Feb 10 06:45:54 CET 2008


Gary C. New wrote:
> Is it possible to identify surround sound with
> mplayer?  I am able to identify what audio codec is
> used with a given a/v file through ID_AUDIO_CODEC, but
> it does not specify how many channels are used.  Do
> all a52 encoded files use all 6 channels or do they
> have the option of using the minimum 2 channels?

No, liba52 is a decoder for the AC3 format, and AC3 comes in many
flavors--and some of the different flavors even have the same number of
channels.

If you use 'mplayer -v' you can see lines like these examples:

AC3: 2.0 (dolby)  48000 Hz  192.0 kbit/s
AC3: 2.0 (stereo)  48000 Hz  192.0 kbit/s
AC3: 5.1 (3f+2r+lfe)  48000 Hz  448.0 kbit/s
DTS: 5.1 (3f+2r+lfe)

That should suffice for details about AC3 and DTS; for the more general
case, try looking at ID_AUDIO_NCH (which seems to be printed twice, so
use the last one). That refers to the number of output channels, though,
so you should probably add '-channels 6' to your command line;
otherwise, some decoders (such as liba52) may automatically downmix and
you'll see ID_AUDIO_NCH=2 for a 6-channel track.

-Corey



More information about the MPlayer-users mailing list