GNOME Bugzilla – Bug 787071
ttml: Add support for IMSC 1.0.1 fillLineGap attribute
Last modified: 2018-02-27 14:29:59 UTC
Created attachment 358842 [details] Add support for itts:fillLineGap to ttmlparse and ttmlrender Strictly speaking, the TTML spec requires that text backgrounds extend only to the font height of the related text, rather than to the vertical distance between lines. The result of this is that there will typically be vertical gaps between line backgrounds through which moving video can be seen. Since this was unnacceptable to some content providers, v1.0.1 of the IMSC spec (which profiles TTML) adds a new attribute, itts:fillLineGap[1], that allows content authors to specify that clients should extend text backgrounds such that there are no gaps between lines. This attribute is also going to be included in the next release of EBU-TT-D. Attached patch adds support for fillLineGap to ttmlparse and ttmlrender. [1] https://www.w3.org/TR/2017/CR-ttml-imsc1.0.1-20170713/#itts-fillLineGap
Created attachment 358843 [details] [review] Add support for itts:fillLineGap to ttmlparse and ttmlrender Add patch in a more useful way...
Created attachment 358844 [details] TTML file demonstrating fillLineGap="true" File that demonstrates fillLineGap="true" behaviour. Run with the following command: gst-launch-1.0 ttmlrender name=r videotestsrc pattern="gradient" ! video/x-raw,width=1280,height=720 ! autovideoconvert ! r.video_sink filesrc blocksize=16777216 location=fill-line-gap-true.xml ! ttmlparse ! r.text_sink r. ! ximagesink
Created attachment 358846 [details] TTML file demonstrating fillLineGap="false" File that demonstrates fillLineGap="false" behaviour. Run with the following command: gst-launch-1.0 ttmlrender name=r videotestsrc pattern="gradient" ! video/x-raw,width=1280,height=720 ! autovideoconvert ! r.video_sink filesrc blocksize=16777216 location=fill-line-gap-false.xml ! ttmlparse ! r.text_sink r. ! ximagesink
Created attachment 368998 [details] [review] Add support for itts:fillLineGap to ttmlparse and ttmlrender Updated version of patch that fixes a problem discovered with the original, in which rendered line spacing differed depending on whether fillLineGap was false or true.
commit 2863a55a89c2237a128eadc8c0688df8a8c299fa (HEAD -> master) Author: Chris Bass <floobleflam@gmail.com> Date: Tue Feb 27 10:07:18 2018 +0000 ttml: Add support for IMSC 1.0.1 fillLineGap attribute Strictly speaking, the TTML spec requires that text backgrounds extend only to the font height of the related text, rather than to the vertical distance between lines. The result of this is that there will typically be vertical gaps between line backgrounds through which moving video can be seen. Since this was unnacceptable to some content providers, v1.0.1 of the IMSC spec (which profiles TTML) adds a new attribute, itts:fillLineGap[1], that allows content authors to specify that clients should extend text backgrounds such that there are no gaps between lines. This attribute is also going to be included in the next release of EBU-TT-D. This patch adds support for fillLineGap to ttmlparse and ttmlrender. [1] https://www.w3.org/TR/ttml-imsc1.0.1/#itts-fillLineGap https://bugzilla.gnome.org/show_bug.cgi?id=787071