Package de.mediathekview.mlib.tool
Class TimedTextMarkupLanguageParser
java.lang.Object
de.mediathekview.mlib.tool.TimedTextMarkupLanguageParser
Converter for TTML XML subtitle files into SubRip Text format.
Tested with MediathekView downloaded subtitles and TTML format version 1.0.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()booleanParse the TTML file into internal representation.booleanparseXmlFlash(Path ttmlFilePath) Parse the XML Subtitle File for Flash Player into internal representation.voidConvert internal representation into SubRip Text Format and save to file.
-
Constructor Details
-
TimedTextMarkupLanguageParser
public TimedTextMarkupLanguageParser()
-
-
Method Details
-
parse
Parse the TTML file into internal representation.- Parameters:
ttmlFilePath- the TTML file to parse- Returns:
- true if the parsing was successful
-
parseXmlFlash
Parse the XML Subtitle File for Flash Player into internal representation.- Parameters:
ttmlFilePath- the TTML file to parse- Returns:
- true if the parsing was successful
-
toSrt
Convert internal representation into SubRip Text Format and save to file.- Parameters:
srtFile- The path to the srt file to convert
-
cleanup
public void cleanup()
-