Files for "How to Translate a VTT File Without Losing Cue Settings" https://www.booktranslator.app/blog/translate-vtt-subtitles lecture-en.vtt A 6-cue English test file we wrote. It has a header title, two NOTE comments, a STYLE block, a REGION block, a cue identifier, cue settings (align, position, line, region, size), voice tags, a class tag, ruby, timestamp tags, the escaped characters & and <, and a music-only cue. lecture-es-after-translation.vtt The Spanish file written by BookTranslator's subtitle code (apps/api/src/translation/plugins/subtitle/plugin.ts, repository commit ce8fa10c6), run locally on 2026-11-17: the plugin's parse step read lecture-en.vtt and its write step wrote this file. We did not call a translation model. The Spanish lines were written by hand and passed to the write step in place of model output, with the tags kept. So this file shows what happens to the structure of a VTT file, not translation quality or whether a model keeps every tag. The write step ends the file with an empty line; we removed that one trailing line and changed nothing else. lecture-es-restored.vtt The output of: python3 vtt_carry_settings.py restore lecture-en.vtt lecture-es-after-translation.vtt lecture-es-restored.vtt --keep-notes vtt_carry_settings.py Python 3.8+, standard library only. check source.vtt translated.vtt restore source.vtt translated.vtt out.vtt [--keep-notes] "restore" refuses to run unless both files have the same number of cues with the same timings, and it never changes cue text. We parsed all three files with media-captions 0.0.18 (the parser BookTranslator's code uses). All three parsed with no errors. The source and the restored file have 1 region and the same settings on cues 1, 2, and 4; the translated file has no region and no cue settings. We did not test how particular players render the files.