🔧 a simple tool to convert subtitles in the TTML format over to more mainstream SRT format
_ _ _ _____ _
| | | | | |/ __ \ | |
| |_| |_ _ __ ___ | |`' / /'___ _ __| |_
| __| __| '_ ` _ \| | / / / __| '__| __|
| |_| |_| | | | | | |./ /__\__ \ | | |_
\__|\__|_| |_| |_|_|\_____/___/_| \__|
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.
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.
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`
....
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
0.1.0-BETA
- anharmiah Anhar Miah - creator, maintainer