Closed teb closed 4 years ago
This should be a request towards FFmpeg.
Demuxing these is simple (as long as you remember stpp
is "times are offsets from PTS=0, not the sample", and dfxp
is "times the sane way, offsets from the sample"), too bad the format is XML and all. Thus I am noting that it is highly unlikely that someone will attempt to make a decoder for this.
Already reported upstream https://trac.ffmpeg.org/ticket/4859
Well, ffmpeg closed this case years ago, not willing to move it with a cryptic response ;). TTML is the defacto standard for CMAF in the form of the IMSC1 format which is common for Apple as well as android cmaf. @jeeb Not sure why the resentment for xml ?
Well, ffmpeg closed this case years ago
No they didn't, the ticket is still open.
not willing to move it
because presumably, nobody who isn't getting paid to wants to touch this trash fire of a standard.
Not sure why the resentment for xml ?
Because it's one of the worst pieces of shits ever invented?
@CounterPillow Ure right! Its still open for business, just got put of on the discussion at the end! @wm4 that can be
It certainly is. Because XML is so surprisingly complex and messy, and because there's no sane light-weight XML parser, ffmpeg does not well with XML based stuff. On top of this, TTML seems to have its own misdesigned mess on top of it.
looking at sample from Mubi, it seems easy enough to parse:
<?xml version="1.0" encoding="utf-8"?>
<tt xmlns="http://www.w3.org/ns/ttml"
xmlns:ttm="http://www.w3.org/ns/ttml#metadata"
xmlns:ttp="http://www.w3.org/ns/ttml#parameter"
xmlns:tts="http://www.w3.org/ns/ttml#styling" xml:lang="en"
ttp:profile="http://www.w3.org/ns/ttml/profile/imsc1/text">
<head>
<metadata>
<ttm:title/>
<ttm:desc/>
<ttm:copyright/>
</metadata>
<styling>
<style xml:id="basic" tts:backgroundColor="transparent" tts:color="white" tts:fontFamily="proportionalSansSerif" tts:fontSize="16px" tts:textAlign="center"/>
</styling>
<layout>
<region style="basic" xml:id="speaker" tts:displayAlign="center" tts:extent="80% 10%" tts:origin="10% 85%"/>
</layout>
</head>
<body>
<div xml:lang="en">
<p begin="00:01:08.000" end="00:01:09.642" region="speaker">Sorry to interrupt your dinner.</p>
<p begin="00:01:09.666" end="00:01:10.000" region="speaker">Never mind, let's sit over there.</p>
</div>
</body>
</tt>
I just tested a mp4 file with STPP (TTML) subs and mpv shows it as 0 subs. Output from mp4box under: