[FFmpeg-user] xfade filter - custom expressions

Peter pdc.cse+ffmpeg at gmail.com
Wed Sep 23 09:37:53 EEST 2020


Hello,

Can someone help me to understand the xfade filter documentation regarding
custom expressions. I'm not really sure how to express a transition given
the variables provided.

"XY - The coordinates of the current sample." - Is the transition defined
by selecting a color/state for each pixel?

"WH - The width and height of the image." - OK.

"P - Progress of transition effect." - Looking at the source, this is a
float. Ranging from 0-1 I assume(?)

"PLANE - Currently processed plane." - Not sure what this means. How many
planes are there? I'd say at least 2, one for each input. Are there more?

"A - Return value of first input at current location and plane." - This
would return something like first_input[x][y] if the input were treated as
an array? But I still don't understand what the plane refers to OR what the
value returned would be. Would it be 0 or 1, or some color value?

"a0(x, y) a1(x, y) a2(x, y) a3(x, y) - Return the value of the pixel at
location (x,y) of the first/second/third/fourth component of first input."
- What does 'component' refer to? 1234 == RGBA ?

Is there an example that illustrates how to use a custom expression to
achieve a meaningful transition?

Thank you!


More information about the ffmpeg-user mailing list