<div dir="auto">Hi Tom,<div dir="auto"><br></div><div dir="auto">I think you're struggling because you're hunting for a pre-made solution on the internet or a post by someone who has done exactly what you want to do. You won't find any.</div><div dir="auto"><br></div><div dir="auto">I recommend sitting down and reading the Meson documentation (<a href="https://mesonbuild.com/">https://mesonbuild.com/</a> — tutorial, reference manual) till you understand every part of the alphacombine meson file.</div><div dir="auto"><br></div><div dir="auto">With that knowledge, you will find it trivial to build it or integrate it into your app.</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Nirbheek</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 9 Jan, 2022, 01:07 <a href="mailto:amindfv@mailbox.org" target="_blank" rel="noreferrer">amindfv@mailbox.org</a>, <<a href="mailto:amindfv@mailbox.org" target="_blank" rel="noreferrer">amindfv@mailbox.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Jan 07, 2022 at 09:19:13PM -0800, amindfv--- via gstreamer-devel wrote:<br>
> On Fri, Jan 07, 2022 at 08:07:23AM -0500, Nicolas Dufresne via gstreamer-devel wrote:<br>
> > Le jeudi 06 janvier 2022 à 16:17 -0800, amindfv--- via gstreamer-devel a écrit :<br>
> > > On Thu, Jan 06, 2022 at 01:47:17PM +0530, Nirbheek Chauhan wrote:<br>
> > > > On Thu, Jan 6, 2022 at 5:00 AM amindfv--- via gstreamer-devel<br>
> > > > <<a href="mailto:gstreamer-devel@lists.freedesktop.org" rel="noreferrer noreferrer" target="_blank">gstreamer-devel@lists.freedesktop.org</a>> wrote:<br>
> > > > > <br>
> > > > > I'm looking for a way to use the luma plane of one video as the alpha plane of another.<br>
> > > > > <br>
> > > > > It appears the "alphacombine" element (<a href="https://gstreamer.freedesktop.org/documentation/codecalpha/alphacombine.html?gi-language=c" rel="noreferrer noreferrer noreferrer" target="_blank">https://gstreamer.freedesktop.org/documentation/codecalpha/alphacombine.html?gi-language=c</a>) 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).<br>
> > > > > <br>
> > > > > What I'm trying to do is also possible in ffmpeg with "extractplanes=y" + "alphamerge".<br>
> > > > > <br>
> > > > > I'd welcome any way to do this, no matter how much of a hack. Big pipeline? Fine. Somehow using GPU/shaders? No prob.<br>
> > > > <br>
> > > > You can copy the plugin's source code into your project, and then either:<br>
> > > > <br>
> > > > 1. Build it as a dynamic plugin and set GST_PLUGIN_PATH to it, or<br>
> > > > 2. Link to it statically and register it manually with gst_element_register()<br>
> > > > <br>
> > > > This is probably the easiest thing you can do. You can keep syncing<br>
> > > > the plugin sources with upstream till you can move to 1.20<br>
> > > > <br>
> > > <br>
> > > Thank you. I'm going down this path but having difficulty finding the correct way to build it.<br>
> > > <br>
> > > I've made some progress with lines like the below, but I'm more or less taking shots in the dark:<br>
> > > <br>
> > >     libtool --mode=link gcc `pkg-config --cflags --libs gstreamer-1.0 gobject-2.0 glib-2.0` -o gstalphacombine.o gstalphacombine.c<br>
> > <br>
> > I'd recommend building the entire plugin, otherwise you will be left missing a<br>
> > plugin entry. The easiest is to copy and adapt the meson.build files.<br>
> > <br>
> <br>
> Is there any documentation (even just a blog post) on how to do this? I'm searching and trying things, but I feel like I'm more or less trying at random.<br>
> <br>
> For example, I can:<br>
> <br>
>     cd gstreamer/subprojects/gst-plugins-bad/gst/codecalpha<br>
>     mkdir build<br>
>     meson build<br>
> <br>
> but I'm already hitting errors ("ERROR: First statement must be a call to project").<br>
> <br>
> I'm mostly working off of <a href="https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html" rel="noreferrer noreferrer noreferrer" target="_blank">https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html</a> , but I've been searching the web for building plugins as well.<br>
> <br>
> Happy to RTFM, or to use a kludgy way to compile/get alphacombine into my pipeline. Anything to get across the finish line.<br>
<br>
What's tantalizing is, the thing I've been trying for days to build is really small - < 500 SLOC, with one .h file and one .c file. I think I'm missing something just out of reach.<br>
<br>
Tom<br>
</blockquote></div>