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 787071 - ttml: Add support for IMSC 1.0.1 fillLineGap attribute
ttml: Add support for IMSC 1.0.1 fillLineGap attribute
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: 1.13.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-31 10:32 UTC by Chris Bass
Modified: 2018-02-27 14:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add support for itts:fillLineGap to ttmlparse and ttmlrender (4.43 KB, application/mbox)
2017-08-31 10:32 UTC, Chris Bass
  Details
Add support for itts:fillLineGap to ttmlparse and ttmlrender (4.43 KB, patch)
2017-08-31 10:34 UTC, Chris Bass
none Details | Review
TTML file demonstrating fillLineGap="true" (1.71 KB, text/xml)
2017-08-31 10:37 UTC, Chris Bass
  Details
TTML file demonstrating fillLineGap="false" (1.71 KB, text/xml)
2017-08-31 10:39 UTC, Chris Bass
  Details
Add support for itts:fillLineGap to ttmlparse and ttmlrender (6.53 KB, patch)
2018-02-27 10:21 UTC, Chris Bass
committed Details | Review

Description Chris Bass 2017-08-31 10:32:24 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
Comment 1 Chris Bass 2017-08-31 10:34:03 UTC
Created attachment 358843 [details] [review]
Add support for itts:fillLineGap to ttmlparse and ttmlrender

Add patch in a more useful way...
Comment 2 Chris Bass 2017-08-31 10:37:39 UTC
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
Comment 3 Chris Bass 2017-08-31 10:39:47 UTC
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
Comment 4 Chris Bass 2018-02-27 10:21:40 UTC
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.
Comment 5 Sebastian Dröge (slomo) 2018-02-27 14:28:59 UTC
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