[FFmpeg-devel] [PATCH] avfilter/alimiter: Add "flush_buffer" option to flush the remaining valid data to the output

Marton Balint cus at passwd.hu
Tue Apr 5 01:28:14 EEST 2022



On Mon, 4 Apr 2022, Paul B Mahol wrote:

> On Sun, Mar 27, 2022 at 11:41 PM Marton Balint <cus at passwd.hu> wrote:
>
>>
>>
>> On Sat, 26 Mar 2022, Wang Cao wrote:
>>
>>> The change in the commit will add some samples to the end of the audio
>>> stream. The intention is to add a "zero_delay" option eventually to not
>>> have the delay in the begining the output from alimiter due to
>>> lookahead.
>>
>> I was very much suprised to see that the alimiter filter actually delays
>> the audio - as in extra samples are inserted in the beginning and some
>> samples are cut in the end. This trashes A-V sync, so it is a bug IMHO.
>>
>> So unless somebody has some valid usecase for the legacy way of operation
>> I'd just simply change it to be "zero delay" without any additional user
>> option, in a single patch.
>>
>
>
> This is done by this patch in very complicated way and also it really
> should be optional.

But why does it make sense to keep the current (IMHO buggy) operational 
mode which adds silence in the beginning and trims the end? I understand 
that the original implementation worked like this, but libavfilter has 
packet timestamps and N:M filtering so there is absolutely no reason to 
use an 1:1 implementation and live with its limitations.

Regards,
Marton


More information about the ffmpeg-devel mailing list