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

D Richard Felker III dalias at aerifal.cx
Tue Oct 19 18:00:28 CEST 2004


On Tue, Oct 19, 2004 at 10:07:45AM +0200, Reimar Döffinger wrote:
> Hi,
> > > 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)
> > >
> > > It looks to me that:
> > > mplayer 18010.asf -srate 44100
> > > is equivalent to mode 1 and
> > > mplayer 18010.asf -af resample=44100
> > > is equivalent to mode 2
> > >
> > > So using -srate 44100 turn on fast mode, but using only -af
> resample=44100 doesn't.
> > >
> > > I wated to use mencoder with -srate 44100 and got distortion.
> > > mecoder -af resample=44100 didn't work.
> > >
> > > But now I have seen that if I use:
> > > mecoder -af resample=44100 -srate 44100
> > > it works and select mode 2. So if I use -af resample togheter
> with -srate
> > > I can control the resampling in mencoder.
> > >
> > > This should go in the documentation, or mencoder should be fixed and be
> able to use
> > > -af resample without -srate.
> >
> > What is the problem, -af should work with MEncoder.
> 
> The problem is more that when the output supports the original sample rate
> (for mencoder probably always true without -srate),
> af_resample feels useless and removes itself (during af chain rebuild)... At
> least that's how I remember it.

not quite. af_resample doesn't probe what the output supports. rather
mencoder configured the output unconditionally for the rate specified
with -srate (or same as input, if unspecified) and then reconfigures
the filter chain to match those rates. then, af_resample unloads
itself because after reconfig it's useless.

rich




More information about the MPlayer-dev-eng mailing list