using OSD.FromReal; SubtitleFile subtitle = SubtitleFile.LoadFromFile("my_subtitle.srt");
using OSD.FromReal; SubtitleFile subtitle = new SubtitleFile(); SubtitleEntry entry1 = new SubtitleEntry { StartTime = TimeSpan.FromSeconds(0), EndTime = TimeSpan.FromSeconds(5), Text = "Hello, world!" }; subtitle.AddEntry(entry1); subtitle.SaveToFile("my_subtitle.vtt");In this example, we create a new `SubtitleFile` object and add a single subtitle entry to it. We set the start and end times for the entry, as well as its text content. Finally, we use the `SaveToFile` method to save the subtitle file in VTT format to disk. Package Library: OSD.FromReal