Just to add some info, I'm sharing the subparse log below with some comments and I'm actually using gstreamer 0.10.27 (i said 0.10.26 earlier).<br><br> I thought this issue could be a known bug that was already solved, so I compiled the newest subparse from 0.10.35 (doing some hacks to make it happen) and replaced /usr/lib/gstreamer-0.10/libgstsubparse.so , but it didn't made any difference, the problematic behavior remained the same.<br>
<br>The log describes the entire execution of my application, including preparation of the pipeline, the execution of play() (subtitles are displayed correctly at this stage), then a seek() operation that fails displaying the subtitles, and some time after that the application is closed (by me).<br>
<br>If anyone is wondering, the seek is operation is:<br><br> QGst::SeekEventPtr evt = QGst::SeekEvent::create(1.0,<br> QGst::FormatTime,<br> QGst::SeekFlagFlush,<br>
QGst::SeekTypeSet,<br> QGst::ClockTime::fromTime(QTime().addMSecs(pos)),<br> QGst::SeekTypeNone,<br>
QGst::ClockTime::None); <br><br> pipeline->sendEvent(evt);<br> pipeline->setState(QGst::StatePlaying);<br><br>It's important to state that this seek operation jumps to the middle of the video. The video is displayed and is playing correctly, but the subtitles stop being displayed after the seek. <br>
<br>Now, looking at the logs, it seems that a seek() operation makes subparse goes back to the beginning of the file and start reading everything again until it finds the correct timestamp. Well, It makes a lot sense. However, in this specific case, when seek() is executed you can see that it starts reading the beginning of file, but it reads only the first 4 seconds of subtitles and then stops. Why?!? Something weird happened and it gave up on trying to locate the right timestamp, and that explains why the subtitles are not being displayed after seek. But why it's doing that, I don't know.<br>
<br>Any hints?<br><br><br>/*********** Setting up the pipelines and stuff ***********/<br><br>Qml debugging is enabled. Only use this in a safe environment!<br><br>0:00:00.122490350 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1596:gst_sub_parse_sink_event: Handling newsegment event<br>
0:00:00.122603733 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1629:gst_sub_parse_sink_event:<subparse0> newsegment (bytes)<br>0:00:00.122639642 7803 0x8ab5718 LOG subparse gstsubparse.c:1577:gst_sub_parse_chain:<subparse0> pushing newsegment event with time segment start=0:00:00.000000000, stop=99:99:99.999999999, last_stop=0:00:00.000000000, duration=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, accum=0:00:00.000000000<br>
0:00:00.122707055 7803 0x8ab5718 INFO subparse gstsubparse.c:1432:feed_textbuf: discontinuity<br>0:00:00.122724213 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1189:parser_state_init: initialising parser<br>
0:00:00.122743281 7803 0x8ab5718 INFO subparse gstsubparse.c:522:convert_encoding:<subparse0> invalid UTF-8!<br>0:00:00.123075214 7803 0x8ab5718 LOG subparse gstsubparse.c:552:convert_encoding:<subparse0> successfully converted 4096 characters from ISO-8859-15 to UTF-8<br>
0:00:00.123218977 7803 0x8ab5718 LOG subparse gstsubparse.c:1310:gst_sub_parse_data_format_autodetect: SubRip (time based) format detected<br>0:00:00.123241639 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1189:parser_state_init: initialising parser<br>
0:00:00.123372004 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line '1'<br>0:00:00.123411001 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line '00:00:00,000 --> 00:00:01,800'<br>
0:00:00.123430946 7803 0x8ab5718 LOG subparse gstsubparse.c:900:parse_subrip_time: parsing timestamp '00:00:00,000'<br>0:00:00.123448229 7803 0x8ab5718 LOG subparse gstsubparse.c:900:parse_subrip_time: parsing timestamp '00:00:01,800'<br>
0:00:00.123467232 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line 'Anteriormente'<br>0:00:00.123486224 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line 'em The Big Bang Theory.'<br>
0:00:00.123503467 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line ''<br>0:00:00.123661913 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1544:handle_buffer:<subparse0> Sending text 'Anteriormente<br>
em The Big Bang Theory.', 0:00:00.000000000 + 0:00:01.800000000<br>0:00:00.123855049 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line '2'<br>0:00:00.123983069 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line '00:00:01,801 --> 00:00:04,752'<br>
0:00:00.124003580 7803 0x8ab5718 LOG subparse gstsubparse.c:900:parse_subrip_time: parsing timestamp '00:00:01,801'<br>0:00:00.124021034 7803 0x8ab5718 LOG subparse gstsubparse.c:900:parse_subrip_time: parsing timestamp '00:00:04,752'<br>
0:00:00.124040382 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line 'Meu irmão tem uma queda pela Bernadette.'<br>0:00:00.124059530 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line ''<br>
0:00:00.124088542 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1544:handle_buffer:<subparse0> Sending text 'Meu irmão tem uma queda pela Bernadette.', 0:00:01.801000000 + 0:00:02.951000000<br>
<br>/*********** Executing play() ***********/<br><br>0:00:02.364775676 7803 0x85cf2e8 DEBUG subparse gstsubparse.c:304:gst_sub_parse_src_event: Handling latency event<br><br>0:00:04.195769401 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line 'RMVB por RoDoLFo™ <a href="http://www.rpds-download.net">www.rpds-download.net</a>'<br>
0:00:04.195833281 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line ''<br>0:00:04.195867626 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line '3'<br>
0:00:04.195901080 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line '00:00:06,306 --> 00:00:08,848'<br>0:00:04.195934403 7803 0x8ab5718 LOG subparse gstsubparse.c:900:parse_subrip_time: parsing timestamp '00:00:06,306'<br>
0:00:04.195965952 7803 0x8ab5718 LOG subparse gstsubparse.c:900:parse_subrip_time: parsing timestamp '00:00:08,848'<br>0:00:04.195999530 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line 'Você está voltando'<br>
0:00:04.196032207 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line 'para a Índia?'<br>0:00:04.196062282 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line ''<br>
0:00:04.196111339 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1544:handle_buffer:<subparse0> Sending text 'Você está voltando<br>para a Índia?', 0:00:06.306000000 + 0:00:02.542000000<br><br>/*********** Seeking to position 394569ms ***********/<br>
<br>0:00:06.841279699 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1557:handle_buffer:<subparse0> flow: wrong-state<br>0:00:06.844613646 7803 0x85cf2e8 DEBUG subparse gstsubparse.c:304:gst_sub_parse_src_event: Handling seek event<br>
0:00:06.844724868 7803 0x85cf2e8 DEBUG subparse gstsubparse.c:1596:gst_sub_parse_sink_event: Handling flush-start event<br>0:00:06.844776056 7803 0x85cf2e8 DEBUG subparse gstsubparse.c:1596:gst_sub_parse_sink_event: Handling flush-stop event<br>
0:00:06.844854562 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1596:gst_sub_parse_sink_event: Handling newsegment event<br>0:00:06.844880812 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1629:gst_sub_parse_sink_event:<subparse0> newsegment (bytes)<br>
0:00:06.844903098 7803 0x8ab5718 INFO subparse gstsubparse.c:1432:feed_textbuf: discontinuity<br>0:00:06.844918176 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1189:parser_state_init: initialising parser<br>
0:00:06.844996015 7803 0x8ab5718 LOG subparse gstsubparse.c:552:convert_encoding:<subparse0> successfully converted 4096 characters from ISO-8859-15 to UTF-8<br>0:00:06.845023413 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line '1'<br>
0:00:06.845047112 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line '00:00:00,000 --> 00:00:01,800'<br>0:00:06.845066045 7803 0x8ab5718 LOG subparse gstsubparse.c:900:parse_subrip_time: parsing timestamp '00:00:00,000'<br>
0:00:06.845083844 7803 0x8ab5718 LOG subparse gstsubparse.c:900:parse_subrip_time: parsing timestamp '00:00:01,800'<br>0:00:06.845102641 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line 'Anteriormente'<br>
0:00:06.845120601 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line 'em The Big Bang Theory.'<br>0:00:06.845137598 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line ''<br>
0:00:06.845168811 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1544:handle_buffer:<subparse0> Sending text 'Anteriormente<br>em The Big Bang Theory.', 0:00:00.000000000 + 0:00:01.800000000<br>
0:00:06.845198951 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line '2'<br>0:00:06.845219848 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line '00:00:01,801 --> 00:00:04,752'<br>
0:00:06.845237658 7803 0x8ab5718 LOG subparse gstsubparse.c:900:parse_subrip_time: parsing timestamp '00:00:01,801'<br>0:00:06.845254871 7803 0x8ab5718 LOG subparse gstsubparse.c:900:parse_subrip_time: parsing timestamp '00:00:04,752'<br>
0:00:06.845273878 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line 'Meu irmão tem uma queda pela Bernadette.'<br>0:00:06.845292715 7803 0x8ab5718 LOG subparse gstsubparse.c:1510:handle_buffer:<subparse0> Parsing line ''<br>
0:00:06.845319607 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1544:handle_buffer:<subparse0> Sending text 'Meu irmão tem uma queda pela Bernadette.', 0:00:01.801000000 + 0:00:02.951000000<br>
0:00:06.845360023 7803 0x85cf2e8 DEBUG subparse gstsubparse.c:336:gst_sub_parse_src_event:<subparse0> segment after seek: time segment start=0:06:34.569000000, stop=99:99:99.999999999, last_stop=0:06:34.569000000, duration=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x01, time=0:06:34.569000000, accum=0:00:00.000000000<br>
QML: GOT RESUMED!<br>0:00:06.850018891 7803 0xad174558 DEBUG subparse gstsubparse.c:304:gst_sub_parse_src_event: Handling latency event<br><br><br>/*********** Closing the app ***********/<br><br>0:00:16.608715198 7803 0x8ab5718 DEBUG subparse gstsubparse.c:1557:handle_buffer:<subparse0> flow: wrong-state<br>
0:00:16.619552264 7803 0x85cf2e8 DEBUG subparse gstsubparse.c:143:gst_sub_parse_dispose:<subparse0> cleaning up subtitle parser<br><br><br><br>Thanks,<br>--<br>Karl Phillip<br><br><br><br><br><div class="gmail_quote">
On Wed, Dec 14, 2011 at 11:48 PM, Karl Phillip <span dir="ltr"><<a href="mailto:maxphil@gmail.com">maxphil@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello experts, <br><br>I'm using QtGstreamer (gstreamer 0.10.26), and before I write a minimal application to reproduce the problem I'm facing I would like to ask this in case someone has seen it before: I'm using subparse and textoverlay to display a (.srt) subtitle over the video and it works great... until seek is executed to change the position of the video. Most of the times the subtitle disappears, and sometimes after a few seek operations it comes back, synced with the video, but executing another seek makes it vanish.<br>
<br>Is there anything obvious I might be missing? Is this a known issue?<br><br>Thanks,<span class="HOEnZb"><font color="#888888"><br>--<br>Karl Phillip<br><br><br>
</font></span></blockquote></div><br>