Skip to content

🔧 a simple tool to convert subtitles in the TTML format over to more mainstream SRT format

Notifications You must be signed in to change notification settings

AnharHussainMiah/ttml2srt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ttml2srt

🔧 a simple tool to convert subtitles in the TTML format over to more mainstream SRT format

alt Experimental alt Rust alt Binary alt Failed alt Passed alt Version

_   _              _  _____          _
| | | |           | |/ __  \        | |
| |_| |_ _ __ ___ | |`' / /'___ _ __| |_
| __| __| '_ ` _ \| |  / / / __| '__| __|
| |_| |_| | | | | | |./ /__\__ \ |  | |_
 \__|\__|_| |_| |_|_|\_____/___/_|   \__|

Introduction

The BBC (British Broadcasting Corporation) and perhaps others tend to use the rather obscure subtitle format known as ttml Timed Text Markup Language . Most video players and software tend to use the much more mainstream format called srt.

For a while I've been using ttconv written by sandflow in Python. While I'm sure that covers vastly more edge cases and what not, installing and setting it up is a chore! and it's weirdly slow (it's Python so maybe not entirely a surprise).

I'm a simple man with simple needs and so ttml2srt was born, it's a single binary with a single purpose take ttml and spit out srt and do it quickly.

Downloads

If you want to grab a static binary ready to go simply click on the release tab, this is for x86 Linux only. For other platforms you'll need to compile from source.

Releases

How to build from source

Just use the standard Rust cargo toolchain to build from source. Alternatively to build a statically linked binary, just run the handy build script ./build.sh.

$ cargo build
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
    Running `target/debug/ttml2srt`
....

How to use

Anhar Hussain Miah

_   _              _  _____          _
| | | |           | |/ __  \        | |
| |_| |_ _ __ ___ | |`' / /'___ _ __| |_
| __| __| '_ ` _ \| |  / / / __| '__| __|
| |_| |_| | | | | | |./ /__\__ \ |  | |_
 \__|\__|_| |_| |_|_|\_____/___/_|   \__|

        2024 (c) TTML2SRT v0.1.0

USAGE:
    ttml2srt --file-name <FILE_NAME>

OPTIONS:
    -f, --file-name <FILE_NAME>    the TTML filename e.g ttml2srt -f subtitle.ttml
    -h, --help                     Print help information
    -V, --version                  Print version information

Version

0.1.0-BETA

Contributors

About

🔧 a simple tool to convert subtitles in the TTML format over to more mainstream SRT format

Resources

Stars

Watchers

Forks

Packages

No packages published