Re: [dev] Writing subtitles for videos

From: Thomas Levine <>
Date: Tue, 24 Oct 2017 20:18:52 +0000

WebVTT format is more complex than I would like and also not fully
implemented on any browsers, as far as I can tell, so I use a small
subset that is very simple.

The following section is most of the parsing of my bespoke formats for
timings and texts. It references lots of other functions in the library
of interest that all do very little, so it might be very tedious to
read. The parsing of these files is simple enough that I did not give it
its own function; this passage is complex because it also handles build
dependencies, user interface concerns, and concatenation of subtitles.

In summary of the above, I combine a timing file and a
named-for-a-language text file, and I come up with a sequence of
Subtitle objects, where a Subtitle contains a language, a list of times,
and a list of strings.

I implemented two different WebVTT formats that dump the Subtitle
sequence. I wanted to use the webvtt_karaoke, but I couldn't find any
browsers that supported the karaoke feature, so I am using

Fortunately, the input format and data structure are simple enough that
you can probably ignore everything I discuss above. In my prior email
I referenced this timings file

and these two text files.

Using the files and the corresponding video as inputs, I arrive at the
these WebVTT files as outputs.!/langrompiloj/blaukraut/blaukraut_de.vtt!/langrompiloj/blaukraut/blaukraut_en.vtt

Markus Teich writes:
> Heyho Thomas,
> I did not look up the format, so it might be trivial, but do you mind shari
> ng
> your tooling for the WebVTT translation as well?
> --Markus
Received on Tue Oct 24 2017 - 22:18:52 CEST

This archive was generated by hypermail 2.3.0 : Tue Oct 24 2017 - 22:24:16 CEST