- I have the same question in the topic
Gstreamer alpha plugin does not work
and i find the nvcompositor alpha property is not work
set “nvcompositor name=mixer sink_0::alpha=0.5”
the video fram is not will
I want remove the bkg white color,so
gst-launch-1.0
videotestsrc pattern=snow ! video/x-raw, framerate=10/1, width=1920, height=1080 !
alpha alpha=1 ! nvvidconv ! mix.sink_0
videotestsrc pattern=smpte75 ! video/x-raw, framerate=10/1, width=700, height=700 !
alpha method=custom target-g=255 target-b=255 target-r=255 ! nvvidconv ! mix.sink_1
nvcompositor name=mix sink_1::xpos=500 sink_1::ypos=100
sink_1::width=600 sink_1::height=600 sink_1::alpha=0.5 sink_0::alpha=1 ! nv3dsink \
if set "alpha method=custom target-g=255 target-b=255 target-r=255 "
the view is black
if set “alpha alpha=0.5”
the view is black too
- can you give me some suggestions? Thanks!
I find the last suggesiton like this
Hi,
Thank you for your effort to make alpha plugin works.
I have the same issue.
So, I look into commit log of GitHub - GStreamer/gst-plugins-good: ‘Good’ GStreamer plugins and helper libraries. This module has been merged into the main GStreamer repo for further development. .
After I modified as the commit below.
It’s working better.
I hope it helps.
Author: Doug Nazar nazard@nazar.ca 2019-09-09 09:43:17
Committer: Doug Nazar nazard@nazar.ca 2019-09-09 13:51:53
Parent: 0a6a62aa7652f0b5a689d4cecbc031b763c2000a (docs: Port all docstring to gtk-doc markdown)
Child: 37c619f9954045602a61daf4bceff4cd0e4f70cf (plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types)
Branches: master, remotes/origin/1.18, remotes/origin/master
Follows: 1.16.0
Precedes: 1.17.1
alpha: Fix one_over_kc calculation
On arm/aarch64, converting from float directly to unsigned int uses
a different opcode and negative numbers result in 0. Cast to
signed int first.
----------------------------- gst/alpha/gstalpha.c -----------------------------
index 867e000…4a37b01 100644
@@ -2349,7 +2349,7 @@ gst_alpha_init_params_full (GstAlpha * alpha,
tmp = MIN (tmp, 255);
alpha->accept_angle_ctg = tmp;
tmp = 1 / (kgl);
-
alpha->one_over_kc = 255 * 2 * tmp - 255;
-
alpha->one_over_kc = (gint) (255 * 2 * tmp - 255);
tmp = 15 * y / kgl;
tmp = MIN (tmp, 255);
alpha->kfgy_scale = tmp;
but, I use the nvcompositor.
Should I update the source code of gstreamer on tx2 nx devices to this version, recompile, and then nvcompositer is ok?