Skip to content

fillLineGap doesn't always fill the gap #253

@pjcherriman

Description

@pjcherriman

I've notice a few very small linegaps between row of subtitles when the fiilLineGap option is used.

It is easier to see on content with a light background, but it can be seen if you look carefully with the BBC R&D test stream which is already in the DASH reference player.

stream: https://rdmedia.bbc.co.uk/testcard/simulcast/manifests/avc-ctv.mpd

Reference player & Stream: http://reference.dashif.org/dash.js/v4.7.3/samples/dash-if-reference-player/index.html?mpd=https%3A%2F%2Frdmedia.bbc.co.uk%2Ftestcard%2Fsimulcast%2Fmanifests%2Favc-ctv.mpd+&debug.logLevel=4&streaming.delay.liveDelayFragmentCount=NaN&streaming.delay.liveDelay=NaN&streaming.buffer.initialBufferLevel=NaN&streaming.liveCatchup.maxDrift=NaN&streaming.liveCatchup.playbackRate.min=NaN&streaming.liveCatchup.playbackRate.max=NaN

Attached are output on a window PC running full screen on a 4K monitor for both Chrome and Firefox, both show a linegap, and firefox is wrapping first line of subtitles for some reason.

chrome-linegap2

The linegap is most easily seen in the space between Musical and Scale where the yellow floodlight can be seen, or by zooming right in.

firefox-linegap-and-wrap2

On the firefox image, the linegap can be seen between the two musical notes.

The TTML similar to this
<?xml version="1.0" encoding="utf-8"?>
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:ttp="http://www.w3.org/ns/ttml#parameter" xmlns:tts="http://www.w3.org/ns/ttml#styling" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xmlns:ebuttm="urn:ebu:tt:metadata" xmlns:ebutts="urn:ebu:tt:style" xmlns:itts="http://www.w3.org/ns/ttml/profile/imsc1#styling" xmlns:ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter" xml:lang="en" xml:space="default" ttp:timeBase="media" ttp:cellResolution="40 24" ittp:activeArea="33.500000% 7.500000% 33.000000% 60.500000%" >
	<head>
		<ttm:copyright>British Broadcasting Corporation</ttm:copyright>
		<metadata>
			<ttm:title>BBC DASH Testcard Stream</ttm:title>
			<ebuttm:documentMetadata>
				<ebuttm:conformsToStandard>urn:ebu:tt:distribution:2018-04</ebuttm:conformsToStandard>
				<ebuttm:conformsToStandard>http://www.w3.org/ns/ttml/profile/imsc1/text</ebuttm:conformsToStandard>
				<ebuttm:authoredFrameRate>25</ebuttm:authoredFrameRate>
				<ebuttm:documentOriginatingSystem>Perrott Subtitle Encoding</ebuttm:documentOriginatingSystem>
			</ebuttm:documentMetadata>
		</metadata>
		<styling>
			<style xml:id="S0" tts:wrapOption="wrap" itts:fillLineGap="true" tts:fontFamily="ReithSans, Arial, Roboto, proportionalSansSerif, default" ebutts:linePadding="0.5c" tts:textAlign="center" tts:fontSize="80%"/>
			<style xml:id="S1" tts:textAlign="start"/>
			<style xml:id="S10" tts:color="#FFFFFF" tts:fontSize="200%" tts:backgroundColor="#000000"/>
			<style xml:id="S11" tts:color="#FFFF00" tts:fontSize="200%" tts:backgroundColor="#000000"/>
			<style xml:id="S12" tts:color="#FF9010" tts:fontSize="200%" tts:backgroundColor="#000000"/>
			<style xml:id="S16" tts:fontStyle="italic" tts:color="#10FF10" tts:fontSize="200%" tts:backgroundColor="#000000"/>
		</styling>
		<layout>
			<region xml:id="R3" tts:origin="33.5% 32%" tts:extent="33% 36%" tts:overflow="visible" tts:displayAlign="before"/>
			<region xml:id="R8" tts:origin="35% 7.5%" tts:extent="30% 10%" tts:overflow="hidden" tts:displayAlign="before"/>
		</layout>
	</head>
	<body style="S0">
		<div region="R8">
			<p xml:id="p8-1-470" begin="473631:40:40.32" end="473631:40:44.16"><span style="S16">Top centre</span></p>
		</div>
		<div region="R3">
			<p xml:id="p3-6-470" style="S1"><span style="S10" begin="473631:40:40.32" end="473631:40:44.16">♫ Musical Scale ♪<br/></span><span style="S12" begin="473631:40:40.32" end="473631:40:44.16">C</span><span style="S12" begin="473631:40:40.32" end="473631:40:44.16">, D</span><span style="S12" begin="473631:40:40.32" end="473631:40:44.16">, E</span><span style="S12" begin="473631:40:40.32" end="473631:40:44.16">, F</span><span style="S12" begin="473631:40:40.32" end="473631:40:44.16">, G</span><span style="S12" begin="473631:40:40.5" end="473631:40:44.16">, A</span><span style="S12" begin="473631:40:40.7" end="473631:40:44.16">, B</span><span style="S12" begin="473631:40:40.9" end="473631:40:44.16">, C</span><span style="S12" begin="473631:40:41.1" end="473631:40:44.16">, D</span><span style="S12" begin="473631:40:41.3" end="473631:40:44.16">, E</span><span style="S12" begin="473631:40:41.5" end="473631:40:44.16">, F</span><span style="S12" begin="473631:40:41.7" end="473631:40:44.16">, G</span><span style="S12" begin="473631:40:41.9" end="473631:40:44.16">, A</span><span style="S12" begin="473631:40:42.1" end="473631:40:44.16">, B</span><span style="S11" begin="473631:40:42.3" end="473631:40:44.16">, C</span><span style="S11" begin="473631:40:42.5" end="473631:40:44.16">, B</span><span style="S11" begin="473631:40:42.7" end="473631:40:44.16">, A</span><span style="S11" begin="473631:40:42.9" end="473631:40:44.16">, G</span><span style="S11" begin="473631:40:43.1" end="473631:40:44.16">, F</span><span style="S11" begin="473631:40:43.3" end="473631:40:44.16">, E</span><span style="S11" begin="473631:40:43.5" end="473631:40:44.16">, D</span><span style="S11" begin="473631:40:43.7" end="473631:40:44.16">, C</span><span style="S11" begin="473631:40:43.9" end="473631:40:44.16">, B</span><span style="S11" begin="473631:40:44.1" end="473631:40:44.16">, A</span></p>
		</div>
	</body>
</tt>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions