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

Paul B Mahol onemda at gmail.com
Wed Jun 17 15:05:53 EEST 2020


On 6/17/20, Rob Hallam <ffmpeg at roberthallam.com> wrote:
> On Wed, 17 Jun 2020 at 11:34, Paul B Mahol <onemda at gmail.com> wrote:
>
>>> 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.
>
> D'oh, of course! Mistake on my part, I hadn't had my morning coffee.
> Thanks for keeping me right.
>
> What I meant was that they should both result in equal duration,
> **if overlap is set in acrossfade**. Is that a safe assumption?
>
> From the docs:
>
>> overlap, o
>>    Should first stream end overlap with second stream start. Default is
> enabled.
> https://ffmpeg.org/ffmpeg-filters.html#acrossfade
>
> Also, from your earlier suggestion:
>
>> I believe this two should be - 2 seconds instead. Because both
>> transition durations for two xfade and acrossfade filters is 2
>> seconds.
>
> An offset of -2 produced desynched audio in the second segment (input
> 1 in the original filtergraph). The closest I can get to synch is an offset
> of -1 for the first input and -2 for the second; but it's still a little
> off.
>
> I'll try to create an example using generated 1Hz chirps and
> 'showspectrum'. If I can replicate there I will post a bug as you
> suggested.
>

First try single xfade and acrossfade combination.

For second xfade you will obviously need to substitute 2 seconds from
output of first xfade transition.

> Cheers,
> Rob
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list