Created
October 4, 2015 19:10
-
-
Save solarkennedy/584d1cda9e2ffd324b17 to your computer and use it in GitHub Desktop.
Script to convert youtube sbv captions to srt captions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from captionstransformer.sbv import Reader | |
from captionstransformer.srt import Writer | |
r = open('captions.sbv') | |
reader = Reader(r) | |
w = open('captions.srt', 'w') | |
writer = Writer(w) | |
writer.set_captions(reader.read()) | |
writer.write() | |
writer.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment