Dear all,<br><br>I want to mix (videomixer) a multimedia source (video
or image) with a text (textoverlay) with gnlcomposition to insert the
text in the proper time. <br><br>1) At the beginning I used a
gnloperation to insert the textoverlay inside a bin with a textoverlay.
But problems arised when I had a lot of images and texts. It was not
possible to get a desired layout. Because to get a correct
functionality the priority has to be low and unique (according to my
tests).<br>
<br>2) So, I am trying to insert each text as a video with an alpha channel.<br><br>I
achieved it with a gnlsource with a bin that contains a videotestsrc
with green pattern and an alpha element to remove the green part with
an alpha channel but in some borders of the image there is a residual
line.<br>
videotestsrc pattern=5 ! ffmpegcolorspace ! textoverlay
text="HELLOWORLD" ! <b>alpha prefer-passthrough=TRUE method=1</b> ! video/x-raw-yuv, framerate=\(fraction\)25/1,
format=\(fourcc\)AYUV, width=640, height=480 ! ffmpegcolorspace<br><br>And
for example in this case: textoverlay text="HELLOWORLD"
color=4278255360 (0xff00ff00) The text is also "alphaed". So not
completely solved yet. Moreover, the alpha module inserts a residual
line and computational waste.<br>
<br>3) So I want a pure alpha video with a text to mix it with an image.<br><br>This
is a test pipeline where the videotestsrc has directly a 0x00000000
(ARGB value = pure alpha black = transparent) with a text overlay with
color 0xff00ff00 (ARGB value = solid green).<br>
<span></span><br clear="all">gst-launch videomixer name=mix
sink_0::zorder=3 sink_1::zorder=2 ! ffmpegcolorspace ! timeoverlay !
autovideosink videotestsrc pattern=17 foreground-color=0 ! textoverlay
text="HELLOWORLD" color=4278255360 shaded-background=TRUE !
video/x-raw-yuv, framerate=\(fraction\)25/1, format=\(fourcc\)AYUV,
width=640, height=480 ! ffmpegcolorspace ! mix.sink_0 filesrc
location=~/image.jpg ! decodebin ! queue ! ffmpegcolorspace !
videoscale ! imagefreeze2 ! alpha prefer-passthrough=TRUE !
video/x-raw-yuv, framerate=\(fraction\)25/1, format=\(fourcc\)AYUV,
width=640, height=480 ! ffmpegcolorspace ! mix.sink_1<br>
<br>However the textoverlay plugin doesn't overwrite its alpha value
and the text doesn't appear anyplace. It seems the text inherits the
alpha value of the videotestsrc.<br><br>If a change the videotestsrc to
get semitransparent color=2147483648 (0x80000000) (ARGB semitransparent
black) the text appears but again It seems the text inherits the alpha
value of the videotestsrc.<br>
<br>gst-launch videomixer name=mix sink_0::zorder=3 sink_1::zorder=2 !
ffmpegcolorspace ! timeoverlay ! autovideosink videotestsrc pattern=17
foreground-color=2147483648 ! textoverlay text="HELLOWORLD"
color=4278255360 shaded-background=TRUE ! video/x-raw-yuv,
framerate=\(fraction\)25/1, format=\(fourcc\)AYUV, width=640,
height=480 ! ffmpegcolorspace ! mix.sink_0 filesrc
location=~/image.jpg ! decodebin ! queue !
ffmpegcolorspace ! videoscale ! imagefreeze2 ! alpha
prefer-passthrough=TRUE ! video/x-raw-yuv, framerate=\(fraction\)25/1,
format=\(fourcc\)AYUV, width=640, height=480 ! ffmpegcolorspace !
mix.sink_1<br><br>I
tryed to insert alphacolor elements and introduce different schemes of
ffmpegcolorspaces and capsfilter, and I also checked that the zorder of
the videomixer is right, but I haven't achieved the expected result.<br>
<br>Any ideas?<br><br>Thank you in advance.<br><br>Best Regards.