GStreamer transparent video background

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GStreamer transparent video background

Stivius
Hello!
I was trying to use GStreamer along with GTK+3 library to put the video into
created GTK window. But the problem is that I want this video to be with the
transparent background. For example, if a window has 400x400 size and video
has 1366x768 then the video will be resized to fit into 400x400 keeping
aspect ratio. It leads to a black background which I couldn't remove
programmatically. I googled it many times, trying to find the answer but no
result. I can do my GTK window transparent (or at least use another color
than black) but the video will overlap this window and background color will
stay black. I have attached the screenshot.
Could please point me how to achieve it? Maybe there are some workarounds.

Regards, Stivius

<http://gstreamer-devel.966125.n4.nabble.com/file/t378012/photo_2017-10-11_01-02-33.jpg>



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer transparent video background

Antonio Ospite-2
On Tue, 10 Oct 2017 15:03:31 -0700 (MST)
Stivius <[hidden email]> wrote:

> Hello!
> I was trying to use GStreamer along with GTK+3 library to put the video into
> created GTK window. But the problem is that I want this video to be with the
> transparent background. For example, if a window has 400x400 size and video
> has 1366x768 then the video will be resized to fit into 400x400 keeping
> aspect ratio. It leads to a black background which I couldn't remove
> programmatically. I googled it many times, trying to find the answer but no
> result. I can do my GTK window transparent (or at least use another color
> than black) but the video will overlap this window and background color will
> stay black. I have attached the screenshot.
> Could please point me how to achieve it? Maybe there are some workarounds.
>

How do you rescale the video? If you use videoscale check out the
"add-borders" property, try setting it to false.

Ciao,
   Antonio

--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel