XConvert
Downloads
Pricing

Convert SUB to TTML Online

Turn your .sub subtitle file into TTML in seconds with a fast, client-side converter that works right in your browser.

Input (SUB)
Output (TTML)

SUB to TTML Converter

MicroDVD .sub and TTML sit at opposite ends of the subtitle world. One is a de facto plain-text format from the DivX player era that counts video frames; the other is a W3C XML standard that underpins broadcast and streaming captioning through profiles such as IMSC and EBU-TT. Converting between them means rewriting frame indices as clock times and wrapping the result in a namespaced XML document. This page documents both formats, and exactly what the converter on this page emits.

MicroDVD (.sub) at a Glance

Property Value
Standard None — de facto format popularised by the MicroDVD player
Encoding Plain text; no declared charset, frequently a legacy code page
Cue syntax {startFrame}{endFrame}Text — one cue per line
Timing base Frame numbers, not time
Precision One frame — 40 ms at 25 fps, about 41.7 ms at 23.976 fps
Frame rate carried in the file Only by convention, as a first line such as {1}{1}23.976
Line break within a cue | pipe character
Styling Inline codes: {y:i} italic, {y:b} bold, {y:u} underline, {y:s} strikethrough, {f:name} font, {s:n} size, {c:$BBGGRR} colour in blue-green-red order
Positioning {P:x,y}
Case rule for codes Uppercase applies to the whole subtitle, lowercase only to that line
Still used for Legacy DivX/Xvid rips and the players that shipped with them

TTML at a Glance

Property Value
Standard W3C Timed Text Markup Language 1, Third Edition — Recommendation, 8 November 2018
Syntax XML
Root element tt, in namespace http://www.w3.org/ns/ttml
Document shape tt contains a head for metadata, styling and layout, and a body for content
Timing base Clock time, offset time such as 0.76s, or SMPTE frames on a frame-based time base
Precision Down to milliseconds in clock-time form
Styling A full style and region system in head, referenced by content elements
Encoding XML rules apply; UTF-8 in practice
File extensions .ttml, and .dfxp for the older Distribution Format Exchange Profile naming
Derived profiles W3C IMSC 1.2 (Recommendation, 4 August 2020, text and image profiles), EBU-TT, SMPTE-TT
Used for Streaming and broadcast caption interchange, including DASH delivery

What This Converter Emits

The output is a deliberately minimal TTML document: an XML declaration, a tt root carrying the TTML namespace, and a single body → div containing one <p> per cue with begin and end written as clock times to the millisecond. A \| in the MicroDVD source becomes a <br/> inside the paragraph. Nothing else is generated, and it is worth being explicit about what that means:

  • No head section, so no styling or layout blocks and no named regions.
  • No xml:lang on the root. TTML 1 does not formally require it, but profiles like IMSC and EBU-TT-D expect a declared language, so add one before running the file through a broadcast validator.
  • No ttp:frameRate. The output is written on a clock-time base, so the frame information from the source is resolved away rather than preserved.
  • No styling from the source. MicroDVD's inline codes are stripped along with their braces, not translated into TTML style attributes.
  • Caption text is not XML-escaped. Cue text is written into the <p> element as-is, so an ampersand or an angle bracket in your captions — "R&B", "AT&T", "under <5 euros" — lands in the document unescaped and makes it malformed XML that a strict parser will reject. Check your source for those characters and replace them with &amp;, &lt; and &gt; in the output before handing the file to a validator or a broadcast tool.

If you need the .dfxp extension and the extra tts styling namespace declaration instead, SUB to DFXP targets the same document shape under the older profile naming.

How to Convert SUB to TTML

  1. Load Your .sub File: Click *� Upload .sub or paste the MicroDVD text into the Input (SUB) box; the character counter above the box confirms the content registered. One file per conversion.
  2. Check the Format Dropdowns: From format is preset to SUB, To format to TTML. Both dropdowns cover all 13 supported subtitle formats.
  3. Click Convert: Press Convert →. The XML appears in the output panel with syntax highlighting; the first run shows "Loading subsrt…" briefly while the parser loads.
  4. Copy or Download the TTML: Take it with *� Copy or save it with ⬇ Download .ttml. Everything happens in your browser.

Frame Rate: The Number the File Doesn't Carry

Because MicroDVD counts frames and TTML records time, the conversion is a multiplication by a frame duration, and that duration is not reliably present in the source. The community answer was to write it on line one as {1}{1}23.976 — FFmpeg's MicroDVD reader scans the first three lines for that pattern and defaults to 23.976 fps when it finds nothing.

This converter assumes 25 fps, exposes no frame-rate control, and does not interpret the first-line declaration — a {1}{1}23.976 header parses as an ordinary cue and lands in the XML as a <p> whose text is 23.976. Remove it from the input first, or delete the first paragraph from the output.

Validate the resulting timeline against the video before you use the file. MicroDVD timing scale is a defect we have open, so the begin and end values are the part to check; cue text, cue order and <br/> placement convert dependably.

Frequently Asked Questions

Is the TTML specification still maintained?

Yes. TTML 1 reached its Third Edition as a W3C Recommendation on 8 November 2018, and the family has continued to grow around it — IMSC 1.2, the profile pair actually used for internet subtitle and caption delivery, became a W3C Recommendation on 4 August 2020. TTML is the living standard in this space in a way MicroDVD emphatically is not.

What is the difference between TTML and DFXP?

They describe the same thing at different moments in its history. DFXP — Distribution Format Exchange Profile — was the original name, and .dfxp files are still common in captioning workflows, particularly older ones. The W3C work is now published as TTML, and modern files usually carry .ttml. This converter's DFXP target produces the same document structure with an additional tts styling namespace declared on the root.

Which TTML profile does the output conform to?

None specifically, by design. It is a plain TTML 1 document using clock-time expressions with no profile declaration, no region or styling vocabulary and no xml:lang. That makes it a clean interchange starting point, but if your destination is IMSC, EBU-TT-D or a broadcast validator, expect to add the profile-required attributes yourself.

Does TTML preserve the frame numbers from the .sub file?

No. TTML can express frame-based timing on a SMPTE time base, but this converter resolves frames into clock times and writes begin="00:00:04.000" style values. The original frame indices are not retained anywhere in the output, which is why the frame rate has to be correct at conversion time rather than fixable afterwards.

Do MicroDVD styling codes turn into TTML styles?

No. {y:i}, {y:b}, {c:$BBGGRR}, {f:} and {s:} are removed with their braces and do not become TTML style attributes or head style definitions. It is a genuinely lossy step in one direction — TTML's styling model is far richer than MicroDVD's, but nothing bridges the two automatically here.

Why does my converted TTML start with a subtitle reading "23.976"?

That is the frame-rate declaration line from your source. We passed a three-cue MicroDVD file with a leading {1}{1}23.976 through this page's own parser and got four cues back, the first containing the literal text 23.976. It is safe to delete that <p> from the output, or the line from the input.

Will the pipe character in a MicroDVD cue survive?

Yes, as structure rather than as a character. | is MicroDVD's line separator, so {100}{200}Line one|Line two becomes a single <p> containing Line one<br/>Line two — a two-line subtitle, not a literal pipe in the text.

Is my subtitle file sent to a server?

No. This is one of xconvert's client-side tools: your browser reads the file locally, converts it with JavaScript running on the page, and generates the download in memory. Nothing about your file leaves the machine, so there is no server-side copy to store or delete.

What if the converter says no cues were parsed?

It means nothing in the input matched {digits}{digits}text. The usual cause is that the file is not MicroDVD despite its extension — .sub is heavily overloaded, covering SubViewer text files and, when paired with an .idx, VobSub bitmap subtitles that contain no text at all. Open the file in a text editor: readable lines full of curly braces mean MicroDVD, binary noise means VobSub, which needs OCR rather than conversion.

Related Convert tools
SUB ConverterConvert Sub To SrtConvert Sub To VttConvert Sub To AssConvert Sub To SsaConvert Srt To TtmlConvert Vtt To TtmlConvert Ass To Ttml

Image Tools

Image CompressorCompress JPEGCompress PNGCompress GIFCompress WebPImage ConverterJPG ConverterImage Resizer

Video Tools

Video CompressorCompress MP4MP4 to GIFVideo to GIFVideo ConverterMP4 ConverterVideo Cutter

Audio Tools

Audio CompressorCompress MP3Compress WAVAudio ConverterMP3 ConverterFLAC to MP3Audio Cutter

Document Tools

Compress PDFMerge Images to PDFSplit PDFPDF to JPGUnzip FilesRAR Extractor

Converters

Time Zone ConverterMeeting PlannerIST to ESTTime Zone AbbreviationsUnit ConverterLength ConverterFlow Rate Converter
© 2026 XConvert.com. All Rights Reserved.
About UsPrivacy PolicyTerms of ServiceContactHelp Us Grow