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=&quot;HELLOWORLD&quot; !  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=&quot;HELLOWORLD&quot; color=4278255360 (0xff00ff00) The text is also &quot;alphaed&quot;. 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 class="gI"></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=&quot;HELLOWORLD&quot; 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&#39;t overwrite its alpha value and the text doesn&#39;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=&quot;HELLOWORLD&quot;
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&#39;t achieved the expected result.<br>
<br>Any ideas?<br><br>Thank you in advance.<br><br>Best Regards.<br><br>-- <br><pre>Ángel Martín Navas<br>Investigador / Researcher<br>Televisión Digital y Servicios Multimedia / Digital TV &amp; Multimedia Services<br><br>
Vicomtech - Visual Interaction Communication Technologies<br>Mikeletegi Pasealekua, 57 - Parque Tecnológico<br>20009 Donostia - San Sebastián - Spain<br>Tel: +[34] 943 30 92 30<br>Fax: +[34] 943 30 93 93<br>e-mail: <a href="mailto:amartin@vicomtech.org" target="_blank">amartin@vicomtech.org</a><br>
<a href="http://www.vicomtech.org" target="_blank">www.vicomtech.org</a><br><br>*** member of IK4 Research Alliance ****<br><a href="http://www.ik4.es/" target="_blank">www.ik4.es</a><br>*** member of GraphicsMedia.net ****<br>
<a href="http://www.graphicsmedia.net" target="_blank">www.graphicsmedia.net</a><br><br><br><br>-----------------------------------------------------<br>Vicomtech is an ISO 9001:2000 certified institute<br>-----------------------------------------------------<br>
<br>Este mensaje se dirige exclusivamente a su destinatario. <br>La información incluida en el presente correo es confidencial sometida a <br>secreto profesional, especialmente en lo que respecta a los datos de <br>carácter personal, cuya divulgación está prohibida, en virtud de la <br>
legislación vigente. Si usted no es el destinatario legítimo y lo ha <br>recibido por error o tiene conocimiento del mismo por cualquier motivo, <br>le rogamos que nos lo comunique por este medio y proceda a destruirlo o <br>
borrarlo. En todo caso abstengase de utilizar, reproducir, alterar, <br>archivar o comunicar a terceros el presente mensaje así como los ficheros <br>anexos, todo ello bajo pena de incurrir en responsabilidades legales. <br>
Cualquier opinión contenida en este correo es exclusiva de su autor y no <br>representa necesariamente la opinión de ASOCIACIÓN CENTRO DE TECNOLOGÍAS <br>DE INTERACCIÓN VISUAL Y COMUNICACIONES VICOMTECH (en adelante Vicomtech-IK4) <br>
El emisor no garantiza la integridad, rapidez o seguridad del presente correo, <br>ni se responsabiliza de posibles perjuicios derivados de la captura, <br>incorporaciones de virus o cualesquiera otras manipulaciones efectuadas por terceros.<br>
Con motivo de la entrada en vigor de la Ley 34/2002, de 11 de julio, de <br>Servicios de la Sociedad de la Información y de Comercio Electrónico, le <br>informamos que pueden revocar en cualquier momento, de forma sencilla y gratuita, <br>
el consentimiento para la recepción de mensajes de <a href="http://vicomtech.org" target="_blank">vicomtech.org</a> en <a href="mailto:info.lopd@vicomtech.org" target="_blank">info.lopd@vicomtech.org</a>.<br></pre><br>