Skip to content

killergerbah/jsubtitle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsubtitle

Bare-bones subtitle file parsing in Java. Currently supports SRT and ASS files.

Example Usage

ASS parsing

File file = new File("subtitles.ass");
AssFile assFile = AssFile.read(file);
EventSection eventSection = assFile.getEventSection();

for (DialogEvent event : eventSection.getEvents()) {
    String text = event.getText();
    long start = event.getStart();
    long end = event.getEnd();
    // ...
}

SRT parsing

File file = new File("subtitles.srt");
List<SrtSubtitle> subtitles = SrtSubtitle.read(file);

for (SrtSubtitle subtitle : subtitles) {
    String text = subtitle.getText();
    long start = subtitle.getStart();
    long end = subtitle.getEnd();
    // ...
}

About

Java library for parsing subtitle files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages