[FFmpeg-user] How to improve result of transitions

Carl Zwanzig cpz at tuunq.com
Tue Jun 22 18:53:26 EEST 2021


Please do not top-post in this list.

On 6/22/2021 12:39 AM, iburman at compuscience.com wrote:
> However, now that I understand that for 4 seconds transition you need 4
> seconds on each video, 

> Anyways, may be we can improve the documentation to explain that offset
> need to be such to allow duration seconds to create the transition.
Not to be unkind, but that should be self-evident- if you consider a more 
simple case of a fade-out and want it to go from 100% to 0% in 4 seconds, 
you must have at least 4 seconds of video -to- fade.

> I don't understand why you need two parameters,
> duration and offset. Why not simply define the duration, and have ffmpeg
> calculate the offset as videoDuration minus transitionDuration? Or at least,
> why not make the default of offset to be videoDuration - transitionDuration?

Because either of those could be wrong- for instance, two long running 
sources and fading back and forth between them. Defining offset/duration 
gives better control of the effect. Additionally, ffmpeg cannot always know 
the full duration of a source (e.g. a stream), so it doesn't have numbers to 
calculate with.


Something else to consider is that all inputs start at the same time, so if 
you want to fade between two clips, you have to pad or delay the second so 
that it starts at the beginning of the fade. There will be examples of this 
if you search the list archive.

Later,

z!





More information about the ffmpeg-user mailing list