Opened 9 years ago

Last modified 5 weeks 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, sersorrel 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 (23)

comment:1 by peppersghost, 7 years ago

Cc: markus.magnuson@gmail.com added

comment:2 by Carl Eugen Hoyos, 7 years ago

Keywords: videolan added

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

Cc: tomashnyk@gmail.com added

by AlexisMay, 6 years ago

Attachment: Still Open All Hours.ttml added

comment:5 by Basic.Master, 5 years ago

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

comment:6 by Carl Eugen Hoyos, 5 years ago

Keywords: EBU-TT-D IMSC removed

comment:7 by Basic.Master, 5 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, 5 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, 5 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, 4 years ago

Cc: dave@dericed.com added

comment:11 by Elliott, 3 years ago

Cc: ebalsley@pm.me added

comment:12 by Aman, 3 years ago

Cc: ffmpeg@tmm1.net added

comment:14 by V10lator, 3 years ago

Cc: v10lator@myway.de added

comment:15 by mkuron, 2 years ago

Cc: mkuron added

comment:16 by CoRoNe, 2 years 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, 2 years 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)

comment:18 by sersorrel, 20 months ago

Cc: sersorrel added

comment:19 by svnpenn, 5 weeks ago

note this is currently not supported in FFplay:

No decoder could be found for codec ttml

Note: See TracTickets for help on using tickets.