Pad linking query
Andy Robinson
andy at seventhstring.com
Fri Feb 26 10:44:16 UTC 2021
On 25/02/2021 22:21, gotsring wrote:
> Can you describe what you are trying to accomplish? Where are the subtitles
> coming from and where do you want to use them? Are you just overlaying the
> subtitles on a video stream?
>
> Random pipeline to play subtitles from a file and overlay them onto a video.
> Subtitles are read from an .srt file (attached for reference) subtitles.srt
> <http://gstreamer-devel.966125.n4.nabble.com/file/t379531/subtitles.srt>
>
> gst-launch-1.0.exe filesrc location=subtitles.srt ! subparse ! textoverlay
> name=to ! autovideosink \
> videotestsrc num-buffers=640 ! 'video/x-raw, width=640, height=480,
> framerate=20/1' ! to.
They are coming from decodebin of a video file which has two subtitle
tracks, and yes I want to overlay them on the video. I know how to do it
with an srt file, no problem. But that's not where they are coming from.
I am doing it programatically but the pipeline would look something like
this:
gst-launch-1.0 \
textoverlay name=ov ! autovideosink \
filesrc location=myvideo.mp4 ! decodebin name=d ! queue ! videoconvert !
videoscale ! ov.video_sink \
d. ! queue ! subparse ! ov.text_sink
But this doesn't work: it says "Redistribute latency..." and then
nothing happens.
From diagnostics in my programatic version, I thnk the problem is
decodebin subtitle pad caps (from gst_pad_query_caps):
text/x-raw, format=(string)utf8
subparse sinkpad caps:
application/x-subtitle; application/x-subtitle-sami;
application/x-subtitle-tmplayer; application/x-subtitle-mpl2;
application/x-subtitle-dks; application/x-subtitle-qttext;
application/x-subtitle-lrc; application/x-subtitle-vtt
They are not compatible. (Incidentally the src caps of a filesrc are
"ANY" which is why we can link an srt file into the subparse).
There surely is some way of linking the subtitle pad presented by
decodebin, into subparse, but how?
Regards,
Andy Robinson, Seventh String Software, www.seventhstring.com
More information about the gstreamer-devel
mailing list