Reputation: 184
I'm a newbie of GStreamer. Currently, I want to using pipeline to show subtitle. This is my pipeline:
gst-launch-1.0 filesrc location=/home/root/video/F01_8subs_eur.mkv ! matroskademux name=d d. ! queue ! h264parse ! omxh264dec ! subtitleoverlay name=a ! waylandsink d. ! queue ! a. d. ! queue ! aacparse ! omxaacdec ! alsasink
The pipeline will show default English subtitle. However, in MKV clip has 8 embedded subtitles. I want to ask how way to select subtitles that I want to show ?
Upvotes: 0
Views: 585
Reputation: 1310
The only option to select subtitles in a pipeline is adding the correct caps in the demux before to the subtitleoverlay plugin.
The attempt here works fine (note that I have changed some plugins to the default standard ones but it it the same):
gst-launch-1.0 filesrc location=/home/test5.mkv ! matroskademux name=demux demux. ! queue ! h264parse ! avdec_h264 ! subtitleoverlay name=subs ! autovideosink demux.subtitle_1 ! queue ! subs. demux. ! queue ! aacparse ! avdec_aac_fixed ! autoaudiosink
Changing subtitle_1 to the other ones (from 0 to 7 in your case) you'll change the displayed subtitle.
Upvotes: 1