Luma -> Alpha with v1.18

Nicolas Dufresne nicolas at ndufresne.ca
Thu Jan 6 16:30:25 UTC 2022


Le mercredi 05 janvier 2022 à 14:19 -0800, amindfv--- via gstreamer-devel a
écrit :
> I'm looking for a way to use the luma plane of one video as the alpha plane of another.
> 
> It appears the "alphacombine" element (https://gstreamer.freedesktop.org/documentation/codecalpha/alphacombine.html?gi-language=c) can do this, but it's too new even for the unstable release of GStreamer, and for a variety of reasons I'm stuck on the latest stable (1.18).
> 
> What I'm trying to do is also possible in ffmpeg with "extractplanes=y" + "alphamerge".
> 
> I'd welcome any way to do this, no matter how much of a hack. Big pipeline? Fine. Somehow using GPU/shaders? No prob.

Perhaps you can copy and build the codecalpha plugin into your project ? Note
that alphacombine is a "simple" implementation, not suitable for every use
cases, as it does not synchronize the inputs (this is to avoid adding large
threading overhead introduce by the sycnhronization).

All it does is take two I420 buffers, append then and declare this as A420
(updating the GstVideoMeta).

> 
> Thanks!
> Tom
> 



More information about the gstreamer-devel mailing list