Anuradha
Anuradha

Reputation: 1

How to stream the Transparency image on framebuffer using gstreamer command

I am working on the custom project which having mixer output. Mixer output having one frame buffer input for background image, i want to filter out the green color on the image and make it tarnsparency using gstreamer command. This transparency image is overlay onto incoming video of the mixer output so it streaming output should be tranparency and able to see the other video input in mixer output. Please provide the suggestion how to achive this.

i have tried below commad

gst-launch-1.0 filesrc location="background2.jpg" ! jpegdec ! videoconvert ! video/x-raw,format=ARGB ! alpha method=custom target-r=80 target-g=255 target-b=80 angle=90 alpha=1.0 ! videoconvert ! video/x-raw,format=UYVY ! filesink location=/dev/fb0

Above command is filter out the green color on image but not make it transpraency output. when am overlay this image onto other mixer video input, am not able to see the video input which is beside this image

i want to know gstreamer having this feature to make the image transparency or not

Upvotes: -1

Views: 428

Answers (1)

SeB
SeB

Reputation: 1626

Your problem is that you are converting into UYVY with videoconvert, so it renders onto a black background. You would use a compositor able to manage alpha beforehand, such as:

gst-launch-1.0 -v \
videotestsrc ! video/x-raw,format=RGBA,framerate=30/1 ! queue ! comp.sink_0 \
filesrc location=background2.jpg ! jpegdec ! imagefreeze ! videoconvert ! video/x-raw,format=RGBA,framerate=30/1 ! alpha method=custom target-r=80 target-g=255 target-b=80 angle=90 alpha=1.0 ! queue ! comp.sink_1 \
compositor name=comp \
  sink_0::xpos=0  sink_0::ypos=0  sink_0::zorder=1 \
  sink_1::xpos=50 sink_1::ypos=50 sink_1::zorder=2 \
  ! videoconvert ! autovideosink

Upvotes: 0

Related Questions