Caption conversion

Convert TTML to SRT

Timed Text Markup Language (TTML) to SubRip Subtitle (SRT). Convert in the web app, automate with the REST API, or run it offline with the CLI.

TTML covers a whole family of XML caption formats, so the first step in converting TTML to SRT is choosing the right source profile. Generic TTML works for most documents. Profiles such as IMSC, SMPTE-TT, EBU-TT or a platform-specific TTML decode files from those workflows more faithfully. Either way, the output is a clean, universally compatible SRT.

What carries over

  • Caption text and line breaks, including nested <span> content
  • Italics, bold and underline
  • Timing from clock, frame or tick expressions, converted to milliseconds

What changes

  • Region layout, colors, backgrounds and fonts are removed
  • Image-based TTML (for example IMSC Image profile) contains no text and cannot be converted to SRT
  • Simultaneous captions in separate regions become overlapping cues
  • The xml:lang language tag and other metadata are not kept

How to convert TTML to SRT

The same conversion engine powers all three, so a job you set up in the web app produces identical output from the API or CLI.

In the web app

  1. Sign in to the web app, or start a free trial.
  2. Upload your .ttml file and select Timed-Text Markup Language as the source profile.
  3. Select SubRip Video Subtitle Script as the target profile.
  4. Review the recommended settings for this conversion.
  5. Run the conversion and download your .srt file.

With the API

POST /jobs
curl -X POST https://api.closedcaptionconverter.com/jobs \
  -H "x-api-key: YOUR_API_KEY" \
  -F "source=@input.ttml" \
  -F 'config={
    "job_type": "convert",
    "source_profile": "Timed-Text Markup Language",
    "target_profile": "SubRip Video Subtitle Script",
    "fix_overlap": true
  }'

See API Getting Started for authentication and response handling.

With the CLI

Command line
ccconverter \
  --source input.ttml \
  --target output.srt \
  --source_profile "Timed-Text Markup Language" \
  --target_profile "SubRip Video Subtitle Script" \
  --fix_overlap true

The CLI runs fully offline on macOS, Windows and Linux. See the CLI docs for every flag.

Recommended settings

Source profileGeneric TTML, or the specific profile (IMSC, SMPTE TTML, EBU TT, Netflix TT) the file was authored to.
Fix overlapRecommended for multi-region documents.
Target encodingUTF-8.

Format-specific options are covered in Encoding & Decoding Options and Profiles & Formats.

TTML to SRT questions

If the file came from a specific platform or spec (for example an IMSC or Netflix TT delivery), pick that profile. Otherwise use Timed-Text Markup Language. Look in the file’s root element and <head> for profile hints.

It may be an image-based TTML, where subtitles are PNG images rather than text, or it may use a profile whose namespaces the generic decoder does not expect. Try the specific profile, or contact support with a sample.

WebVTT can keep basic placement, unlike SRT. Choose WebVTT as the target if positioning matters.

Free trial

Convert TTML to SRT now

Upload your .ttml file and download SRT in seconds, or automate it with the API and CLI.