[MPlayer-users] Audio click when speed changed

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun May 18 14:26:35 CEST 2014

On 18.05.2014, at 13:54, wm4 <nfxjfg at googlemail.com> wrote:
> On Sun, 18 May 2014 10:08:29 +0200
> Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
>> On Sat, May 17, 2014 at 09:19:09PM -0500, Chris Crochet wrote:
>>> * You do NOT need my custom player or any other frontend to replicate this
>>> issue.  Run MPlayer from the command line, then rapidly and alternately
>>> press [ and ] to hear the clicking.
>> Sorry, I just can't hear it.
>> You should always provide full command-line and full MPlayer output.
>> It might be caused by some other audio filters you are using.
>>> * It occurs regardless of whether the scaletempo filter is enabled or not.
>> Well, I can offer a patch for scaletempo to resolve a theoretical
>> problem, but as said I can't hear anything that could be called a
>> "click".
>>> * Interestingly, it occurs even if the command results in no actual change
>>> in speed.  Even sending "speed_set 1" repeatedly will generate the clicks.
>> That is not surprising. We don't special-case the "no speed change"
>> case.
> AFAIK this will reconfigure the audio chain, probably calls ao_reset(),
> and drops some buffered audio. This could lead to a click.

It shouldn't do anything like that.

> My idea to fix this is to keep buffered audio, and to refilter it in a
> seamless way.

There should be no buffered audio for most cases/filters, and it shouldn't generally be dropped.
refiltering might be useful for all kinds of dynamic changes to reduce latency in principle, on the other hand it can cause stutter if there is not enough CPU power left over.

More information about the MPlayer-users mailing list