Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-15T11:41:04.140Z
Answers.LastActivityDate: 2023-08-15T11:41:04.140Z
Answers.UserDisplayName: Mantas D
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-04T05:22:50.270Z
Answers.LastActivityDate: 2021-10-04T05:22:50.270Z
Answers.UserDisplayName: Casey Jones
Body: <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>
  
Tags: <ffmpeg><subtitles><linux><command-line>
Title: Convert TTML Subtitles to STL or SRT in Linux
UserDisplayName: Georgi Stoyanov
ThreadText: # 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](https://github.com/username_1-done/subtitles)
  
  ```
  php subtiltes.phar input.ttml output.stl
  
  ```
  
  
  ---
  
  