[FFmpeg-user] xfade + acrossfade usage - keeping A/V in sync

Paul B Mahol onemda at gmail.com
Wed Jun 17 13:34:17 EEST 2020


On 6/17/20, Rob Hallam <ffmpeg at roberthallam.com> wrote:
> On Tue, 16 Jun 2020 at 23:56, Paul B Mahol <onemda at gmail.com> wrote:
>
>>> TR1=764.3    # input 0 duration - 1 second
>>> TR2=1250.498    # input 0 + input 1 duration - 1 second
>
>> I believe this two should be - 2 seconds instead. Because both
>> transition durations for two xfade and acrossfade filters is 2
>> seconds.
>
> Thanks for the reply Paul, I will try that.
>
> My reading of xfade is that the transition start point should be
> half the duration from the end- the example on the wiki is 4.5s
> of a 5s input for a 1s transition. I am less sure about acrossfade,
> but thought it worked similarly.
>
> In either case diagram terms I figured they operated like:
>
> [AA AA AA AA][BB BB BB BB]
>> [AA AA AA AB BA BB BB BB]
>
> ie neither should change the length of the inputs they operate on.
>
> Is that a mistaken assumption perhaps?

Yes, very mistaken.

Duration of output is first input duration + second input duration -
duration of transition.
For xfade you need to set offset, acrossfade does not need that.


More information about the ffmpeg-user mailing list