Skip to content

builttoroam/SubtitlesParser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SubtitlesParser

===============

Universal subtitles parser which aims at supporting all subtitle formats. For more info on subtitles formats, see this page: http://en.wikipedia.org/wiki/Category:Subtitle_file_formats

It's available on Nuget:

Install-Package SubtitlesParser

For now, 7 different formats are supported:

Quickstart

You can check the Test project for subtitles files and more sample codes.

Universal parser

If you don't specify the subtitle format, the SubtitlesParser will try all the registered parsers (7 for now)

var parser = new SubtitlesParser.Classes.Parsers.SubtitlesParser();
using (var fileStream = File.OpenRead(pathToSrtFile)){
	var items = parser.ParseStream(fileStream);
}

Specific parser

You can use a specific parser if you know the format of the files you parse. For example, for parsing an srt file:

var parser = new SubtitlesParser.Classes.Parsers.SrtParser();
using (var fileStream = File.OpenRead(pathToSrtFile)){
	var items = parser.ParseStream(fileStream);
}

About

Multi formats subtitles parser in C#

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.2%
  • SRecode Template 0.8%