Turn your .sub subtitle file into TTML in seconds with a fast, client-side converter that works right in your browser.
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.
| 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 |
| 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 |
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:
head section, so no styling or layout blocks and no named regions.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.ttp:frameRate. The output is written on a clock-time base, so the frame information from the source is resolved away rather than preserved.<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 &, < and > 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.