brunoherbelin / vimix

Live Video Mixer
GNU General Public License v3.0
259 stars 25 forks source link

Request: Text source #109

Closed lupin3rd closed 7 months ago

lupin3rd commented 8 months ago

Hi, i think that can be very usefull a new type of scource: Text. Very often in live session i need to write some text ... or create effect on text... What do you think about that? :-)

brunoherbelin commented 7 months ago

Yes indeed, it would be a possible addition

Up to now, the hacked way to create a text source is through the custom gstreamer source (new / Pattern / Custom gstreamer). There is an example gst pipeline to display a simple text:

image

To add timing and rich text layout, you can try the gstreamer textrender plugin:

image

In this example, the gstreamer custom source uses this pipeline code :

filesrc location=/home/bh/vimix/test.srt ! subparse ! textrender font-desc="Arial 45" ypad=200 ! queue ! videorate ! video/x-raw,width=1280,height=768,framerate=24/1

And the SRT file contains the following subtitle:

1
00:00:00,000 --> 00:00:03,000
<b>Hi There !</b>

2
00:00:03,000 --> 00:00:05,000
This is a text from 
a subtitle srt file
displayed with textrender

3
00:00:10,000 --> 00:00:012,000
<i>'hope you enjoy vimix!</i>

4
00:00:12,000 --> 00:00:028,000
Take care

5
00:00:28,100 --> 00:00:029,000
Goodbye
brunoherbelin commented 7 months ago

I could do a specific source type for Text and subtitle , e.g. allowing to select an SRT file and specify the rendering properties (size) or to choose to use a simple text.

Would that help for your needs?

lupin3rd commented 7 months ago

Hi Bruno! Gstreamer is a good workaround :-) I think that a text source can be very usefull. We need a text field, font selection, size and position. Also the possibility of load a text file... we can work on text like other media source with source geometry view, color correction, etc.

And then a set of OSC command would be wonderfull to create text on realtime :-D

lupin3rd commented 7 months ago

I open a discussion:

111

brunoherbelin commented 7 months ago

Implemented in Beta a57419150e84ce1b4851c38ccf64dee4ec696aae