2017-05-11 17:38 GMT+03:00 SviMik <svi...@gmail.com>: > > 2017-05-10 8:07 GMT+03:00 Gyan <gyando...@gmail.com>: > > > > On Wed, May 10, 2017 at 5:41 AM, SviMik <svi...@gmail.com> wrote: > > > > > > > > Great answer, thank you for the idea! I have tried to run it, and it > > > produced me a black screen (all zeroes), but I think it may be my fault > > > somewhere. > > > > > > > In the first geq filter, add a='p(X,Y)' after the b expression. Turns out > > the geq initializes alpha to 1 if no expression is provided. Ideally, it > > ought to pass through. > > It works! Thank you so much! > > By the way, I got few pixels with >255 value, and it turns out the ffmpeg can't handle it itself - the pixel with r=266 value became r=10. So I had to add min() to the last geq to avoid overflow: > r='min(255,255*p(X,Y)/alpha(X,Y))':g='min(255,255*p(X,Y)/alpha(X,Y))':b='min(255,255*p(X,Y)/alpha(X,Y))' > > Now it works like a charm.
I was too fast. I thought that if ffmpeg filter works on an image, then it should work on the video too. I was wrong. The blend filter makes ffmpeg to simply drop frames: frame= 2 fps=0.5 q=-1.0 Lsize= 223kB time=00:00:06.78 bitrate= 268.8kbits/s dup=0 drop=194 I think it tries to process the first frame then fails because the top layer is png and the bottom is a video. I tried to switch top and bottom and swap A/B in the expression. Now it doesn't drop the frames, but I couldn't manage to get the same result on the output. Seems that layer position is important here, and swapping the layers made the result of the blending different. _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".