Open joy2g opened 5 years ago
it was awesome library, but sadly abandoned... there's many bugs on determining subtitle's formats and reformatting those subtitles. however its subtitle formats which used in determine and format are modularized. there's folder named format you might able to adjust them properly.
@loveisalie92 sounds like the format cannot be detected automatically due to an unexpected pattern in the .srt
file. A sample file is always welcome.
Yes, there is an explicit way to tell the parser which is the input format
var captions = subsrt.parse(content, { format: "srt" });
then the captions
can be converted to any other format
var content = subsrt.build(captions, { format: "vtt" });
@dnjstlr555 the library has been resurrected, thanks for encouraging :thumbsup:
I have converted few .srt files to .vtt. But sometime i get the error "Cannot determine subtitle format" while the input file is correctly formatted by .srt.
Is there anyway to make it works? (like help the parser know exactly what kind of input format) Thanks for making this awesome library