[MPlayer-users] Mplayer can't read a 48kHz/24bit wave. No problem with aplay.

Paride Legovini legovini at spiro.fisica.unipd.it
Mon Feb 23 19:12:43 CET 2009


I have a 24kHz/24bit wave file:

$ file antani.wav
antani.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 24 
bit, stereo 48000 Hz

My sound card supports this format, and so I can play it with 'aplay'

$ aplay -v -D front:CARD=1,DEV=0 antani.wav
Playing WAVE 'antani.wav' : Signed 24 bit Little Endian in 3bytes, Rate 
48000 Hz, Stereo
Hardware PCM card 1 'UA-1EX' device 0 subdevice 0
Its setup is:
   stream       : PLAYBACK
   access       : RW_INTERLEAVED
   format       : S24_3LE
   subformat    : STD
   channels     : 2
   rate         : 48000
   exact rate   : 48000 (48000/1)
[...]

Actually that format is what my audio card *wants*! If I try to play a 
16bit/44.1kHz file, alsa converts it to 24bit/44.1kHz (I can see that 
with aplay -v).

But I have problems in playing the 24bit/44.1kHz file with mplayer:

$ mplayer -ao alsa:device=hw=1.0 antani.wav

==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s24le, 2304.0 kbit/100.00% (ratio: 288000->288000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
[AO_ALSA] Format s24le is not supported by hardware, trying default.
[AO_ALSA] Unable to set format: Invalid argument
Failed to initialize audio driver 'alsa:device=hw=1.0'
Could not open/initialize audio device -> no sound.

Any clue?

(I know I could use device=plughw=1.0. In this way, when mplayer tryes 
the default s16le after failing with s24le, the alsa "plug" plugin 
converts the audio again to s24le, which is what my card expects, and so 
it "works". But I don't want that downsampling.).

Thank you!
pl




More information about the MPlayer-users mailing list