GNOME Bugzilla – Bug 654959
textoverlay would flicker if it receives not timestampes text on input
Last modified: 2011-08-03 09:08:33 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.
Created attachment 192298 [details] [review] fix flicker of text
Well, parsed subtitle text without timestamps is just broken really..
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.
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.
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.
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.
Sigh, whatever.