News ticker for gstreamer

Hello All,
I believe is easy to create a new ticker in ffmpeg using for example :- -filter_complex "[0:v]drawbox=x=0:y=1020:w=1920:h=40:color=white@0.6:t=fill drawtext=textfile='/home/dev/files/scroller.txt':x=(mod(-t*55\,(1920-200)+text_w)-text_w):y=1030:\ fontfile='/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf':fontsize=28:fontcolor=darkslategray:box=0[base];\ [2:v]scale=-1:40[logo];[base][logo]overlay=x=10:y=1020

Is there any way to do the same in Gstreamer?

if not, how hard is it to develop a plugin?

The easiest would probably be via the overlaycomposition element, and then you create the actual running text with e.g. Pango or skia.

Thanks @slomo

Is there a plan to develop a scroller element for gstreamer?

I did look at Skia which is new over using Pango… All a bit out of my development skill level.

Any example links and has anyone successfully do a scroller? using Textoverlay and dynamically changing the x, y position I’d suspect be waste of CPU cycles?

Not that I’m aware of but if someone wants to implement such an element…

I’ve implemented that a couple of times with cairo and Pango

Hello @slomo ,
Do you happen to have an example snippet of code?

C is ok I can convert to Go. Sure there is cgo bindings for Cairo library.

Sorry, I can’t. It’s all in proprietary code, and each of the cases had special requirements.

It’s not really hard though: look at how textoverlay renders text. Do something like that based on your requirements to get pixels with your text, and then clip and offset it over time when overlaying it on top of the video.

Hello again @slomo ,

Blockquote Sorry, I can’t. It’s all in proprietary code, and each of the cases had special requirements.

Fully understand our situation for an example and NDA.

I found a gem in the ruff with the link below which gives the meat using cairooverlay element attaching a canvas to the element.

Need to translate to Go however.

on-three/video-text-relay: Simple Gstreamer based video text overlay. Driven by JSON RPC calls.

Thanks