Dears,<br><br>We want to implement a subtitle sink on our embedded project;<br>that is, video is displayed on a video plane, and the subtitle is displayed on the graphic plane.<br><br>At the beginning, we try MKV file with the matroskademux, and using the following 2 pipelines is OK:<br>
gst-launch filesrc location=test.mkv ! matroskademux name=demux ! queue ! ffdec_h264 ! r. \<br>demux.subtitle_00 ! queue ! assrender name=r ! ffmpegcolorspace ! autovideosink<br><img alt="內置圖片 1" src="cid:ii_1358965e80bbe772"><br>
<br>gst-launch filesrc location=test.mkv ! matroskademux name=demux ! queue ! ffdec_h264 ! r. \<br>demux.subtitle_00 ! queue ! ssaparse ! textoverlay name=r ! ffmpegcolorspace ! autovideosink<br><img alt="內置圖片 2" src="cid:ii_1358966313436ffa"><br>
<br>Then, we try to separate subtitle path and video path like following:<br>(We wish to replace fakesink with our subsink)<br>gst-launch filesrc location=test.mkv ! matroskademux name=demux ! queue ! ffdec_h264 ! ffmpegcolorspace ! autovideosink \<br>
demux.subtitle_00 ! queue ! ssaparse ! fakesink<br>
<img alt="內置圖片 3" src="https://mail.google.com/mail/?ui=2&ik=6fb3fe66ca&view=att&th=135896ba2df0675c&attid=0.1&disp=safe&realattid=ii_135896ba2df0675c&zw"><br><br>But the pipeline is stoped as PAUSED state, even the output window is opened:<br>
Setting pipeline to PAUSED ...<br>Pipeline is PREROLLING ...<br> <br>Add GST_DEBUG=pipeline:4,GST_EVENT:4,GST_ELEMENT_FACTORY:3,GST_ELEMENT_PADS:3,PADS:3,*:3, we can get the log as following:<br>(After matroskademux producing the pad subtitle_00)<br>
0:00:00.244030314 16462 0x8b08cc8 INFO GST_ELEMENT_PADS gstelement.c:727:gst_element_add_pad:<demux> adding pad 'subtitle_00'<br>0:00:00.244045263 16462 0x8b08cc8 INFO GST_PIPELINE ./grammar.y:441:gst_parse_found_pad: trying delayed linking demux:subtitle_00 to queue1:(NULL)<br>
0:00:00.244054527 16462 0x8b08cc8 INFO GST_ELEMENT_PADS gstutils.c:1585:gst_element_link_pads: trying to link element demux:subtitle_00 to element queue1:(any)<br>0:00:00.244063418 16462 0x8b08cc8 INFO GST_ELEMENT_PADS gstelement.c:973:gst_element_get_static_pad: found pad demux:subtitle_00<br>
0:00:00.244073542 16462 0x8b08cc8 INFO GST_PADS gstutils.c:1046:gst_pad_check_link: trying to link demux:subtitle_00 and queue1:sink<br>0:00:00.244091787 16462 0x8b08cc8 INFO GST_PADS gstutils.c:1493:prepare_link_maybe_ghosting: demux and queue1 in same bin, no need for ghost pads<br>
0:00:00.244106636 16462 0x8b08cc8 INFO GST_PADS gstpad.c:1880:gst_pad_link_prepare: trying to link demux:subtitle_00 and queue1:sink<br>0:00:00.244122434 16462 0x8b08cc8 INFO GST_PADS gstpad.c:2053:gst_pad_link: linked demux:subtitle_00 and queue1:sink, successful<br>
0:00:00.245437805 16462 0x8b08cc8 WARN GST_SCHEDULING gstpad.c:4683:gst_pad_get_range:<filesrc0:src> getrange failed unexpected<br>0:00:00.245452065 16462 0x8b08cc8 INFO GST_SCHEDULING gstpad.c:4796:gst_pad_pull_range:<demux:sink> pullrange failed, flow: unexpected<br>
0:00:00.245816212 16462 0x8b08cc8 INFO GST_EVENT gstevent.c:597:gst_event_new_new_segment_full: creating newsegment update 0, rate 1.000000, format GST_FORMAT_TIME, start 0:00:00.000000000, stop 99:99:99.999999999, position 0:00:00.000000000<br>
0:00:00.246354098 16462 0x8b1b1d0 INFO GST_PADS gstpad.c:3417:gst_pad_event_default_dispatch:<ssaparse0:sink> Sending event 0x8af7078 (newsegment) to all internally linked pads<br>0:00:00.246396474 16462 0x8b1b1d0 INFO GST_PADS gstpad.c:3417:gst_pad_event_default_dispatch:<ssaparse0:sink> Sending event 0x8b0ee00 (tag) to all internally linked pads<br>
0:00:00.246456063 16462 0x8b1b1d0 INFO GST_PADS gstpad.c:3417:gst_pad_event_default_dispatch:<ssaparse0:sink> Sending event 0x89af5b8 (tag) to all internally linked pads<br>0:00:00.248599247 16462 0x8b08cc8 INFO GST_EVENT gstevent.c:597:gst_event_new_new_segment_full: creating newsegment update 1, rate 1.000000, format GST_FORMAT_TIME, start 0:00:00.084000000, stop 99:99:99.999999999, position 0:00:00.084000000<br>
0:00:00.251699376 16462 0x8b1b1d0 INFO GST_PADS gstpad.c:3417:gst_pad_event_default_dispatch:<ssaparse0:sink> Sending event 0x89a7190 (newsegment) to all internally linked pads<br>0:00:00.251779486 16462 0x8b08cc8 INFO GST_EVENT gstevent.c:597:gst_event_new_new_segment_full: creating newsegment update 1, rate 1.000000, format GST_FORMAT_TIME, start 0:00:00.376000000, stop 99:99:99.999999999, position 0:00:00.376000000<br>
0:00:00.255879226 16462 0x8b08cc8 INFO GST_EVENT gstevent.c:597:gst_event_new_new_segment_full: creating newsegment update 1, rate 1.000000, format GST_FORMAT_TIME, start 0:00:00.668000000, stop 99:99:99.999999999, position 0:00:00.668000000<br>
<br>I have a feeling that assrender and textoverlay in the 2 successful cases are the key elements to trigger the pipeline running, <br>but I don't know why and have no idea to solve the last case.<br><br>Would you help us figure out what's wrong with this pipeline?<br>
Thank you.<br><br>--<br>Regards,<br>許矢勤 France Hsu<br><br>