[MPlayer-dev-eng] [PATCH] fix for -srate bug

Giacomo Comes comes at naic.edu
Mon Oct 18 18:13:01 CEST 2004


On Mon, Oct 18, 2004 at 05:44:53PM +0200, Reimar Döffinger wrote:
> Hi,
> 
> > > > > > > This code went in 2004-01-27 and it's what cause the problem with -srate.
> > > > > > > Can somebody explain if it can be safely removed or it has to stay but it needs
> > > > > > > some modification?
> > > > > > 
> > > > > > Good question. Is there somebody out there who cares about af ?
> > > > > 
> > > > > Anyone out there ?
> > > > 
> > > > the original code is correct as far as i can tell. if someone claims
> > > > it's a bug they need to explain why, not just send a patch.
> > > 
> > > I did explain why and I reported the bug more than one time.
> > > This is the first time that I see a comment on it except for the request
> > > of Attila.
> > > 
> > > Here is the explanation of the bug:
> > > 
> > > Listen with mplayer 1.0pre4/5 the first 10/15 seconds of this video:
> > > mplayer -nocache http://www.telenorba.dyrecta.com/video/tnnews56/18010.asf
> > > the audio is 8000 Hz.
> > > Now do the same with -srate:
> > > mplayer -nocache http://www.telenorba.dyrecta.com/video/tnnews56/18010.asf -srate 44100
> > > 
> > > Do you hear any difference? I do if I do not apply the patch I submitted.
> > > The resampling introduce a distorsion in the audio.
> > > 
> > > I have seen the distorsion expecially with 8000 Hz samples when I resample at 44100 Hz.
> > > But id doesn't appear with ALL the 8000 Hz samples. 
> > > I have seen it also with audio samples with higher 
> > > sample rate, but in that case it's more difficult to hear the distortion.
> > > 
> > > This bug has been confirmed at least by one other user.
> > > 
> > > if you need more details please ask me.
> > 
> > with the fast option, there's supposed to be distortion. set it not to
> > use fast mode if you want good resampling. imo your code disables the
> > fast option entirely so it will be slow on my computer!! :(
> 
> Full ack. If you don't want it to be fast but instead sound better, use
> -af-adv force=1. If that doesn't work, this should be fixed instead.
> This patch only removes functionality and is thus against
> our policy and should be rejected IMO.

Indeed it works.

(see my post few minutes ago).
	mencoder -srate 44100 -af-adv force=1
is also able to solve the distortion problem.

Probably it's necessary to write in the man page that
-srate uses fast resampling that can produce distorsion 
and that -af-adv force can be used to override it.

My patch is not necessary and can be discarded.

Giacomo




More information about the MPlayer-dev-eng mailing list