How can I convert between srt file and csv file?

1.5k Views Asked by At

srt file example:

1
00:01:13,360 --> 00:01:14,441
I warned you.

2
00:01:14,680 --> 00:01:17,570
Did I not warn you what would come
of dealing with Dwarves?

3
00:01:17,840 --> 00:01:18,921
Now they've done it.

csv file example:

ID  Start_Time      End_Time        Text
1   00:01:13,360    00:01:14,441    I warned you.
2   00:01:14,680    00:01:17,570    Did I not warn you what would come of dealing with Dwarves?
3   00:01:17,840    00:01:18,921    Now they've done it.

The srt file sometimes contains multiple lines of text and html format symbols. Is there any package that I can use to convert between them? or I have to write by myself?

1

There are 1 best solutions below

0
On

There seems to be plenty of libraries. The first one I found: