How to make rounded cornered video?

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

How to make rounded cornered video?

Seungha Yang-2
Hello,

I'm finding a way for making rounded video frame using gstreamer.
For example, when composing two video frames with compositor element,
I hope one inner stream can have rounded edge

+-----------+                       +---------------+
|               |      +------+       |  /-----\         |
|     V0      |  +  |  V1  |  =    | |  V1 |        |
|               |      +------+       |  \-----/  V0   |
+-----------+                        +--------------+ 
Is there any video filter for that in gstreamer (without opengl) ? 
I think videomixer, videobox, and compositor has no ability for that.

Seungha Yang


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

Re: How to make rounded cornered video?

Nicolas Dufresne-5
Le samedi 26 mai 2018 à 19:16 +0900, Seungha Yang a écrit :

> Hello,
>
> I'm finding a way for making rounded video frame using gstreamer.
> For example, when composing two video frames with compositor element,
> I hope one inner stream can have rounded edge
> (like https://helpx.adobe.com/indesign/how-to/round-corners-frame.htm
> l is describing)
>
> +-----------+                       +---------------+
> |               |      +------+       |  /-----\         |
> |     V0      |  +  |  V1  |  =    | |  V1 |        |
> |               |      +------+       |  \-----/  V0   |
> +-----------+                        +--------------+
> Is there any video filter for that in gstreamer (without opengl) ?
> I think videomixer, videobox, and compositor has no ability for that.

The element that comes to my mind is shapewipe, though I'm worried, I
the example pipeline does not seem to work for me anymore. I'll have a
look.

https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-shapewipe.html



>
> Seungha Yang
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to make rounded cornered video?

Nicolas Dufresne-5
Le samedi 26 mai 2018 à 10:20 -0400, Nicolas Dufresne a écrit :

> Le samedi 26 mai 2018 à 19:16 +0900, Seungha Yang a écrit :
> > Hello,
> >
> > I'm finding a way for making rounded video frame using gstreamer.
> > For example, when composing two video frames with compositor
> > element,
> > I hope one inner stream can have rounded edge
> > (like https://helpx.adobe.com/indesign/how-to/round-corners-frame.h
> > tm
> > l is describing)
> >
> > +-----------+                       +---------------+
> > >               |      +------+       |  /-----\         |
> > >     V0      |  +  |  V1  |  =    | |  V1 |        |
> > >               |      +------+       |  \-----/  V0   |
> >
> > +-----------+                        +--------------+
> > Is there any video filter for that in gstreamer (without opengl) ?
> > I think videomixer, videobox, and compositor has no ability for
> > that.
>
> The element that comes to my mind is shapewipe, though I'm worried, I
> the example pipeline does not seem to work for me anymore. I'll have
> a
> look.
>
> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-
> plugins-good/html/gst-plugins-good-plugins-shapewipe.html

It's just a zorder issue. If I flip the zorder in the example it seems
to work:

gst-launch-1.0 -v videotestsrc ! video/x-raw,format=AYUV,width=640,height=480 ! shapewipe position=0.5 name=shape ! compositor sink_0::zorder=3 sink_1::zorder=2 name=mixer ! videoconvert ! autovideosink     filesrc location=mask.png ! typefind ! decodebin ! videoconvert ! videoscale ! queue ! shape.mask_sink    videotestsrc pattern=snow ! video/x-raw,format=AYUV,width=640,height=480 ! queue ! mixer.

>
>
>
> >
> > Seungha Yang
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to make rounded cornered video?

Seungha Yang-2
In reply to this post by Seungha Yang-2
Le samedi 26 mai 2018 à 10:20 -0400, Nicolas Dufresne a écrit :
> Le samedi 26 mai 2018 à 19:16 +0900, Seungha Yang a écrit :
> > Hello,
> > 
> > I'm finding a way for making rounded video frame using gstreamer.
> > For example, when composing two video frames with compositor
> > element,
> > I hope one inner stream can have rounded edge
> > (like https://helpx.adobe.com/indesign/how-to/round-corners-frame.h
> > tm
> > l is describing)
> > 
> > +-----------+                       +---------------+
> > >               |      +------+       |  /-----\         |
> > >     V0      |  +  |  V1  |  =    | |  V1 |        |
> > >               |      +------+       |  \-----/  V0   |
> > 
> > +-----------+                        +--------------+ 
> > Is there any video filter for that in gstreamer (without opengl) ? 
> > I think videomixer, videobox, and compositor has no ability for
> > that.
> 
> The element that comes to my mind is shapewipe, though I'm worried, I
> the example pipeline does not seem to work for me anymore. I'll have
> a
> look.
> 
> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-
> plugins-good/html/gst-plugins-good-plugins-shapewipe.html

It's just a zorder issue. If I flip the zorder in the example it seems
to work:

gst-launch-1.0 -v videotestsrc ! video/x-raw,format=AYUV,width=640,height=480 ! shapewipe position=0.5 name=shape ! compositor sink_0::zorder=3 sink_1::zorder=2 name=mixer ! videoconvert ! autovideosink     filesrc location=mask.png ! typefind ! decodebin ! videoconvert ! videoscale ! queue ! shape.mask_sink    videotestsrc pattern=snow ! video/x-raw,format=AYUV,width=640,height=480 ! queue ! mixer.

> 
> 
> 
> > 
> > Seungha Yang
> > 
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


seems to be broken.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel