Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

ffmpeg xfade custom transition expression - Fetch pixel value at specifc x, y from vid1, vid2?

I am using xfade with transition=custom, and trying to build expression. I am referring to official documentation https://ffmpeg.org/ffprobe-all.html#xfade

Per my understanding, expression should return pixel value of merged video

I built a few custom transitions using expressions that return some combination of A, B

For eg.,

"custom:expr='if(gt(P, abs(X/W - 0.5)), A, B)'"
"custom:expr='lerp(A, B, 1 - P)'"

For the next set of transitions, I want to fetch the pixel values from source, target video at specific positions, and combine them in my expressions

I tried using a0(X, Y), b0(X, Y) etc inside of

xfade=transition=custom:expr='r....

I ran into exceptions with ffmpeg complaining it doesn't understand the expression.

Can someone clarify, how i can fetch pixel values as specific position from source, target video and combine them in expression ?

question from:https://stackoverflow.com/questions/65882150/ffmpeg-xfade-custom-transition-expression-fetch-pixel-value-at-specifc-x-y-fr

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...