mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 14:32:35 +01:00
fe52a5083e
Related to #7671 |
||
---|---|---|
.. | ||
AudioToText | ||
AutoTranslate | ||
BluRaySup | ||
CDG | ||
Cea608 | ||
Cea708 | ||
Common | ||
ContainerFormats | ||
DetectEncoding | ||
Dictionaries | ||
Enums | ||
Forms | ||
Grammar | ||
Http | ||
Interfaces | ||
NetflixQualityCheck | ||
Properties | ||
Resources | ||
SpellCheck | ||
SubtitleFormats | ||
Translate | ||
VobSub | ||
GermanNouns.cs | ||
Icon.png | ||
LibSE.csproj | ||
Readme.md |
libse
How to load a subtitle file
var subtitle = Subtitle.Parse(fileName);
var numberOfSubtitleLines = subtitle.Paragraphs.Count;
var firstText = subtitle.Paragraphs.First().Text;
var firstStartMilliseconds = subtitle.Paragraphs.First().StartTime.TotalMilliseconds;
How to save a subtitle file
File.WriteAllText(@"C:\Data\new.srt", new SubRip().ToText(subtitle, "untitled"));