[MPlayer-users] incorrect playing rate with dxr3 sound driver

DEBERT Jean-Louis jl_debert at rsd-intl.com
Wed Jun 12 09:40:02 CEST 2002


Hi,

I have an .avi file which was encoded at 24KHz (stereo).
Now I want to play the .avi on the TV set, using the TV
and sound output of my dxr3 card. So I use the following
command line:

     $ mplayer -vo dxr3 -ao oss:/dev/em8300_ma-0 RH2.avi

Playing starts ... 2x too fast for _both_ audio _and_ video.
Now the funny thing is, when I use the normal oss driver
for my sound card (not specifying -ao at all) playing is
absolutely correct ...

After some searching in TFM, I found this (in file DXR3 in the docs):

 -aop list=resample:fout=xxxxx	If samplerate is below 44100Hz, select
						either 44100 or 48000
depending on
						which which one matches
closest. I.e.
						if the movie uses 22050 use
44100 as
						44100 / 2 = 22050, if it's
24000 use
						48000 as 48000 / 2 = 24000
and so on.

So, knowing that the sound in the file was encoded at 24KHz, I added
  -aop list=resample:fout=48000    and it works correctly (for both
audio and video).

Now I am wondering why this is not done automagically ??? I mean, 
whenever you get a file (or worse, a stream) over the Internet,
you seldom know _beforehand_ the way it was encoded, so you cannot
set a useful parameter in a script or otherwise... you have first
to run mplayer and parse the log to know.

Whereas at audio driver setup time, I believe that the headers
(if any) are already parsed, so the video and audio parameters
are already known, so the driver _could_ be setup automatically
using the rule above. By the way, processing is okay for the
oss _soundcard_ driver, so why not for the dxr3 one ?

Am I correct in believing this ???  






More information about the MPlayer-users mailing list