Closed phigrey closed 4 years ago
I have solved this by adding identifier.
srt_obj = webvtt.from_srt('dracula.srt')
for index, caption in enumerate(srt_obj.captions):
caption.identifier = str(index + 1)
srt_obj.save('test.vtt')
Hi @dorrywhale apologies for the late reply. The identifiers in vtt captions are not a requirement of the WebVTT format as they are optional and for certain purposes. Converting from srt along with those numbers as identifiers would not provide any added benefit. Thanks and Best Regards!
I have run the following code
At first, I found the
identifier in srt file is not saved in vtt file
, then I did a little inspection. Theidentifier
is None according to the output.BTW, I have checked the issue#14. I am using
0.4.3
.