TTML and DFXP to VTT
Convert TTML and DFXP captions to WebVTT for the web
Drop .ttml, .dfxp or timed-text .xml files and get .vtt files back for HTML5 players and course hosts. Clock, frame and tick timing become real timestamps, line breaks and italics carry over, and a warning tells you what styling was left behind.
- Whole folders to one zip, subfolders kept
- Files never leave your device
- Try 3 files free; $19 once for unlimited
Drop subtitle files or a folder hereChoose subtitle files
SRT, WebVTT, ASS/SSA, MicroDVD, YouTube .sbv and TTML/DFXP (.ttml .dfxp .xml). Free: 3 files per batch; Unlimited: any number. On phones, choose several files instead of a folder.
Options auto encoding, no offset, keep tags
Sample batch2 files
- survey-crew.ttmlReady, 1 warning
- Styling was dropped (colours, fonts); italic, bold and underline were kept.
- lecture-frames.dfxpReady, 1 warning
- 1 cue has no end or duration; it ends when the next cue starts (3 seconds for the last one).
WEBVTT 00:00:01.250 --> 00:00:04.125 The survey crew arrived at <i>dawn</i>. 00:00:04.500 --> 00:00:07.000 Two engineers, one very old map. 00:00:08.200 --> 00:00:10.900 Rock & tide, as the log says.
Converted in this tab. Nothing is uploaded.
The format
Where TTML and DFXP files come from
TTML (Timed Text Markup Language) is the W3C's XML caption format; DFXP is its first version. You meet them in broadcast and streaming deliverables, in files exported by captioning vendors and platforms, and in older web players. Each caption is a <p> element with begin and end times, inside an XML file whose root element is <tt>.
Browsers do not play TTML in a video element. WebVTT is the format HTML5 players and most course hosts accept, so a TTML delivery usually has to be converted before it can be published on the web. Because files arrive as .ttml, .dfxp or plain .xml, the converter decides by content: a file whose first element is <tt> is timed text, and other XML is reported as not a subtitle.
Real output
A real TTML file and the WebVTT it produces
The input uses ticks, a style reference, a duration instead of an end time, a line break and an escaped ampersand. The WebVTT below is what this converter writes for it.
Before: survey-crew.ttml
<?xml version="1.0" encoding="UTF-8"?>
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling" xmlns:ttp="http://www.w3.org/ns/ttml#parameter" xml:lang="en" ttp:tickRate="10000000">
<head>
<styling>
<style xml:id="emph" tts:fontStyle="italic"/>
<style xml:id="base" tts:color="white" tts:fontFamily="proportionalSansSerif"/>
</styling>
</head>
<body>
<div>
<p begin="12500000t" end="41250000t" style="base">The survey crew arrived at <span style="emph">dawn</span>.</p>
<p begin="45000000t" dur="2.5s" style="base">Two engineers,<br/>one very old map.</p>
<p begin="82000000t" end="109000000t">Rock & tide, as the log says.</p>
</div>
</body>
</tt>After: survey-crew.vtt
WEBVTT 00:00:01.250 --> 00:00:04.125 The survey crew arrived at <i>dawn</i>. 00:00:04.500 --> 00:00:07.000 Two engineers, one very old map. 00:00:08.200 --> 00:00:10.900 Rock & tide, as the log says.
What the converter reports for this file:
- Styling was dropped (colours, fonts); italic, bold and underline were kept.
What changes
What is kept and what is dropped going from TTML to VTT
| In the TTML file | In the WebVTT file |
|---|---|
| Clock, offset, frame and tick times | Converted to HH:MM:SS.mmm timestamps (ticks use ttp:tickRate, frames use ttp:frameRate) |
| begin plus dur, or no end time | End is begin plus dur; with neither, the cue ends when the next one starts (3 seconds for the last), with a warning |
| <br/> and nested <span> elements | A line break inside the cue, and one line of text |
| Italic, bold and underline, also via referenced styles | Kept as <i>, <b> and <u> |
| Colours, fonts, alignment, regions and positions | Dropped, with one warning per file naming what was left out |
| Word-by-word timed spans | Merged into the caption, with a warning |
| Entities such as & and numeric references | Turned back into characters, then escaped again as WebVTT requires |
| Captions stored as embedded images | Not text; reported as not convertible |
How to
How to convert TTML or DFXP to VTT
Drop the files or the folder
Drag .ttml, .dfxp or .xml files onto the converter, or a whole delivery folder. Other files are skipped.
Check the warnings
Each file shows its cue count and what the converter did: dropped styling, captions without an end time, anything it could not read.
Keep WebVTT selected and save
WebVTT is preselected here. Several files come back as one zip with your folders kept.
Built for deliveries
Convert the whole folder, not one file at a time
A delivery is a folder of mixed formats. Drop it as it is and save one zip with the same folder tree, with the warnings and options applied in one pass.
Drop this folder (example)
delivery/
season-1/
ep01.srt
ep02.vtt
season-2/
ep01.ass
ep02.sbv
extras/
trailer.ttml
notes.pdfSave this zip (output SRT, +2 s, tags stripped)
delivery-srt.zip
season-1/
ep01.srt
ep02.srt
season-2/
ep01.srt
ep02.srt
extras/
trailer.srtExample folder. Files that are not subtitles, like notes.pdf, are skipped.
Mixed formats, nested folders
SRT, WebVTT, ASS/SSA, MicroDVD, SBV and TTML/DFXP in the same folder tree, each detected by its content.
One zip, same tree
Every converted file lands in the same subfolder it came from, ready to hand back.
Per-file warnings
Encoding guesses, skipped lines and dropped styling are listed under the file they belong to.
Offset and tag strip in the same pass
Shift timing and remove formatting tags for the whole batch while it converts.
FAQ
Questions
Is DFXP the same as TTML?
DFXP is the original name of the TTML format. The converter reads both, whatever the file extension is, including .xml files that start with a <tt> element.
Will I lose the colours and positions?
WebVTT output here carries italic, bold and underline only, so colours, fonts, alignment and regions are dropped and a warning names what was left out. Keep the original TTML file if you still need the styling.
Does it read frame-based and tick-based timing?
Yes. Frames use ttp:frameRate (30 if absent) and ttp:frameRateMultiplier, ticks use ttp:tickRate, and clock times, offset times such as 12.5s and parent begin offsets are supported as well.
Can it convert VTT to TTML?
No. TTML and DFXP are input formats here. Captionry writes SRT, WebVTT, ASS, MicroDVD and plain text.
Can I convert a whole folder?
Yes. Free for 3 files per batch; Unlimited ($19 once) has no limit. Files are converted in your browser tab and never uploaded.
Related
More from Captionry
Converting more than 3 files at a time?
Unlimited removes the batch limit for $19 once, with no subscription.