-
Notifications
You must be signed in to change notification settings - Fork 256
Description
Describe the bug
STPP subtitles are detected, selectable, and routed to libass, but no subtitles are rendered when the TTML payload contains backgroundImage attributes.
Kodi logs indicate that TTML parsing is performed, however image-based TTML subtitle features are explicitly not supported, resulting in an empty subtitle output.
Environment
- Kodi: 22 .0-ALPHA2(21.90.702) / flathub
- inputstream.adaptive: 22.3.1
- OS: Linux (x86_64)
Expected behavior
When an STPP (TTML in MP4) subtitle track is selected, subtitles should render correctly during playback.
If image-based TTML is not supported, the subtitle track should be clearly rejected or flagged as unsupported.
Actual behavior
- Subtitle tracks are detected
- Subtitle tracks can be enabled/selected
- No subtitle text or images are rendered
- Playback continues normally with no fatal error
Manifest
<?xml version="1.0" encoding="UTF-8"?>
<MPD profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" availabilityStartTime="2025-11-24T10:59:42Z" minimumUpdatePeriod="PT4.0S" minBufferTime="PT4.0S" publishTime="2026-01-13T12:56:59.622Z" timeShiftBufferDepth="PT60.0S" suggestedPresentationDelay="PT4.0S" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" xmlns:mspr="urn:microsoft:playready" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd">
<Period start="PT0S" id="1">
<AdaptationSet mimeType="video/mp4" startWithSAP="1" segmentAlignment="true" par="16:9">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc"/>
<ContentProtection schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95"></ContentProtection>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"></ContentProtection>
<SegmentTemplate timescale="10000000" presentationTimeOffset="0" media="$RepresentationID$_Segment-$Time$.m4v" initialization="$RepresentationID$_init.m4i">
<SegmentTimeline>
<S t="43269893296900" d="40000000" r="14"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation width="480" height="270" frameRate="25" codecs="avc1.428016" scanType="progressive" sar="1:1" id="1763981970283item-01item" bandwidth="500000"/>
<Representation width="640" height="360" frameRate="25" codecs="avc1.4d4020" scanType="progressive" sar="1:1" id="1763981970283item-02item" bandwidth="1000000"/>
<Representation width="960" height="540" frameRate="25" codecs="avc1.4d4029" scanType="progressive" sar="1:1" id="1763981970283item-03item" bandwidth="2000000"/>
<Representation width="1280" height="720" frameRate="25" codecs="avc1.640029" scanType="progressive" sar="1:1" id="1763981970283item-04item" bandwidth="3000000"/>
<Representation width="1920" height="1080" frameRate="25" codecs="avc1.64002a" scanType="progressive" sar="1:1" id="1763981970283item-05item" bandwidth="4000000"/>
</AdaptationSet>
<AdaptationSet mimeType="audio/mp4" startWithSAP="1" lang="eng" segmentAlignment="true">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc"/>
<ContentProtection schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95"></ContentProtection>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"></ContentProtection>
<SegmentTemplate timescale="10000000" presentationTimeOffset="0" media="$RepresentationID$_Segment-$Time$.m4a" initialization="$RepresentationID$_init.m4i">
<SegmentTimeline>
<S t="43269893629789" d="39680000"/>
<S t="43269933309789" d="40106667"/>
<S t="43269973416456" d="40106666"/>
<S t="43270013523122" d="40106667"/>
<S t="43270053629789" d="39680000"/>
<S t="43270093309789" d="40106667"/>
<S t="43270133416456" d="40106666"/>
<S t="43270173523122" d="40106667"/>
<S t="43270213629789" d="39680000"/>
<S t="43270253309789" d="40106667"/>
<S t="43270293416456" d="40106666"/>
<S t="43270333523122" d="40106667"/>
<S t="43270373629789" d="39680000"/>
<S t="43270413309789" d="40106667"/>
<S t="43270453416456" d="40106666"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation audioSamplingRate="48000" codecs="mp4a.40.5" id="1763981970283item-06item" bandwidth="64000"/>
</AdaptationSet>
<AdaptationSet mimeType="audio/mp4" startWithSAP="1" lang="may" segmentAlignment="true">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc"/>
<ContentProtection schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95"></ContentProtection>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"></ContentProtection>
<SegmentTemplate timescale="10000000" presentationTimeOffset="0" media="$RepresentationID$_Segment-$Time$.m4a" initialization="$RepresentationID$_init.m4i">
<SegmentTimeline>
<S t="43269893629789" d="39680000"/>
<S t="43269933309789" d="40106667"/>
<S t="43269973416456" d="40106666"/>
<S t="43270013523122" d="40106667"/>
<S t="43270053629789" d="39680000"/>
<S t="43270093309789" d="40106667"/>
<S t="43270133416456" d="40106666"/>
<S t="43270173523122" d="40106667"/>
<S t="43270213629789" d="39680000"/>
<S t="43270253309789" d="40106667"/>
<S t="43270293416456" d="40106666"/>
<S t="43270333523122" d="40106667"/>
<S t="43270373629789" d="39680000"/>
<S t="43270413309789" d="40106667"/>
<S t="43270453416456" d="40106666"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation audioSamplingRate="48000" codecs="mp4a.40.5" id="1763981970283item-07item" bandwidth="64000"/>
</AdaptationSet>
<AdaptationSet mimeType="audio/mp4" startWithSAP="1" lang="cmn" segmentAlignment="true">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc"/>
<ContentProtection schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95"></ContentProtection>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"></ContentProtection>
<SegmentTemplate timescale="10000000" presentationTimeOffset="0" media="$RepresentationID$_Segment-$Time$.m4a" initialization="$RepresentationID$_init.m4i">
<SegmentTimeline>
<S t="43269893629789" d="39680000"/>
<S t="43269933309789" d="40106667"/>
<S t="43269973416456" d="40106666"/>
<S t="43270013523122" d="40106667"/>
<S t="43270053629789" d="39680000"/>
<S t="43270093309789" d="40106667"/>
<S t="43270133416456" d="40106666"/>
<S t="43270173523122" d="40106667"/>
<S t="43270213629789" d="39680000"/>
<S t="43270253309789" d="40106667"/>
<S t="43270293416456" d="40106666"/>
<S t="43270333523122" d="40106667"/>
<S t="43270373629789" d="39680000"/>
<S t="43270413309789" d="40106667"/>
<S t="43270453416456" d="40106666"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation audioSamplingRate="48000" codecs="mp4a.40.5" id="1763981970283item-08item" bandwidth="64000"/>
</AdaptationSet>
<AdaptationSet mimeType="application/mp4" startWithSAP="1" lang="cmn" segmentAlignment="true">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
<SegmentTemplate timescale="10000000" presentationTimeOffset="0" media="$RepresentationID$_Segment-$Time$.m4s" initialization="$RepresentationID$_init.m4i">
<SegmentTimeline>
<S t="43269893296900" d="40000000" r="14"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation codecs="stpp" id="1763981970283item-09item" bandwidth="15000"/>
</AdaptationSet>
<AdaptationSet mimeType="application/mp4" startWithSAP="1" lang="eng" segmentAlignment="true">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
<SegmentTemplate timescale="10000000" presentationTimeOffset="0" media="$RepresentationID$_Segment-$Time$.m4s" initialization="$RepresentationID$_init.m4i">
<SegmentTimeline>
<S t="43269893296900" d="40000000" r="14"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation codecs="stpp" id="1763981970283item-10item" bandwidth="15000"/>
</AdaptationSet>
<AdaptationSet mimeType="application/mp4" startWithSAP="1" lang="msa" segmentAlignment="true">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
<SegmentTemplate timescale="10000000" presentationTimeOffset="0" media="$RepresentationID$_Segment-$Time$.m4s" initialization="$RepresentationID$_init.m4i">
<SegmentTimeline>
<S t="43269893296900" d="40000000" r="14"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation codecs="stpp" id="1763981970283item-11item" bandwidth="15000"/>
</AdaptationSet>
</Period>
</MPD>
Relevant log output
The warning appears repeatedly during playback.
<inputstream.adaptive>: ParseTagBody: The "backgroundImage" attribute to show subtitles images is not supported.
Feature request
To improve behavior and user experience, please consider adding support for image-based TTML subtitles (backgroundImage) in STPP streams, enabling proper rendering of such subtitles.