Class TimedTextMarkupLanguageParser


  • public class TimedTextMarkupLanguageParser
    extends Object
    Converter for TTML XML subtitle files into SubRip Text format. Tested with MediathekView downloaded subtitles and TTML format version 1.0.
    • Constructor Detail

      • TimedTextMarkupLanguageParser

        public TimedTextMarkupLanguageParser()
    • Method Detail

      • parse

        public boolean parse​(Path ttmlFilePath)
        Parse the TTML file into internal representation.
        Parameters:
        ttmlFilePath - the TTML file to parse
        Returns:
        true if the parsing was successful
      • parseXmlFlash

        public boolean parseXmlFlash​(Path ttmlFilePath)
        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

        public void toSrt​(Path srtFile)
        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()