FFmpeg 4.3.8
Since* 4.3
#

Cross fade two videos with custom transition effect by using OpenCL.

It accepts the following options:

transition

Set one of possible transition effects.

custom

Select custom transition effect, the actual transition description will be picked from source and kernel options.

fade, wipeleft, wiperight, wipeup, wipedown, slideleft, slideright, slideup, slidedown

Default transition is fade.

source

OpenCL program source file for custom transition.

kernel

Set name of kernel to use for custom transition from program source file.

duration

Set duration of video transition.

offset

Set time of start of transition relative to first video.

The program source file must contain a kernel function with the given name, which will be run once for each plane of the output. Each run on a plane gets enqueued as a separate 2D global NDRange with one work-item for each pixel to be generated. The global ID offset for each work-item is therefore the coordinates of a pixel in the destination image.

The kernel function needs to take the following arguments:

Example programs: