Convert DFXP, TTML and XML subtitles to SRT
Streaming services and broadcasters deliver subtitles as XML: TTML, often saved as .dfxp, .ttml or .xml. Most players and TVs want SRT. Upload the XML file and download SRT with every line on its correct time, whether the file counts time in clock values, frames or ticks. Jobs with up to 3,000 lines are free in full; bigger batches are $5, paid once.
- Reads .dfxp, .ttml and .xml subtitle files
- Tick times such as 15015000t converted using the file's tick rate
- Frame times such as 00:01:02:12 converted using the file's frame rate
- Line breaks and italic spans kept; colors and regions are not carried
- Lines put in time order, then numbered for SRT
Why streaming XML is awkward
A TTML file is an XML document. Each subtitle is a <p> element with a begin and an end, or a begin and a duration, and the text inside can contain <br/> line breaks and <span> elements with styling. The hard part is time. Some files write 00:01:02.500. Others count frames, 00:01:02:12 at the frame rate declared on the root element. Files from some streaming services count ticks, for example begin="15015000t", where the tickRate on the root element says how many ticks make one second, often ten million.
Converting that by hand means dividing a large number for every line. The converter reads the declared tickRate and frameRate and does the division for each begin, end and duration, so 15015000t at ten million ticks per second becomes 00:00:01,502.
What carries over
- Text of every <p>, with <br/> as a line break and extra spaces tidied
- Italic text marked with tts:fontStyle="italic", as <i> tags
- Times from begin and end, or begin and dur
- Not carried: colors, fonts, regions and on-screen positions
Practical notes
The file must be well-formed XML; a file that was cut off or edited by hand so that tags no longer close will not read. If the converted SRT is out of step with your copy of the video, the release you have may run at a different speed or start at a different point; fix that with Fix Subtitle Sync. You can also download TTML again, as a clean file with standard clock times, or VTT for a web player.
The converted lines are shown on screen first, so you can compare the opening lines with the video before you download.
How the tool works, what it costs and how your files are handled is on the Subtitle Converter page; prices for every tool are on the pricing page.
Last updated
Questions and answers
Can ChatGPT convert DFXP to SRT?
It knows the format and can handle a few lines. A full episode in XML is long, and converting tick or frame times means arithmetic on every line, which chat replies tend to get wrong in places or cut short. This tool computes every time in code.
What are the numbers ending in t in my file?
Ticks. The tickRate on the file's root element says how many ticks make a second, commonly ten million, and the converter divides by it to get the time.
Is .dfxp different from .ttml?
DFXP is an earlier name for the same TTML format. Both, and subtitle files saved as .xml, are read the same way.
Will colors and positions be kept?
No. SRT has no regions or colors, so the text and italics are kept and the lines appear in the player's usual place.
What does it cost?
A job with up to 3,000 subtitle lines in total is free in full. Bigger jobs, such as a season of XML files, are $5 for up to 50 files or a ZIP and 50,000 lines.
Does it work on image subtitles from a Blu-ray?
No. Blu-ray .sup files are pictures, not XML text, and need character recognition, which this tool does not do.