Opened 7 years ago

Last modified 6 months ago

#4859 new enhancement

TTML subtitle decoding

Reported by: Carl Eugen Hoyos Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: sub videolan mpv
Cc: markus.magnuson@gmail.com, tomashnyk@gmail.com, basic.master@gmx.de, dave@dericed.com, ebalsley@pm.me, ffmpeg@tmm1.net, v10lator@myway.de, mkuron Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

vlc ticket 14974: https://trac.videolan.org/vlc/ticket/14974
FFmpeg does not support EBU Timed-Text Markup Language (TTML) subtitles yet.

Change History (21)

comment:1 by peppersghost, 6 years ago

Cc: markus.magnuson@gmail.com added

comment:2 by Carl Eugen Hoyos, 6 years ago

Keywords: videolan added

comment:3 by Tomáš Hnyk, 5 years ago

Cc: tomashnyk@gmail.com added

by AlexisMay, 5 years ago

Attachment: Still Open All Hours.ttml added

comment:5 by Basic.Master, 3 years ago

Cc: basic.master@gmx.de added
Keywords: EBU-TT-D IMSC added

comment:6 by Carl Eugen Hoyos, 3 years ago

Keywords: EBU-TT-D IMSC removed

comment:7 by Basic.Master, 3 years ago

@cehoyos:
Is there a reason why you removed the keywords I added in addition?
EBU-TT-D and IMSC (being a superset of EBU-TT-D) are the TTML profiles that are actually used in production for TTML subtitles.

comment:8 by Carl Eugen Hoyos, 3 years ago

We will not have more imsc tickets and the full text search is not disabled here (as it is on other trac installations).

comment:9 by Basic.Master, 3 years ago

Hmm, I haven't found any other tickets related to IMSC (or EBU-TT-D). The enabled full text search is a point though.

comment:10 by dave rice, 23 months ago

Cc: dave@dericed.com added

comment:11 by Elliott, 20 months ago

Cc: ebalsley@pm.me added

comment:12 by Aman, 20 months ago

Cc: ffmpeg@tmm1.net added

comment:14 by V10lator, 18 months ago

Cc: v10lator@myway.de added

comment:15 by mkuron, 9 months ago

Cc: mkuron added

comment:16 by CoRoNe, 9 months ago

I can't code in C, but I do know XPath/XQuery.
Seeing that after all these years FFmpeg still doesn't support TTML, I thought I'd have a look at the attached TTML files to see if Xidel, a command-line-tool and XML/HTML parser, could convert it to valid SRT files. The answer is yes, it can. If anyone's interested, I've created a gist.

  • Invalid time codes
  • End-time vs. duration
  • Text-nodes directly within the <p>-node or within several <span>-nodes
  • Lots of nonsensical white-space
  • Different ways of styling

I can imagine this doesn't help in trying to add support. Each TTML file attached here needed another approach / query. One query that fits them all would be extremely difficult, or even impossible.

comment:17 by Elliott, 6 months ago

Component: undeterminedavcodec
Summary: TTML subtitlesTTML subtitle decoding

Editing title to clarify that TTML encoding is already supported. (Added in March 2021 but I didn't notice until now)

Note: See TracTickets for help on using tickets.