Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 0abd60953d
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (36 sloc) 1.922 kB

to_srt.py

A command line utility written in Python to convert some variants of subtitles in to the much simpler SRT file format with optional formatting. SRT also has the benefit of being trivial to convert to WebVTT, the W3C sanctioned subtitle format. Supported input file formats are:

  • STL subtitles files stored using the EBU (European Broadcasting Union) file format
  • TT (W3C Timed Text) files and their variants from the SMPTE and the EBU

This conversions can be optionally done while preserving as much formatting as possible. The output formatting is done using inline html tags and the following attributes are supported:

  • bold
  • italic
  • underlined
  • color

Usage

to_srt.py [-h] [--help] [-d] [--debug] [-r] [--rich] [-s] [--stl] [-t] [--tt] input_file output.srt

-h
--help Display this usage notice

-d
--debug Display raw frames as they’re read

-r
--rich Keep the rich formatting contained in the STL file

-s
--stl Source format is STL, this is actually the default value and isn’t really useful

-t
--tt Source format is Time Text

Bibliography

License

This software is release under the GNU GPL v2 terms and conditions. See the GPL.txt file for the complete license text

Jump to Line
Something went wrong with that request. Please try again.