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 654959 - textoverlay would flicker if it receives not timestampes text on input
textoverlay would flicker if it receives not timestampes text on input
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Linux
: Normal normal
: 0.10.36
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-07-20 11:46 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2011-08-03 09:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix flicker of text (2.31 KB, patch)
2011-07-20 11:48 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2011-07-20 11:46:29 UTC
run this pipeline

gst-launch fdsrc fd=0 ! text/plain ! txt. videotestsrc ! textoverlay \
name=txt shaded-background=yes font-desc="Serif 40" wait-text=false ! \
xvimagesink

and type text on the terminal. The text gets immediately discared (rendered on 1 frame only). patch follows.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2011-07-20 11:48:37 UTC
Created attachment 192298 [details] [review]
fix flicker of text
Comment 2 Tim-Philipp Müller 2011-07-24 23:30:38 UTC
Well, parsed subtitle text without timestamps is just broken really..
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2011-07-25 08:21:54 UTC
its not parsed subtitle text, its it plain text. Like as if you set the text property from time to time. Anyway, if the change causes issues we can revert, but it should be fine.
Comment 4 Tim-Philipp Müller 2011-07-25 09:35:06 UTC
It is true that we fail to differentiate between 'text/plain' as in what you get when you run typefinding on a README file, and 'text/plain' for plain chunked + timestamped subtitle files.

I don't think the code change will cause issues, but I think it's bad to encourage (or even support this tbh) by adding an the example even. The example should be removed or changed so that the text is timestamped.

Un-timestamped subtitles are pretty much unsupportable in most other contexts in GStreamer.

textoverlay defaults to wait-text=true, but if the input isn't timestamped it can't wait for the right time, so inputting things like this basically leads to undeterministic results, which I don't think is desirable here.

If people want to do this kind of thing they should use the text property, it is controllable after all.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2011-07-25 10:07:30 UTC
commit 2db389f775160e75fca744fd3b9a3a4b0cade1b1
Author: Stefan Sauer <ensonic@google.com>
Date:   Mon Jul 25 12:04:02 2011 +0200

    textoverlay: improve the example
    
    Mentioned that this is not ment to be used with subtitles and suggest alternatives.
Comment 6 jaromrax 2011-08-02 15:00:54 UTC
 Thank you. I have managed to compile and have checked it with this command

for ((i=0;i<60;i++)); do cat /proc/meminfo | grep -i memfree; sleep 1; done  | gst-launch fdsrc fd=0 ! text/plain ! txt. v4l2src device=/dev/video0 ! image/jpeg,width=640,height=480 ! jpegdec ! ffmpegcolorspace ! textoverlay name=txt shaded-background=yes font-desc="Mono 20"  ! xvimagesink 

In my opinion, this patch extends the usage also to other on-line uses. No way I encourage anybody to use it for subtitles with text/plain.
Comment 7 Tim-Philipp Müller 2011-08-03 09:08:33 UTC
Sigh, whatever.