使用 textoverlay 顯示文字
$ gst-launch-1.0 -v videotestsrc ! textoverlay text="Room A" valignment=top halignment=left font-desc="Sans, 72" ! nvvideoconvert ! nveglglessink使用 textoverlay 顯示字幕,timeoverlay 顯示時間
字幕檔
$ cat subtitles.srt
1
00:00:03,000 --> 00:00:05,000
Hello? (3-5s)
2
00:00:08,000 --> 00:00:13,000
Yes, this is a subtitle. Don't
you like it? (8-13s)
3
00:00:18,826 --> 00:01:02,886
Uh? What are you talking about?
I don't understand (18-62s)
$ gst-launch-1.0 -v filesrc location=subtitles.srt ! subparse ! txt. videotestsrc ! timeoverlay font-desc="Sans, 24" ! textoverlay name=txt shaded-background=yes font-desc="Sans, 24" ! nvvideoconvert ! nveglglessink
沒有留言:
張貼留言