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

Michael Niedermayer michaelni at gmx.at
Mon Oct 18 19:59:11 CEST 2004


Hi

On Monday 18 October 2004 18:53, Ed Wildgoose wrote:
> >Ok, this solve part of my trouble.
> >The complete story is here.
> >
> >There are three mode of using the resample filter:
> >
> >1) mplayer 18010.asf -af resample=44100:0:0 (fast mode with distortion)
> >2) mplayer 18010.asf -af resample=44100:0:1 (normal mode without
> > distortion) 3) mplayer 18010.asf -af resample=44100:0:2 (normal mode
> > without distortion but with some noise)
>
> Aha, this might solve a problem I was just about to ask about:
>
> I have my jack setup locked at 44100 for various reasons and so I am get
> mplayer to resample from 48K to 44.1K.  However, it sounds terrible and
> human voices often have a kind of "buzz" to them.  It's like a kind of
> ringing sound on certain words, probably just when they hit a certain
> freq of course.
>
>  Can someone please provide a pointer to some docs on the meaning of the
> modes 2) and 3)?
>
> Also, I notice that the resampler seems to reduce the volume by perhaps
> 4-6 db?  In my case that is rather unfortunate because I am struggling
> to keep the audio as loud as possible (passive volume control after the
> PC).
>
> Would a patch to incorporate libsamplerate be acceptable?  We obviously
> don't want a ton of sample rate convertors, and I would expect it to be
> tricky to completely integrate libsamplerate (if we need to be able to
> compile it on funny architectures for example), but I could make it a
> compile time option to use the internal stuff or libsamplerate?

why, dont u just use the audio resample code from libavcodec ?
it can easily be extended to support any linear filter, can compensate for 
timestamp drift correctly (no ugly sounding duplicated/dropped samples) 


>
> Libsamplerate needs only about three function calls (start, stop and
> filter), and so it is trivial to integrate and the quality is absolutely
> first rate with about the same CPU requirements as the best mplayer
> convertor.  It has 5 different convertors though for those who have
> lower CPU requirements.

u shouldnt compare against the MPlayer resampler, IIRC it has modulo, divide 
and gotos in the innermost loop

[...]
-- 
Michael

"I do not agree with what you have to say, but I'll defend to the death your
right to say it." -- Voltaire




More information about the MPlayer-dev-eng mailing list