After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 341681 - [textoverlay] flickering with continuously timestamped text
[textoverlay] flickering with continuously timestamped text
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.x
Other All
: Normal minor
: 0.10.11
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-13 20:29 UTC by Young-Ho Cha
Modified: 2006-11-21 18:41 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
test sami file for karaoke (23.49 KB, text/plain)
2006-05-13 20:31 UTC, Young-Ho Cha
Details
test srt file (2.31 KB, application/x-srt)
2006-05-14 06:41 UTC, Young-Ho Cha
Details

Description Young-Ho Cha 2006-05-13 20:29:59 UTC
Please describe the problem:
I'm working sami parser and pangocairo textoverlay plugin.

You can see them bug 169936 and bug 340887

And some sami subtitles are often used for karaoke like below.

ex)
<SYNC START=32538><P CLASS=KRCC>
I believe<BR>
I believe
<SYNC START=32571><P CLASS=KRCC>
<font color=#33BEF1>I</FONT> believe<BR>
I believe
<SYNC START=33247><P CLASS=KRCC>
<font color=#33BEF1>I be</FONT>lieve<BR>
I believe
<SYNC START=33984><P CLASS=KRCC>
<font color=#33BEF1>I believe</FONT><BR>
I believe

I'll attach sample smi file.

When play above smi file, each frames are render with some delay. (it shows like
didn't use double buffer)





Steps to reproduce:
1. apply  bug 169936 and bug 340887 patch at gst-plugins-base
2. run this command
$ gst-launch -v filesrc location=./test.smi ! subparse ! txt. videotestsrc !
textoverlay name=txt font-desc=Sans\ 30 ! ffmpegcolorspace ! ximagesinkk


Actual results:
render smoothly.

Expected results:
render with some delay.

Does this happen every time?
yes.

Other information:
When render with textrender plugin, It renders smoothly.

You can use this command.

$ gst-launch -v filesrc location=./test.smi ! subparse ! textrender
font-desc=Sans\ 30 ! ffmpegcolorspace ! ximagesink

You must resize window after above command.

textoverlay and textrender plugins are same render algorithm. I think this bug
is not relate with textoverlay plugin,

this bug appear pango textoverlay plugin (based pango freetype backend), too.

I think this bug will be related with video image mixing layer or something
equality[
Comment 1 Young-Ho Cha 2006-05-13 20:31:23 UTC
Created attachment 65399 [details]
test sami file for karaoke
Comment 2 Young-Ho Cha 2006-05-14 06:40:10 UTC
I made simple case.

There is no need to patch.

I'll append test.srt.

It just contained 'Hello?' strings and there are no delay times between each strings.

 
Comment 3 Young-Ho Cha 2006-05-14 06:41:03 UTC
Created attachment 65417 [details]
test srt file
Comment 4 Tim-Philipp Müller 2006-09-07 13:41:26 UTC
Basically, textoverlay's logic is a bit busted. Besides a few < vs. <= comparison mixups, it won't wait for a text buffer if it doesn't have a text buffer available, which is what leads to the flickering. Also, it doesn't discard text buffers after using them if they aren't needed any longer. And a few other things that aren't quite right either. Will fix after the freeze.
Comment 5 Tim-Philipp Müller 2006-11-21 18:41:26 UTC
This should fix it:

 2006-11-21  Tim-Philipp Müller  <tim at centricular dot net>

        * ext/pango/gsttextoverlay.c: (gst_text_overlay_init),
        (gst_text_overlay_text_pad_unlink), (gst_text_overlay_text_event),
        (gst_text_overlay_video_event), (gst_text_overlay_pop_text),
        (gst_text_overlay_text_chain), (gst_text_overlay_video_chain),
        (gst_text_overlay_change_state):
        * ext/pango/gsttextoverlay.h:
          Some textoverlay fixes: for one, in the video chain function,
          actually wait for a text buffer to come in if there is none at the
          moment and there should be one; also, deal more gracefully with
          incoming buffers that do not have a timestamp or duration; discard
          text buffer when not needed any longer. Fixes #341681.

        * tests/check/Makefile.am:
        * tests/check/elements/.cvsignore:
        * tests/check/elements/textoverlay.c:
        (notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2),
        (setup_textoverlay), (buffer_is_all_black), (create_black_buffer),
        (create_text_buffer), (cleanup_textoverlay), (GST_START_TEST),
        (test_video_waits_for_text_send_text_newsegment_thread),
        (test_video_waits_for_text_shutdown_element),
        (test_render_continuity_push_video_buffers_thread),
        (textoverlay_suite):
          Add some unit tests for textoverlay.