[MPlayer-users] correct syntax for combining filters

Dave Woodfall dave at tty1.uk
Fri Apr 16 06:08:48 EEST 2021


Christian <abelschreck3 at freenet.de> put forth the proposition:
> Hi all,
> I´m looking for the right way to combine filters in *mplayer*.
> I want to achieve the following:
> I´d like to play a .wav-file with the *equalizer*-option set and the
> *higher-speed*-option (plus: *not altering the pitch* when playing
> faster).
> Man-pages say:
> -af <filter1[=parameter1:parameter2:...],filter2,...>
>               Setup a chain of audio filters.
> Seems that´s what I´m looking for.
> This command however doesn´t work:
> mplayer -af scaletempo=scale=1.2:speed=pitch -srate 44100 -af
> lavcresample=44100 -af equalizer=0:0:0:0:0:0:0:0:7:7 test.wav
> I.e.: the equalizer option does work (audio is much crisper) but it´s all
> played back at normal speed (not with the factor of "1.2").

Take a look at the other -af-* related flags, like -af-add -af-del
etc., because, as someone already pointed out, I think each -af
overrides the last, which explains why only the eq seems to be having
any effect.  If you keep the first filter as -af and then use -af-add
for the following ones it might do want you want.

Normally filters are separated by commas, and options by colons.  I
tend to use -vf more often than -af, but the formula is the same,
e.g.:

-vf dsize=640:-2,scale,expand=-8:-40:4:40,...

--
Dave


More information about the MPlayer-users mailing list