Skip to content

SharpSubtitles is a high-performance reader/writer/converter between 3 subtitle formats: SRT, LRC, and ASS

License

Notifications You must be signed in to change notification settings

winscripter/SharpSubtitles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SharpSubtitles

SharpSubtitles is a reader/writer/converter between 3 subtitle formats: SRT, LRC, and ASS

Loading an ASS file

var ass = new AssFile(File.ReadAllText("subtitles.ass"));
foreach (var subtitle in ass.GetSubtitles())
{
    // do something with subtitle
}

Loading an SRT file

var srt = new SrtFile(File.ReadAllText("subtitels.srt"));
foreach (var subtitle in srt.Subtitles)
{
    // do something with subtitle
}

Loading an LRC file

var lrc = new LrcFile(File.ReadAllText("subtitles.lrc"));
foreach (var subtitle in lrc.Subtitles)
{
    // do something with subtitle
}

Subtitle conversion

The SubtitleConvert class has nested classes to convert subtitle formats:

  • SubtitleConvert
    • ASS
      • ToSrt
      • ToLrc
    • SRT
      • ToAss
      • ToLrc
    • LRC
      • ToAss
      • ToSrt

Releases

No releases published

Packages

No packages published

Languages