nwoltman / srt-to-vtt-cl

A command line tool that converts subtitle files from SubRib (.srt) format to WebVTT (.vtt) format
MIT License
95 stars 11 forks source link

comma to dots not converted #8

Closed hoemaco closed 3 years ago

hoemaco commented 3 years ago

Describe the incorrect output

The commas in the srt are not converted to dots in vtt.

System Info

Windows 7 64b , command line version of converter

Sample SRT File

pressure_1b.zip

File was created manually in NotePad2. Using ANSI encoding (default).

nwoltman commented 3 years ago

Looks like that's not a completely valid SRT file. The milliseconds part of the timestamp should have 3 digits, whereas the timestamps only have 2 in that file.

So this:

00:00:00,00 --> 00:00:07,00

should be this:

00:00:00,000 --> 00:00:07,000

and then it will be converted properly.

hoemaco commented 3 years ago

Thanks. I was mislead by some site and file where it used only two digits; and it worked (apparently the video players eat srt files with two digits as well).

Of course if I don't use special characters then converting is really a search and replace so no big issue, but still easier with a cmd line tool. Thanks.

nwoltman commented 3 years ago

I just pushed an update to handle this special case. However, I don't know if the new binary will run on Windows 7 because I only have Windows 10 devices now.