Question

I have a large number of SRT files that have been translated from English to various languages. Unfortunately, I need to convert these to webVTT but the translated ones don't want to convert. I tried using http://atelier.u-sub.net/srt2vtt/ but it failed. It seems to be from what I can tell, because the length of characters per line is too long. So now I'm stuck with either finding a solution that won't care how long the length of characters per line is or manipulate the file (https://github.com/delphiki/SubRip-File-Parser/blob/master/srtfile.class.php) so I can carry on. I have about 100 files to convert.

I did test on one my SRT files that wouldn't convert originally. I broke the lines up that were too long and then used http://atelier.u-sub.net/srt2vtt/ and it converted it with no problems. So, I know my original thought that it was based on character length per line.

Any thoughts?

Was it helpful?

Solution

Ok, the solution was simpler then I thought. The non English files were not in UTF-8. That was the issue. I reviewed the library and there was no place where it was counting the length of the characters per line. I opened up some of the files, resaved them, and then tried to convert and it worked. Problem solved!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top