import webvtt filename = "emacsconf-2020-06--trivial-emacs-kits--corwin-brust.sbv" 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()