AlexPoint / SubtitlesParser

Multi formats subtitles parser in C#
MIT License
134 stars 40 forks source link

Parsing as srt returned no srt part #19

Closed tuanbs closed 5 years ago

tuanbs commented 5 years ago

Hello developer, I got the following error when I parsed the SRT file:

System.FormatException
Message : Parsing as srt returned no srt part.
StackTrace :    at SubtitlesParser.Classes.Parsers.SrtParser.ParseStream(Stream srtStream, Encoding encoding)

I guess the SRT file is invalid or corrupt, but I when I use VLC player to play the video, VLC player still shows the subtitle from this SRT file. So I think it's a valid SRT file.

It worked with the other SRT files I have but not for this file. I attach the video and its SRT file for your reference. I also used another package called node srt-to-vtt to convert it, but I got the blank VTT file.

FYI, I use the tool called SubtitleEdit to create the SRT file for this video. Thanks in advance if there's any solution or workaround to fix this issue.

Archive.zip

tuanbs commented 5 years ago

sorry, issue is fixed by putting my conversion code outside of the using block. Somehow the FileStream returns empty content of the SRT file inside the using block. Please closed or deleted this issue. Thanks.

AlexPoint commented 5 years ago

Good to hear. I'm closing this issue then.