Skip to content

Latest commit

 

History

History
44 lines (24 loc) · 1.17 KB

README.md

File metadata and controls

44 lines (24 loc) · 1.17 KB

ttml

This is a fork of on-three's NHK ttml to SRT/ASS converter with some fixes.

Note: ASS output does not work correctly! Use SRT only!


Prerequisites

  1. bs4
  2. lxml

Run pip install -r requirements.txt to install them


Usage

  1. Install Python 3 if you do not already have it

  2. Download the convert.py python file

  3. Run python convert.py filename.ttml in command prompt / terminal


Arguments

python convert.py [-h] [-o OUTFILE] [-f] [-e EXTENSION] infile

Mandatory argument:

  • infile: The name of the input NHK .ttml file. If --folder is specified, this must be the path to the folder. Omit any trailing slashes

Optional arguments:

  • --outfile: The name of the output file. If omitted, the output file will be named inputfile.[extension]. When using file mode, include the desired extension as part of the name (e.g. mysubtitle.srt if you want an SRT output).

  • --folder: Specify this flag to treat infile as a folder. All files within the folder will be converted to the given format specified in extension.

  • --extension: The extension of the output file. Only works when the folder flag is specified. Can be srt or ass. Defaults to srt.