import webvtt import sys filename = sys.argv[1] if (filename.find('sbv')): vtt = webvtt.from_sbv(filename) length = len(vtt) for i in range(0, length - 1): vtt[i].end = vtt[i + 1].start vtt.save()