Skip to content

nopol10/ttml

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple tools to convert NHK .ttml Closed Caption files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%