[MPlayer-users] Re: Mplayer & DD5.1 via SPDIF - I have only DD2.0: why ?

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Tue Dec 27 12:15:59 CET 2005


On Tuesday, 27 December 2005 at 11:32, sasza wrote:
> Dominik 'Rathann' Mierzejewski <dominik <at> rangers.eu.org> writes:
> 
> > 
> > On Monday, 26 December 2005 at 22:46, Sasza wrote:
> 
> > > hwac3: switched to AC3, 448000 bps, 48000 Hz
> > > AUDIO: 48000 Hz, 2 ch, 16 bit (0x400), ratio: 56000->192000 (448.0 kbit)
> > 
> > Looks like source audio is only stereo, so you won't get 6 channels
> > unless you explicitly add them and mix them. See -af surround or -af
> > pan.
> 
> Let me try understand few things, ok 
> 
> How those options are related to "-channels 6" option ?
> Is it means that "-channels 6" tels mplayer to get 6 channels from AVI
> stream,

No. From man mplayer:
       -channels <number> (also see -af channels)
              Request the number of playback channels

> and "-af surround" tels to mix them to single outputing stream (surround
> format in this case)?     

Not exactly. From man mplayer:
       surround[=delay]
              Decoder  for  matrix  encoded  surround  sound  like   Dolby
	      Surround. Many files with 2 channel audio  actually  contain
	      matrixed surround sound. Requires a sound card supporting at
	      least 4 channels.

> Is it true, that mplayer w/o any "-af" option always send 2.0 format ? 

Without -channels, more precisely, but yes.

> BTW: What is source of following info: mplayer or alsa: 
> "....Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/6ch/8bit...
> AF_pre: af format: 2 bps, 2 ch, 48000 hz, big endian AC3
> AF_pre: 48000Hz 2ch AC3
> alsa-init: soundcard set to surround51
> alsa: 48000 Hz/6 channels/12 bpf/61440 bytes buffer/Signed 16 bit Little Endian
> AO: [alsa] 48000Hz 6ch AC3 (1 bps)
> Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/6ch/8bit...
> Starting playback..."

MPlayer, I think.

> > > ....................
> > > Software: VirtualDubMod 1.5.10.1 (build 2439/release)
> > > ==========================================================================
> > > Opening audio decoder: [liba52] AC3 decoding with liba52
> > > AC3: 5.1 (3f+2r+lfe)  48000 Hz  448.0 kbit/s
> > > AUDIO: 48000 Hz, 6 ch, 16 bit (0x10), ratio: 56000->576000 (448.0 kbit)
> > 
> > But not here. This is 5.1 audio.
> 
> So here mplayer is decoding 5.1 internally, and sending 5.1 to alsa - right ?.

Yes.

> Why then alsa is outputing on spdif only 2.0 if is getting full 5.1 ?

It shouldn't. It seems to be a bug in MPlayer, because in
libmpcodecs/ad_hwac3.c:101 channel number is always set to 2.

static int preinit(sh_audio_t *sh)
{
  /* Dolby AC3 audio: */
  sh->audio_out_minsize = 128 * 32 * 2 * 2; // DTS seems to need more than AC3
  sh->audio_in_minsize = 8192;
  sh->channels = 2;
  sh->samplesize = 2;
  sh->sample_format = AF_FORMAT_AC3;
  return 1;
}


> > > Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
> > > ==========================================================================
> > > Checking audio filter chain for 48000Hz/6ch/16bit -> 48000Hz/6ch/16bit...
> > > AF_pre: af format: 2 bps, 6 ch, 48000 hz, little endian signed int
> > > AF_pre: 48000Hz 6ch Signed 16-bit (Little-Endian)
> > > alsa-init: soundcard set to surround51
> > > alsa: 48000 Hz/6 channels/12 bpf/61440 bytes buffer/Signed 16 bit Little 
> > > Endian
> > > AO: [alsa] 48000Hz 6ch Signed 16-bit (Little-Endian) (2 bps)
> > > Building audio filter chain for 48000Hz/6ch/16bit -> 48000Hz/6ch/16bit...
> > > Starting playback...
> > 
> > In this last case, too? It looks to me it's playing 6ch audio on 6ch output
> > (decoded, not passed through though).
> 
> You mean analog 6ch output, right ?

Yes.

Regards,
R.

-- 
MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/
"I am Grey. I stand between the candle and the star. We are Grey.
 We stand between the darkness ... and the light."
        -- Delenn in Grey Council in Babylon 5:"Babylon Squared"




More information about the MPlayer-users mailing list