I'm trying to load and parse a .srt subtitle file in VB.net
. It is a very simple text file, but I'm having difficulty.
Here is the structure:
Hide Copy Code
1
00:00:01,600 --> 00:00:04,200
English (US)
2
00:00:05,900 --> 00:00:07,999
This is a subtitle in American English
Sometimes subtitles have 2 lines
3
00:00:10,000 --> 00:00:14,000
Adding subtitles is very easy to do
- A number
- Followed by start and end time
- followed by the text which can be 1 or multiple lines
What I'm really trying to do is find the length in time of the subtitle file - meaning finding the last end time for the subtitle file. I'm creating a program that hard codes subtitles to a video file so I need to know how long the video should be based on the length of the subtitle file.
The outcome I'm looking for is:
After reading a .srt file to know the "length" in time of the .srt file - meaning the last time code. In the example above it would be: 00:00:14,000 that's the last time the subtitle is displayed.