<p>If you need more formats and better file parsing capabilities, you can use <a href="https://github.com/mantas-done/subtitles" rel="nofollow noreferrer">subtitles package</a></p>
<pre><code>php subtiltes.phar input.ttml output.stl
</code></pre>

CC BY-SA 4.0
2023-08-15T11:41:04.140Z
2023-08-15T11:41:04.140Z
Mantas D
<p>The <a href="https://pypi.org/project/ttconv/" rel="nofollow noreferrer">ttconv</a> Python package will do it. It can be installed with pip.</p>

CC BY-SA 4.0
2021-10-04T05:22:50.270Z
2021-10-04T05:22:50.270Z
Casey Jones
<p>I want to convert a file with <code>TTML</code> subtitles preferably to <code>STL</code>, or to <code>SRT</code> (less preferred). I thought that I would be able to do it with <code>ffmpeg</code> but apparently they do not support it, because the <code>TTML</code> is <code>XML</code>-based. My main goal is to find a way to do this using the command line, so I can use it in a script.</p>

<ffmpeg><subtitles><linux><command-line>
Convert TTML Subtitles to STL or SRT in Linux
Georgi Stoyanov
# Convert TTML Subtitles to STL or SRT in Linux

(Asked by: username_0 on 2021-02-05)

I want to convert a file with `TTML` subtitles preferably to `STL`, or to `SRT` (less preferred). I thought that I would be able to do it with `ffmpeg` but apparently they do not support it, because the `TTML` is `XML`-based. My main goal is to find a way to do this using the command line, so I can use it in a script.

**Tags:** ffmpeg, subtitles, linux, command-line


---

## 2 answers

### Answer by username_2 on 2021-10-04. Score: 3 | Accepted answer

The [ttconv](https://pypi.org/project/ttconv/) Python package will do it. It can be installed with pip.


---

### Answer by username_1 on 2023-08-15. Score: 0

If you need more formats and better file parsing capabilities, you can use subtitles package
php subtiltes.phar input.ttml output.stl


---

