Luma -> Alpha with v1.18
amindfv at mailbox.org
amindfv at mailbox.org
Sat Jan 8 05:19:13 UTC 2022
On Fri, Jan 07, 2022 at 08:07:23AM -0500, Nicolas Dufresne via gstreamer-devel wrote:
> Le jeudi 06 janvier 2022 à 16:17 -0800, amindfv--- via gstreamer-devel a écrit :
> > On Thu, Jan 06, 2022 at 01:47:17PM +0530, Nirbheek Chauhan wrote:
> > > On Thu, Jan 6, 2022 at 5:00 AM amindfv--- via gstreamer-devel
> > > <gstreamer-devel at lists.freedesktop.org> wrote:
> > > >
> > > > 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.
> > >
> > > You can copy the plugin's source code into your project, and then either:
> > >
> > > 1. Build it as a dynamic plugin and set GST_PLUGIN_PATH to it, or
> > > 2. Link to it statically and register it manually with gst_element_register()
> > >
> > > This is probably the easiest thing you can do. You can keep syncing
> > > the plugin sources with upstream till you can move to 1.20
> > >
> >
> > Thank you. I'm going down this path but having difficulty finding the correct way to build it.
> >
> > I've made some progress with lines like the below, but I'm more or less taking shots in the dark:
> >
> > libtool --mode=link gcc `pkg-config --cflags --libs gstreamer-1.0 gobject-2.0 glib-2.0` -o gstalphacombine.o gstalphacombine.c
>
> I'd recommend building the entire plugin, otherwise you will be left missing a
> plugin entry. The easiest is to copy and adapt the meson.build files.
>
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.
For example, I can:
cd gstreamer/subprojects/gst-plugins-bad/gst/codecalpha
mkdir build
meson build
but I'm already hitting errors ("ERROR: First statement must be a call to project").
I'm mostly working off of https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html , but I've been searching the web for building plugins as well.
Happy to RTFM, or to use a kludgy way to compile/get alphacombine into my pipeline. Anything to get across the finish line.
Thanks!
Tom
More information about the gstreamer-devel
mailing list